180 likes | 1.32k Views
Chi-square Goodness of Fit Test. Presentation 10.1. 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. M&Ms Again.
E N D
Chi-square Goodness of Fit Test Presentation 10.1
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.
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.
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
M&Ms Example • Look at the data of the 86 candies in our king size bag
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.
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.
M&Ms Example • Calculations (this takes a bit of work) Then, add them up!
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.
Chi-square Goodness of Fit Test This concludes this presentation.