Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mandms

Proportions of colors in various M and M's varieties


Description

A bag of the candy M and M's has many different colors. Each large production batch is blended to the ratios given in this data set. The batches are thoroughly mixed and then the individual packages are filled by weight using high-speed equipment, not by count.

Usage

data(mandms)

Format

A data frame with 5 observations on the following 6 variables.

blue

percentage of blue

brown

percentage of brown

green

percentage of green

orange

percentage of orange

red

percentage of red

yellow

percentage of yellow

Source

This data is attributed to an email sent by Masterfoods USA, A Mars, Incoporated Company. This email was archived at the Math Forum, http://www.mathforum.org.

Examples

data(mandms)
bagfull = c(15,34,7,19,29,24)
names(bagfull) = c("blue","brown","green","orange","red","yellow")
prop = function(x) x/sum(x)
chisq.test(bagfull,p = prop(mandms["milk chocolate",]))
chisq.test(bagfull,p = prop(mandms["Peanut",]))

UsingR

Data Sets, Etc. for the Text "Using R for Introductory Statistics", Second Edition

v2.0-6
GPL (>= 2)
Authors
John Verzani <verzani@math.csi.cuny.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.