"We don't know a millionth of onepercent about anything."

13.1 TEST FOR GOODNESS OF FIT (Pages 702 - 716)

OVERVIEW: A chi-square test goodnessof fit test is used to see if an observed sample distribution isdifferent from a hypothesized population distribution. In otherwords, it is used to see if what you got is statistically differentfrom what you expected to get.

The chi-square (*x ^{2} *) statistic is calculated asfollows:

x^{2}= sum[(observed - expected) ^{2}/expected]

Properties of *x ^{2}*

*x*is nonnegative in value.^{2 }- The
*x*distribution is not symmetrical. It is skewed to the right.^{2} - All
*x*tests are 1-tail tests.^{2} - In a goodness of fit test, the degrees of freedom is
*number of categories - 1*.

Example #1:

A die is tossed 120 times with theresults displayed in the following table. Is there statisticalevidence to suggest that the die is "loaded"?

Up Face-->

123456Observed frequency

25 17 15 23 24 16 Expected frequency

20 20 20 20 20 20 In this situation, the degrees of freedom is 6 - 1= 5.

[Note that 5 of the categories are free to vary, but the sixthis not, since all categories have to add up to 120.]The calculated

x^{2}is

x=(25-20)^{2}^{2}/20+ (17-20)^{2}/20 + (15-20) ^{2}/20 +(23-20)^{2}/20+ (24-20)^{2}/20 + (16-20) ^{2}/20 = 5.At the 5% level of significance, the criticalregion is

x> 11.1. Since ourcalculated^{2}x^{2}is not in this region, we would not reject a nullhypothesis that says "The die is fair."

Alternate approach:Using the TI-83, the P-value5,1E99,5) = .4158801852,which is approximately 41.6%. There is no evidence to suggest thatthe die is loaded.x^{2 }cdf(

Example #2:

Suppose I flip a coin 100 times andget 80 heads and 20 tails.

Number of HEADS

Number of TAILS

Observed

80 20 Expected

50 50 The

x^{2}statistic for this experiment is

x=(80-50)^{2}^{2}/50+ (20-50)^{2}/50 = 18 + 18 = 36. The degrees of freedom is 2-1 = 1.

At the 1% level of significance, the criticalregion for

x^{2}is x^{2}> 6.63. Our calculated value of 36 is well into thisregion. There is strong evidence to suggest that the coin is notfair.

Alternate approach:Using the TI-83, the P-value isx^{2 }cdf(36, 1E99,1) = .00000000197. This is the probabilitythat one would get 80 or more heads when flipping a fair coin 100times. This supports the previous statement suggesting that the coinis not fair.

The *x ^{2}*

- All individual expected counts are at least 1.
- No more than 20% of the expected counts are less than 5.

In the examples above, these conditions weresatisfied.

** **