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

mandmsR Documentation

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 (now off-line).

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 documentation built on March 18, 2022, 7:32 p.m.