Chi-square Goodness of Fit Test Presentation 10.1.
-
Upload
rolf-horton -
Category
Documents
-
view
220 -
download
4
Transcript of Chi-square Goodness of Fit Test Presentation 10.1.
![Page 1: Chi-square Goodness of Fit Test Presentation 10.1.](https://reader038.fdocuments.net/reader038/viewer/2022103005/56649dac5503460f94a9afa1/html5/thumbnails/1.jpg)
Chi-square Goodness of Fit Test
Presentation 10.1
![Page 2: Chi-square Goodness of Fit Test Presentation 10.1.](https://reader038.fdocuments.net/reader038/viewer/2022103005/56649dac5503460f94a9afa1/html5/thumbnails/2.jpg)
Another Significance Test for Proportions
• But this time we want to test multiple proportions.
• Hypothesis tests can also be performed with one proportion to obtain evidence about the truth about a population.
![Page 3: Chi-square Goodness of Fit Test Presentation 10.1.](https://reader038.fdocuments.net/reader038/viewer/2022103005/56649dac5503460f94a9afa1/html5/thumbnails/3.jpg)
M&Ms Again
• The Mars Company claims the color distribution at right.
• A sample from a king size bag found a distribution that did not exactly follow the one at right.
• Is our sample bag enough evidence to dispute the Mars Company’s claim about the distribution of colors?
• The chi-square test can determine this.
![Page 4: Chi-square Goodness of Fit Test Presentation 10.1.](https://reader038.fdocuments.net/reader038/viewer/2022103005/56649dac5503460f94a9afa1/html5/thumbnails/4.jpg)
Chi-square Goodness of Fit Test Formulas
dfcdfValueP
categoriesofdfE
EO
ExpectedObservedH
ExpectedObservedH
a
,9999,
1#
:
:
22
22
0
Null Hypothesis
Alternate Hypothesis
Test Statistic(that symbol is called“Chi-squared”)
The null and alternate hypotheses are always the same with a Goodness of Fit Test.
O is the observed count for each category and E is the expected count for each category.
Instead of a normal or t distribution, we now have a chi-squared distribution
![Page 5: Chi-square Goodness of Fit Test Presentation 10.1.](https://reader038.fdocuments.net/reader038/viewer/2022103005/56649dac5503460f94a9afa1/html5/thumbnails/5.jpg)
M&Ms Example
• Look at the data of the 86 candies in our king size bag
Color Brown Yellow Red Blue Orange Green
Observed in our bag
12 10 8 25 14 19
Supposed (expected)
%
13% 14% 13% 24% 20% 16%
Supposed (expected) count for our bag
(.13)86 =11.18
(.14)86 =12.04
(.13)86 =11.18
(.24)86 =20.64
(.20)86 =17.2
(.16)86 =13.76
![Page 6: Chi-square Goodness of Fit Test Presentation 10.1.](https://reader038.fdocuments.net/reader038/viewer/2022103005/56649dac5503460f94a9afa1/html5/thumbnails/6.jpg)
Conditions for the Goodness of Fit Test
• None of the observed counts should be less than 1
• No more than 20% of the counts should be less than 5
• These are simple checks to make sure that the sample size is sufficient.
![Page 7: Chi-square Goodness of Fit Test Presentation 10.1.](https://reader038.fdocuments.net/reader038/viewer/2022103005/56649dac5503460f94a9afa1/html5/thumbnails/7.jpg)
M&Ms Example
• Check the conditions– Since all counts are greater than 5, we are ok to
conduct the test– Our counts were 12, 10, 8, 25, 14, 19.
• Write Hypotheses (these are always the same!)– Null: Ho: Observed = Expected
• That is, what we observed should be the same as what we expected (what the Mars company advertises)
– Alternate: Ha: Observed ≠ Expected• That is, the color distribution is just too different from what is
advertised to be attributed to random chance.
![Page 8: Chi-square Goodness of Fit Test Presentation 10.1.](https://reader038.fdocuments.net/reader038/viewer/2022103005/56649dac5503460f94a9afa1/html5/thumbnails/8.jpg)
M&Ms Example
• Calculations (this takes a bit of work)
Color Brown Yellow Red Blue Orange Green
Observed 12 10 8 25 14 19
Expected 11.18 12.04 11.18 20.64 17.2 13.76
(O-E)2 (12-11.18)2=0.6724
(10-12.04)2=4.1616
(8-11.18)2=10.1124
(25-20.64)2=19.0096
(14-17.2)2=10.24
(19-13.76)2=27.4576
(O-E)2/E 0.0601 0.3456 0.9045 0.9210 0.5953 1.9955
E
EO 22
822.4
9955.15953.921.9045.3456.0601.2
2
Then, add them up!
![Page 9: Chi-square Goodness of Fit Test Presentation 10.1.](https://reader038.fdocuments.net/reader038/viewer/2022103005/56649dac5503460f94a9afa1/html5/thumbnails/9.jpg)
M&Ms Example
• Finish calculations• We have 6 categories so our
degrees of freedom: 6 – 1 = 5.• Then use X2cdf(4.822,999,5)
to find the p-value• With a p-value so high we fail
to reject the null.• There is not sufficient evidence
to suggest that the color distribution in our bag is different from what is advertised.
![Page 10: Chi-square Goodness of Fit Test Presentation 10.1.](https://reader038.fdocuments.net/reader038/viewer/2022103005/56649dac5503460f94a9afa1/html5/thumbnails/10.jpg)
Chi-square Goodness of Fit Test
This concludes this presentation.