UsingR (version 2.0-6)

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)

Arguments

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

Examples

Run this code
# NOT RUN {
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",]))
# }

Run the code above in your browser using DataLab