Assuming I want to run a goodness of fit Chi squared test ho

Assuming I want to run a goodness of fit Chi squared test, how would I do this based on data above? Sample taken from 20 bags of each. Are the colors evenly distributed?

sample of milk m&m
blue brown green orange red yellow total
214 152 197 209 149 163 1084
20% 14% 18% 19% 14% 15% 100%

Solution

the test statistc is

chi square=sum(O-E)^2/E

where E=(rowtotal*column total)/N

Since p value is less than 0.5, we reject the null hypothesis and conclude that the colors are not evenly distributed.

Chi-square Contingency Table Test for Independence
  
Col 1   Col 2   Total  
Row 1 Observed   214 95 309
Expected   224.80 84.20 309.00
O - E   -10.80 10.80 0.00
   (O - E)² / E   0.52 1.39 1.91
Row 2 Observed   152 32 184
Expected   133.86 50.14 184.00
O - E   18.14 -18.14 0.00
(O - E)² / E   2.46 6.56 9.02
Row 3 Observed   197 73 270
Expected   196.43 73.57 270.00
O - E   0.57 -0.57 0.00
(O - E)² / E   0.00 0.00 0.01
Row 4 Observed   209 90 299
Expected   217.53 81.47 299.00
O - E   -8.53 8.53 0.00
(O - E)² / E   0.33 0.89 1.23
Row 5 Observed   149 40 189
Expected   137.50 51.50 189.00
O - E   11.50 -11.50 0.00
(O - E)² / E   0.96 2.57 3.53
Row 6 Observed   163 76 239
Expected   173.88 65.12 239.00
O - E   -10.88 10.88 0.00
(O - E)² / E   0.68 1.82 2.50
Total Observed   1084 406 1490
Expected   1084.00 406.00 1490.00
O - E   0.00 0.00 0.00
(O - E)² / E   4.95 13.23 18.18
18.18 chi-square
5 df
.0027 p-value
Assuming I want to run a goodness of fit Chi squared test, how would I do this based on data above? Sample taken from 20 bags of each. Are the colors evenly dis

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site