Login
📚 Statistics with Technology 2e
Chapters ▾
⇩ Download ▾

11.2 Chi-Square Goodness of Fit

In probability, you calculated probabilities using both experimental and theoretical methods. There are times when it is important to determine how well the experimental values match the theoretical values. An example of this is if you wish to verify if a die is fair. To determine if observed values fit the expected values, you want to see if the difference between observed values and expected values is large enough to say that the test statistic is unlikely to happen if you assume that the observed values fit the expected values. The test statistic in this case is also the chi-square. The process is the same as for the chi-square test for independence.

Hypothesis Test for Goodness of Fit Test

  1. State the null and alternative hypotheses and the level of significance
    Ho: The data are consistent with a specific distribution
    HA: The data are not consistent with a specific distribution
    Also, state your α level here.
  2. State and check the assumptions for the hypothesis test
    1. A random sample is taken.
    2. Expected frequencies for each cell are greater than or equal to 5 (The expected frequencies, E, will be calculated later, and this assumption means E5).
  3. Find the test statistic and p-value
    Finding the test statistic involves several steps. First the data is collected and counted, and then it is organized into a table (in a table each entry is called a cell). These values are known as the observed frequencies, which the symbol for an observed frequency is O. The table is made up of k entries. The total number of observed frequencies is n. The expected frequencies are calculated by multiplying the probability of each entry, p, times n.

Expected frequency( entry  i ) = E = n * p

Test Statistic:

χ 2 = ( O E ) 2 E

where O is the observed frequency and E is the expected frequency.

Again, the test statistic involves squaring the differences, so the test statistics are all positive. Thus a chi-squared test for goodness of fit is always right tailed.

p-value:

Using the TI-83/84: χ cdf ( lower limit, 1E99,df)

Using R: 1 pchisq (χ2,df)

Where the degrees of freedom is df = k - 1

4. Conclusion

This is where you write reject Ho or fail to reject Ho. The rule is: if the p-value < α, then reject Ho. If the p-value α, then fail to reject Ho,

5. Interpretation

This is where you interpret in real world terms the conclusion to the test. The conclusion for a hypothesis test is that you either have enough evidence to show HA is true, or you do not have enough evidence to show HA is true.

Homework