mandms: Proportions of colors in various M and M's varieties

Description Usage Format Source Examples

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

1

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

1
2
3
4
5
6
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",]))

jverzani/UsingR documentation built on Aug. 3, 2020, 11:57 a.m.