FS1-6 Chi squared tests — coverage pack

1 specification leaves · notes, questions, answers and worked methods

FS1-6.1 · Goodness of fit tests and contingency tables. The null and alternative hypotheses. Degrees of freedom.

  • For goodness of fit, H0H_0 states that the proposed distribution fits; for a contingency table, H0H_0 states that the two classifications are independent.
  • Use χ2=(OE)2E\chi^2=\sum\dfrac{(O-E)^2}{E}. For kk goodness-of-fit groups, df=k1mdf=k-1-m when mm parameters are estimated from the data; for an r×cr\times c table, df=(r1)(c1)df=(r-1)(c-1).
  • In a contingency table, each expected frequency is E=(row total)(column total)/(grand total)E=(\text{row total})(\text{column total})/(\text{grand total}).
  • A common error is to leave an expected frequency below 55; adjacent or sensible categories should be combined before calculating the statistic and degrees of freedom.

Tier 1 · Easy

  1. 1. A goodness-of-fit test has four categories with model probabilities 0.1,0.2,0.3,0.40.1,0.2,0.3,0.4 and a sample size of 120120. No parameter is estimated. Find the expected frequencies and the degrees of freedom.[3 marks]

    Answer

    • Expected frequencies 12,24,36,4812,24,36,48
    • df=3df=3

    Method: Multiply 120120 by each model probability to obtain 12,24,36,4812,24,36,48. With k=4k=4 groups and no estimated parameter, df=k1=3df=k-1=3.

Tier 2 · Standard

  1. 1. After fitting a one-parameter model from the same data, five ordered categories have observed frequencies 41,33,17,7,241,33,17,7,2 and expected frequencies 40,32,18,7,340,32,18,7,3. Carry out a goodness-of-fit test at the 5%5\% level of significance. The critical value for 22 degrees of freedom is 5.9915.991.[8 marks]

    Answer

    • Combine the final two categories, giving observed 41,33,17,941,33,17,9 and expected 40,32,18,1040,32,18,10
    • H0H_0: the fitted model is suitable; H1H_1: it is not suitable
    • χ2=0.2118\chi^2=0.2118
    • df=2df=2
    • Do not reject H0H_0; there is insufficient evidence that the model does not fit

    Method: The final expected frequency is 3<53<5, so combine it with the adjacent fourth category. This gives O=(41,33,17,9)O=(41,33,17,9) and E=(40,32,18,10)E=(40,32,18,10). Then χ2=1240+1232+(1)218+(1)210=0.211806\chi^2=\dfrac{1^2}{40}+\dfrac{1^2}{32}+\dfrac{(-1)^2}{18}+\dfrac{(-1)^2}{10}=0.211806\ldots. After combining there are k=4k=4 groups, and one parameter was estimated, so df=k11=2df=k-1-1=2. Since 0.2118<5.9910.2118<5.991, do not reject H0H_0.

Tier 3 · Hard

  1. 1. The observed counts in a 3×43\times4 contingency table are ABCDR24182018S16222022T10203020\begin{array}{c|rrrr}&A&B&C&D\\ \hline R&24&18&20&18\\ S&16&22&20&22\\ T&10&20&30&20\end{array}. Test independence at the 5%5\% level of significance. The critical value for 66 degrees of freedom is 12.59212.592.[10 marks]

    Answer

    • H0H_0: row and column classifications are independent; H1H_1: they are associated
    • Expected row in each case: (16.667,20,23.333,20)(16.667,20,23.333,20)
    • χ2=9.577\chi^2=9.577
    • df=6df=6
    • Do not reject H0H_0; there is insufficient evidence of an association

    Method: Each row total is 8080, the column totals are 50,60,70,6050,60,70,60, and the grand total is 240240. Thus every expected row is (80/240)(50,60,70,60)=(16.6667,20,23.3333,20)(80/240)(50,60,70,60)=(16.6667,20,23.3333,20). Summing (OE)2/E(O-E)^2/E over all 1212 cells gives χ2=9.5771429\chi^2=9.5771429\ldots. The degrees of freedom are (31)(41)=6(3-1)(4-1)=6. Since 9.577<12.5929.577<12.592, do not reject independence.