In: Statistics and Probability
**Assume that both Plain and Peanut M&M candies are normally distributed.
1. Suppose that M&M claims that their Plain M&Ms have an equal proportion of red and brown.
a. Test the claim that the proportion of red M&Ms is greater than the proportion of brown M&Ms.
b. Test the claim that the proportion of red M&Ms is less than the proportion of brown M&Ms.
Total number of M&M's: 665
Total number of red M&M's: 76
Total number of brown M&M's: 66
Clearly , it is proportion test .
a.
let's assume that P1 is the proportion of red M&Ms and P2 is the proportion of brown M&Ms .
Hypothesis :
Null hypothesis :
Alternative hypothesis :
Here,
sample size = n = 665
Let ,
Sample proportion of Red M&Ms =
Where ,
number of red M&Ms in the sample .
also
Sample proportion of Brown M&Ms =
Now we use r-software for testing the hypothesis :
Take level of Significance = 5% = 0.05
> x=c(76,66)
> n=c(665,665)
>
prop.test(x,n,conf.level=0.95,alternative="greater")
2-sample test for equality of proportions with continuity correction
data: x out of n
X-squared = 0.6386, df = 1, p-value = 0.2121
alternative hypothesis: greater
95 percent confidence interval:
-0.01431477 1.00000000
sample estimates:
prop 1 prop 2
0.11428571 0.09924812
Here ,
Decision rule :
if p-value is less than level of significance then we reject null hypothesis otherwise accept null hypothesis .
Here ,
p-value = 0.2121
level of significance = 0.05
since 0.2121>0.05
we can say that , we cannot reject
Therefore , is accepted .
Therefore , Proportion of red M&Ms and brown M&Ms is same .
b.
let's assume that P1 is the proportion of red M&Ms and P2 is the proportion of brown M&Ms .
Hypothesis :
Null hypothesis :
Alternative hypothesis :
Here,
sample size = n = 665
Let ,
Sample proportion of Red M&Ms =
Where ,
number of red M&Ms in the sample .
also
Sample proportion of Brown M&Ms =
Now we use r-software for testing the hypothesis :
Take level of Significance = 5% = 0.05
> x=c(76,66)
> n=c(665,665)
> prop.test(x,n,conf.level=0.95,alternative="less")
2-sample test for equality of proportions with continuity correction
data: x out of n
X-squared = 0.6386, df = 1, p-value = 0.7879
alternative hypothesis: less
95 percent confidence interval:
-1.00000000 0.04438996
sample estimates:
prop 1 prop 2
0.11428571 0.09924812
Here ,
Decision rule :
if p-value is less than level of significance then we reject null hypothesis otherwise accept null hypothesis .
Here ,
p-value = 0.7879
level of significance = 0.05
since 0.7879>0.05
we can say that , we cannot reject
Therefore , is accepted .
Therefore , Proportion of red M&Ms and brown M&Ms is same .