Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chi-square Goodness of Fit Test

Similar presentations


Presentation on theme: "Chi-square Goodness of Fit Test"— Presentation transcript:

1 Chi-square Goodness of Fit Test
Presentation 10.1

2 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.

3 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.

4 Chi-square Goodness of Fit Test Formulas
The null and alternate hypotheses are always the same with a Goodness of Fit Test. Null Hypothesis Alternate Hypothesis Test Statistic (that symbol is called “Chi-squared”) 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

5 Supposed (expected) count for our bag
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% 24% 20% 16% Supposed (expected) count for our bag (.13)86 = 11.18 (.14)86 = 12.04 (.24)86 = 20.64 (.20)86 = 17.2 (.16)86 = 13.76

6 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.

7 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.

8 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 20.64 17.2 13.76 (O-E)2 ( )2= 0.6724 ( )2= 4.1616 ( )2= ( )2= ( )2= 10.24 ( )2= (O-E)2/E 0.0601 0.3456 0.9045 0.9210 0.5953 1.9955 Then, add them up!

9 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.

10 Chi-square Goodness of Fit Test
This concludes this presentation.


Download ppt "Chi-square Goodness of Fit Test"

Similar presentations


Ads by Google