Hard Further Maths Chi-squared tests Questions

Challenging, exam-style Further Maths Chi-squared tests questions with worked solutions. Stretch yourself on the hardest chi-squared, hypothesis-testing, goodness-of-fit, binomial-model problems.

chi-squaredhypothesis-testinggoodness-of-fitbinomial-modelpoolingpoisson-model
Further Maths34 questionsStep-by-step solutions
Question 1
9 markschallenging
The number of accidents on a stretch of road in each of 150150 weeks is recorded. The observed frequencies are given in the table. Number of accidents0123456Observed frequency8203532261613\begin{array}{c|ccccccc}\text{Number of accidents} & 0 & 1 & 2 & 3 & 4 & 5 & \ge 6\\\hline\text{Observed frequency} & 8 & 20 & 35 & 32 & 26 & 16 & 13\end{array} Under H0H_0 the number of events XX follows the distribution Po(3)\mathrm{Po}(3). The value λ=3\lambda=3 is given in this question and is not estimated from the data, so no degree of freedom is lost for parameter estimation. Any class whose expected frequency is less than 55 must be pooled with the adjacent class nearer the tail of the distribution, repeatedly, until every expected frequency is at least 55; the tail is pooled first. The number of degrees of freedom is ν=(number of classes after pooling)1(number of parameters estimated from the data)\nu=(\text{number of classes after pooling})-1-(\text{number of parameters estimated from the data}). Expected frequencies are to be used exactly (they must not be rounded before being used) and every numerical answer is to be given to 33 decimal places. The test is carried out at the 1%1\% significance level and H0H_0 is rejected if and only if χcalc2>χcrit2\chi^2_{\text{calc}}>\chi^2_{\text{crit}} (a strict inequality). Which of the following correctly states the number of degrees of freedom, the value of the test statistic, the critical value and the conclusion of this test in context?
Show worked solution

Worked solution

  1. State the hypotheses

    H0:the model fits the dataH1:the model does not fit the dataH_0:\text{the model fits the data}\quad H_1:\text{the model does not fit the data}

    The stated model is the null hypothesis for a goodness-of-fit test.

  2. State the Poisson model

    XPo(3)X\sim\mathrm{Po}(3)

    The value of λ\lambda is given, so no degree of freedom is lost for estimation.

  3. Find every expected frequency

    E1=7.4681,  E2=22.4042,  E3=33.6063,  E4=33.6063,  E5=25.2047,  E6=15.1228,  E7=12.5877E_{1}=7.4681,\;E_{2}=22.4042,\;E_{3}=33.6063,\;E_{4}=33.6063,\;E_{5}=25.2047,\;E_{6}=15.1228,\;E_{7}=12.5877

    Each expected frequency is the sample size multiplied by the model probability.

  4. Check that the expected frequencies sum to the observed total

    E=150.000=150=O\sum E=150.000=150=\sum O

    This confirms that no arithmetic slip has been made.

  5. Check the pooling rule

    miniEi=7.46815    no pooling\min_i E_i=7.4681\ge5\;\Rightarrow\;\text{no pooling}

    Every expected frequency is at least 55, so no classes are combined.

  6. Find the number of degrees of freedom

    ν=710=6\nu=7-1-0=6

    There are 7 classes after pooling and 0 parameters estimated from the data.

  7. Find the contribution of every class

    0.0379+0.2580+0.0578+0.0768+0.0251+0.0509+0.0135    χcalc2=0.5200.0379+0.2580+0.0578+0.0768+0.0251+0.0509+0.0135\;\Rightarrow\;\chi^2_{\text{calc}}=0.520

    The test statistic is the sum of the contributions of the pooled classes.

  8. Add the contributions

    χcalc2=0.0379+0.2580+0.0578+0.0768+0.0251+0.0509+0.0135=0.520\chi^2_{\text{calc}}=0.0379+0.2580+0.0578+0.0768+0.0251+0.0509+0.0135=0.520

    This is the value of the test statistic, to 33 decimal places.

  9. Find the critical value

    χcrit2=χ0.012(6)=16.812\chi^2_{\text{crit}}=\chi^2_{0.01}(6)=16.812

    This is the upper 1\% point of the chi-squared distribution with ν=6\nu=6.

  10. Compare the statistic with the critical value

    0.52016.8120.520\le16.812

    H0H_0 is rejected if and only if χcalc2>χcrit2\chi^2_{\text{calc}}>\chi^2_{\text{crit}}.

  11. Recall the chi-squared test statistic

    χcalc2=(OE)2E\chi^2_{\text{calc}}=\sum\frac{(O-E)^2}{E}

    Each class contributes (OE)2E\frac{(O-E)^2}{E}, so the statistic is never negative.

  12. Recall the pooling rule

    Ei5 for every class used in the testE_i\ge5\text{ for every class used in the test}

    Classes are combined with their neighbour towards the tail until this holds.

  13. Recall the degrees-of-freedom rule for a goodness-of-fit test

    ν=k1m\nu=k-1-m

    Here kk is the number of classes AFTER pooling and mm the number of parameters estimated from the data.

  14. Recall the degrees-of-freedom rule for a contingency table

    ν=(r1)(c1)\nu=(r-1)(c-1)

    The row and column totals are fixed, which removes r+c1r+c-1 degrees of freedom.

  15. Select the correct conclusion in context

    do not reject H0; there is insufficient evidence at the 1% level that Po(3) is a poor model for the number of accidents\text{do not reject }H_0\text{; there is insufficient evidence at the 1\% level that Po(3) is a poor model for the number of accidents}

    The conclusion must be stated in the context of the question.

Answer
ν=6,  χcalc2=0.520,  χcrit2=16.812,  so χcalc2χcrit2: do not reject H0; there is insufficient evidence at the 1% level that Po(3) is a poor model for the number of accidents\nu=6,\;\chi^2_{\text{calc}}=0.520,\;\chi^2_{\text{crit}}=16.812,\;\text{so }\chi^2_{\text{calc}}\le\chi^2_{\text{crit}}\text{: do not reject }H_0\text{; there is insufficient evidence at the 1\% level that Po(3) is a poor model for the number of accidents}
Question 2
9 markschallenging
In a marketing trial 100100 shoppers either see an advert or do not, and it is recorded whether they buy the product. The results are given in the contingency table.  BoughtDid not buyAdvert shown2228No advert3515\begin{array}{l|cc}\text{ } & \text{Bought} & \text{Did not buy}\\\hline\text{Advert shown} & 22 & 28\\\text{No advert} & 35 & 15\end{array} The data form a contingency table. Under H0H_0 the two factors are independent; under H1H_1 they are not independent. Expected frequencies are found from E=(row total)×(column total)grand totalE=\frac{(\text{row total})\times(\text{column total})}{\text{grand total}} and the number of degrees of freedom is ν=(r1)(c1)\nu=(r-1)(c-1), where rr and cc are the numbers of rows and columns. No classes are to be pooled: every expected frequency in this table is at least 55. Yates' continuity correction must be applied, so the test statistic is χcalc2=(OE0.5)2E\chi^2_{\text{calc}}=\sum\frac{(|O-E|-0.5)^2}{E}. Expected frequencies are to be used exactly (they must not be rounded before being used) and every numerical answer is to be given to 33 decimal places. The test is carried out at the 10%10\% significance level and H0H_0 is rejected if and only if χcalc2>χcrit2\chi^2_{\text{calc}}>\chi^2_{\text{crit}} (a strict inequality). Which of the following correctly states the number of degrees of freedom, the value of the test statistic, the critical value and the conclusion of this test in context?
Show worked solution

Worked solution

  1. State the hypotheses

    H0:the two factors are independentH1:the two factors are not independentH_0:\text{the two factors are independent}\quad H_1:\text{the two factors are not independent}

    A chi-squared test always tests a model against the alternative that the model is wrong.

  2. State the model of independence

    Eij=Ri×CjTE_{ij}=\frac{R_i\times C_j}{T}

    Under H0H_0 the two factors are independent, which fixes every expected frequency.

  3. Find the expected frequency for row 1, column 1

    E11=50×57100=28.5000E_{11}=\frac{50\times57}{100}=28.5000

    Independence gives E=(row total)×(column total)grand totalE=\frac{(\text{row total})\times(\text{column total})}{\text{grand total}}.

  4. Find the expected frequency for row 1, column 2

    E12=50×43100=21.5000E_{12}=\frac{50\times43}{100}=21.5000

    Independence gives E=(row total)×(column total)grand totalE=\frac{(\text{row total})\times(\text{column total})}{\text{grand total}}.

  5. Find the expected frequency for row 2, column 1

    E21=50×57100=28.5000E_{21}=\frac{50\times57}{100}=28.5000

    Independence gives E=(row total)×(column total)grand totalE=\frac{(\text{row total})\times(\text{column total})}{\text{grand total}}.

  6. Find the expected frequency for row 2, column 2

    E22=50×43100=21.5000E_{22}=\frac{50\times43}{100}=21.5000

    Independence gives E=(row total)×(column total)grand totalE=\frac{(\text{row total})\times(\text{column total})}{\text{grand total}}.

  7. Check that the expected frequencies sum to the observed total

    E=100.000=100=O\sum E=100.000=100=\sum O

    This confirms that no arithmetic slip has been made.

  8. Check the pooling rule

    miniEi=21.50005    no pooling\min_i E_i=21.5000\ge5\;\Rightarrow\;\text{no pooling}

    Every expected frequency is at least 55, so no classes are combined.

  9. Find the number of degrees of freedom

    ν=(21)(21)=1\nu=(2-1)(2-1)=1

    For a contingency table ν=(r1)(c1)\nu=(r-1)(c-1).

  10. Find the contribution of row 1, column 1

    (2228.50000.5)228.5000=1.2632\frac{(|22-28.5000|-0.5)^2}{28.5000}=1.2632

    Each cell contributes to the test statistic.

  11. Find the contribution of row 1, column 2

    (2821.50000.5)221.5000=1.6744\frac{(|28-21.5000|-0.5)^2}{21.5000}=1.6744

    Each cell contributes to the test statistic.

  12. Find the contribution of row 2, column 1

    (3528.50000.5)228.5000=1.2632\frac{(|35-28.5000|-0.5)^2}{28.5000}=1.2632

    Each cell contributes to the test statistic.

  13. Find the contribution of row 2, column 2

    (1521.50000.5)221.5000=1.6744\frac{(|15-21.5000|-0.5)^2}{21.5000}=1.6744

    Each cell contributes to the test statistic.

  14. Add the contributions

    χcalc2=1.2632+1.6744+1.2632+1.6744=5.875\chi^2_{\text{calc}}=1.2632+1.6744+1.2632+1.6744=5.875

    This is the value of the test statistic, to 33 decimal places.

  15. Find the critical value

    χcrit2=χ0.12(1)=2.706\chi^2_{\text{crit}}=\chi^2_{0.1}(1)=2.706

    This is the upper 10\% point of the chi-squared distribution with ν=1\nu=1.

  16. Compare the statistic with the critical value

    5.875>2.7065.875>2.706

    H0H_0 is rejected if and only if χcalc2>χcrit2\chi^2_{\text{calc}}>\chi^2_{\text{crit}}.

  17. Recall the chi-squared test statistic

    χcalc2=(OE)2E\chi^2_{\text{calc}}=\sum\frac{(O-E)^2}{E}

    Each class contributes (OE)2E\frac{(O-E)^2}{E}, so the statistic is never negative.

  18. Select the correct conclusion in context

    reject H0; there is evidence at the 10% level of an association between seeing the advert and buying the product\text{reject }H_0\text{; there is evidence at the 10\% level of an association between seeing the advert and buying the product}

    The conclusion must be stated in the context of the question.

Answer
ν=1,  χcalc2=5.875,  χcrit2=2.706,  so χcalc2>χcrit2: reject H0; there is evidence at the 10% level of an association between seeing the advert and buying the product\nu=1,\;\chi^2_{\text{calc}}=5.875,\;\chi^2_{\text{crit}}=2.706,\;\text{so }\chi^2_{\text{calc}}>\chi^2_{\text{crit}}\text{: reject }H_0\text{; there is evidence at the 10\% level of an association between seeing the advert and buying the product}
Question 3
9 markschallenging
A study of 190190 households records the type of area they live in and their level of car use. The results are given in the contingency table.  LowMediumHighTown252015Suburb183022Village121830\begin{array}{l|ccc}\text{ } & \text{Low} & \text{Medium} & \text{High}\\\hline\text{Town} & 25 & 20 & 15\\\text{Suburb} & 18 & 30 & 22\\\text{Village} & 12 & 18 & 30\end{array} The data form a contingency table. Under H0H_0 the two factors are independent; under H1H_1 they are not independent. Expected frequencies are found from E=(row total)×(column total)grand totalE=\frac{(\text{row total})\times(\text{column total})}{\text{grand total}} and the number of degrees of freedom is ν=(r1)(c1)\nu=(r-1)(c-1), where rr and cc are the numbers of rows and columns. No classes are to be pooled: every expected frequency in this table is at least 55. Yates' continuity correction does not apply to a table of this size, so the test statistic is χcalc2=(OE)2E\chi^2_{\text{calc}}=\sum\frac{(O-E)^2}{E}. Expected frequencies are to be used exactly (they must not be rounded before being used) and every numerical answer is to be given to 33 decimal places. The test is carried out at the 5%5\% significance level and H0H_0 is rejected if and only if χcalc2>χcrit2\chi^2_{\text{calc}}>\chi^2_{\text{crit}} (a strict inequality). Which of the following correctly states the number of degrees of freedom, the value of the test statistic, the critical value and the conclusion of this test in context?
Show worked solution

Worked solution

  1. State the hypotheses

    H0:the two factors are independentH1:the two factors are not independentH_0:\text{the two factors are independent}\quad H_1:\text{the two factors are not independent}

    A chi-squared test always tests a model against the alternative that the model is wrong.

  2. State the model of independence

    Eij=Ri×CjTE_{ij}=\frac{R_i\times C_j}{T}

    Under H0H_0 the two factors are independent, which fixes every expected frequency.

  3. Find every expected frequency

    E11=17.3684,  E12=21.4737,  E13=21.1579,  E21=20.2632,  E22=25.0526,  E23=24.6842,  E31=17.3684,  E32=21.4737,  E33=21.1579E_{11}=17.3684,\;E_{12}=21.4737,\;E_{13}=21.1579,\;E_{21}=20.2632,\;E_{22}=25.0526,\;E_{23}=24.6842,\;E_{31}=17.3684,\;E_{32}=21.4737,\;E_{33}=21.1579

    Each expected frequency is (row total)(column total)/(grand total).

  4. Check that the expected frequencies sum to the observed total

    E=190.000=190=O\sum E=190.000=190=\sum O

    This confirms that no arithmetic slip has been made.

  5. Check the pooling rule

    miniEi=17.36845    no pooling\min_i E_i=17.3684\ge5\;\Rightarrow\;\text{no pooling}

    Every expected frequency is at least 55, so no classes are combined.

  6. Find the number of degrees of freedom

    ν=(31)(31)=4\nu=(3-1)(3-1)=4

    For a contingency table ν=(r1)(c1)\nu=(r-1)(c-1).

  7. Find the contribution of every cell

    3.3533+0.1011+1.7922+0.2528+0.9770+0.2919+1.6593+0.5619+3.6952    χcalc2=12.6853.3533+0.1011+1.7922+0.2528+0.9770+0.2919+1.6593+0.5619+3.6952\;\Rightarrow\;\chi^2_{\text{calc}}=12.685

    The test statistic is the sum of the contributions of all the cells.

  8. Add the contributions

    χcalc2=3.3533+0.1011+1.7922+0.2528+0.9770+0.2919+1.6593+0.5619+3.6952=12.685\chi^2_{\text{calc}}=3.3533+0.1011+1.7922+0.2528+0.9770+0.2919+1.6593+0.5619+3.6952=12.685

    This is the value of the test statistic, to 33 decimal places.

  9. Find the critical value

    χcrit2=χ0.052(4)=9.488\chi^2_{\text{crit}}=\chi^2_{0.05}(4)=9.488

    This is the upper 5\% point of the chi-squared distribution with ν=4\nu=4.

  10. Compare the statistic with the critical value

    12.685>9.48812.685>9.488

    H0H_0 is rejected if and only if χcalc2>χcrit2\chi^2_{\text{calc}}>\chi^2_{\text{crit}}.

  11. Recall the chi-squared test statistic

    χcalc2=(OE)2E\chi^2_{\text{calc}}=\sum\frac{(O-E)^2}{E}

    Each class contributes (OE)2E\frac{(O-E)^2}{E}, so the statistic is never negative.

  12. Recall the pooling rule

    Ei5 for every class used in the testE_i\ge5\text{ for every class used in the test}

    Classes are combined with their neighbour towards the tail until this holds.

  13. Recall the degrees-of-freedom rule for a goodness-of-fit test

    ν=k1m\nu=k-1-m

    Here kk is the number of classes AFTER pooling and mm the number of parameters estimated from the data.

  14. Recall the degrees-of-freedom rule for a contingency table

    ν=(r1)(c1)\nu=(r-1)(c-1)

    The row and column totals are fixed, which removes r+c1r+c-1 degrees of freedom.

  15. Recall the expected frequency in a contingency table

    Eij=Ri×CjTE_{ij}=\frac{R_i\times C_j}{T}

    This is the frequency predicted by independence of the two factors.

  16. Recall Yates' continuity correction

    χcalc2=(OE0.5)2E\chi^2_{\text{calc}}=\sum\frac{(|O-E|-0.5)^2}{E}

    The correction is only ever used for a 2×22\times2 contingency table.

  17. Select the correct conclusion in context

    reject H0; there is evidence at the 5% level of an association between the type of area and the level of car use\text{reject }H_0\text{; there is evidence at the 5\% level of an association between the type of area and the level of car use}

    The conclusion must be stated in the context of the question.

Answer
ν=4,  χcalc2=12.685,  χcrit2=9.488,  so χcalc2>χcrit2: reject H0; there is evidence at the 5% level of an association between the type of area and the level of car use\nu=4,\;\chi^2_{\text{calc}}=12.685,\;\chi^2_{\text{crit}}=9.488,\;\text{so }\chi^2_{\text{calc}}>\chi^2_{\text{crit}}\text{: reject }H_0\text{; there is evidence at the 5\% level of an association between the type of area and the level of car use}
Question 4
9 markschallenging
The number of goals scored in each of 250250 football matches is recorded. The observed frequencies are given in the table. Number of goals0123456Observed frequency297081452050\begin{array}{c|ccccccc}\text{Number of goals} & 0 & 1 & 2 & 3 & 4 & 5 & \ge 6\\\hline\text{Observed frequency} & 29 & 70 & 81 & 45 & 20 & 5 & 0\end{array} Under H0H_0 the number of events XX follows a Poisson distribution Po(λ)\mathrm{Po}(\lambda), where λ\lambda is estimated from the sample by the sample mean λ^=xˉ\hat{\lambda}=\bar{x}; no observation falls in the class 6\ge 6, so xˉ\bar{x} is found exactly from the table. One degree of freedom is therefore lost for this estimated parameter. Any class whose expected frequency is less than 55 must be pooled with the adjacent class nearer the tail of the distribution, repeatedly, until every expected frequency is at least 55; the tail is pooled first. The number of degrees of freedom is ν=(number of classes after pooling)1(number of parameters estimated from the data)\nu=(\text{number of classes after pooling})-1-(\text{number of parameters estimated from the data}). Expected frequencies are to be used exactly (they must not be rounded before being used) and every numerical answer is to be given to 33 decimal places. The test is carried out at the 1%1\% significance level and H0H_0 is rejected if and only if χcalc2>χcrit2\chi^2_{\text{calc}}>\chi^2_{\text{crit}} (a strict inequality). Which of the following correctly states the number of degrees of freedom, the value of the test statistic, the critical value and the conclusion of this test in context?
Show worked solution

Worked solution

  1. State the hypotheses

    H0:the model fits the dataH1:the model does not fit the dataH_0:\text{the model fits the data}\quad H_1:\text{the model does not fit the data}

    The stated model is the null hypothesis for a goodness-of-fit test.

  2. Estimate λ\lambda from the sample

    λ^=xˉ=472250=1.888\hat{\lambda}=\bar{x}=\frac{472}{250}=1.888

    The parameter is estimated from the data, so one degree of freedom is lost.

  3. Find every expected frequency

    E1=37.8436,  E2=71.4486,  E3=67.4475,  E4=42.4470,  E5=20.0350,  E6=7.5652,  E7=3.2131E_{1}=37.8436,\;E_{2}=71.4486,\;E_{3}=67.4475,\;E_{4}=42.4470,\;E_{5}=20.0350,\;E_{6}=7.5652,\;E_{7}=3.2131

    Each expected frequency is the sample size multiplied by the model probability.

  4. Check that the expected frequencies sum to the observed total

    E=250.000=250=O\sum E=250.000=250=\sum O

    This confirms that no arithmetic slip has been made.

  5. Pool the classes whose expected frequency is below 55

    classes 0,  1,  2,  3,  4,  5,  6    0,  1,  2,  3,  4,  5\text{classes }0,\;1,\;2,\;3,\;4,\;5,\;\ge 6\;\Rightarrow\;0,\;1,\;2,\;3,\;4,\;\ge 5

    Merging from the tail inwards leaves 6 classes, each with E5E\ge5.

  6. Find the number of degrees of freedom

    ν=611=4\nu=6-1-1=4

    There are 6 classes after pooling and 1 parameter estimated from the data.

  7. Find the contribution of every class

    2.0666+0.0294+2.7231+0.1536+0.0001+3.0978    χcalc2=8.0712.0666+0.0294+2.7231+0.1536+0.0001+3.0978\;\Rightarrow\;\chi^2_{\text{calc}}=8.071

    The test statistic is the sum of the contributions of the pooled classes.

  8. Add the contributions

    χcalc2=2.0666+0.0294+2.7231+0.1536+0.0001+3.0978=8.071\chi^2_{\text{calc}}=2.0666+0.0294+2.7231+0.1536+0.0001+3.0978=8.071

    This is the value of the test statistic, to 33 decimal places.

  9. Find the critical value

    χcrit2=χ0.012(4)=13.277\chi^2_{\text{crit}}=\chi^2_{0.01}(4)=13.277

    This is the upper 1\% point of the chi-squared distribution with ν=4\nu=4.

  10. Compare the statistic with the critical value

    8.07113.2778.071\le13.277

    H0H_0 is rejected if and only if χcalc2>χcrit2\chi^2_{\text{calc}}>\chi^2_{\text{crit}}.

  11. Recall the chi-squared test statistic

    χcalc2=(OE)2E\chi^2_{\text{calc}}=\sum\frac{(O-E)^2}{E}

    Each class contributes (OE)2E\frac{(O-E)^2}{E}, so the statistic is never negative.

  12. Recall the pooling rule

    Ei5 for every class used in the testE_i\ge5\text{ for every class used in the test}

    Classes are combined with their neighbour towards the tail until this holds.

  13. Recall the degrees-of-freedom rule for a goodness-of-fit test

    ν=k1m\nu=k-1-m

    Here kk is the number of classes AFTER pooling and mm the number of parameters estimated from the data.

  14. Recall the degrees-of-freedom rule for a contingency table

    ν=(r1)(c1)\nu=(r-1)(c-1)

    The row and column totals are fixed, which removes r+c1r+c-1 degrees of freedom.

  15. Recall the expected frequency in a contingency table

    Eij=Ri×CjTE_{ij}=\frac{R_i\times C_j}{T}

    This is the frequency predicted by independence of the two factors.

  16. Select the correct conclusion in context

    do not reject H0; there is insufficient evidence at the 1% level that a Poisson model is a poor fit for the number of goals\text{do not reject }H_0\text{; there is insufficient evidence at the 1\% level that a Poisson model is a poor fit for the number of goals}

    The conclusion must be stated in the context of the question.

Answer
ν=4,  χcalc2=8.071,  χcrit2=13.277,  so χcalc2χcrit2: do not reject H0; there is insufficient evidence at the 1% level that a Poisson model is a poor fit for the number of goals\nu=4,\;\chi^2_{\text{calc}}=8.071,\;\chi^2_{\text{crit}}=13.277,\;\text{so }\chi^2_{\text{calc}}\le\chi^2_{\text{crit}}\text{: do not reject }H_0\text{; there is insufficient evidence at the 1\% level that a Poisson model is a poor fit for the number of goals}
Question 5
9 markschallenging
The number of customers entering a shop in each of 200200 one-minute intervals is recorded. The observed frequencies are given in the table. Number of customers0123456Observed frequency205058482040\begin{array}{c|ccccccc}\text{Number of customers} & 0 & 1 & 2 & 3 & 4 & 5 & \ge 6\\\hline\text{Observed frequency} & 20 & 50 & 58 & 48 & 20 & 4 & 0\end{array} Under H0H_0 the number of events XX follows a Poisson distribution Po(λ)\mathrm{Po}(\lambda), where λ\lambda is estimated from the sample by the sample mean λ^=xˉ\hat{\lambda}=\bar{x}; no observation falls in the class 6\ge 6, so xˉ\bar{x} is found exactly from the table. One degree of freedom is therefore lost for this estimated parameter. Any class whose expected frequency is less than 55 must be pooled with the adjacent class nearer the tail of the distribution, repeatedly, until every expected frequency is at least 55; the tail is pooled first. The number of degrees of freedom is ν=(number of classes after pooling)1(number of parameters estimated from the data)\nu=(\text{number of classes after pooling})-1-(\text{number of parameters estimated from the data}). Expected frequencies are to be used exactly (they must not be rounded before being used) and every numerical answer is to be given to 33 decimal places. The test is carried out at the 5%5\% significance level and H0H_0 is rejected if and only if χcalc2>χcrit2\chi^2_{\text{calc}}>\chi^2_{\text{crit}} (a strict inequality). Which of the following correctly states the number of degrees of freedom, the value of the test statistic, the critical value and the conclusion of this test in context?
Show worked solution

Worked solution

  1. State the hypotheses

    H0:the model fits the dataH1:the model does not fit the dataH_0:\text{the model fits the data}\quad H_1:\text{the model does not fit the data}

    The stated model is the null hypothesis for a goodness-of-fit test.

  2. Estimate λ\lambda from the sample

    λ^=xˉ=410200=2.05\hat{\lambda}=\bar{x}=\frac{410}{200}=2.05

    The parameter is estimated from the data, so one degree of freedom is lost.

  3. Find every expected frequency

    E1=25.7470,  E2=52.7813,  E3=54.1008,  E4=36.9689,  E5=18.9466,  E6=7.7681,  E7=3.6873E_{1}=25.7470,\;E_{2}=52.7813,\;E_{3}=54.1008,\;E_{4}=36.9689,\;E_{5}=18.9466,\;E_{6}=7.7681,\;E_{7}=3.6873

    Each expected frequency is the sample size multiplied by the model probability.

  4. Check that the expected frequencies sum to the observed total

    E=200.000=200=O\sum E=200.000=200=\sum O

    This confirms that no arithmetic slip has been made.

  5. Pool the classes whose expected frequency is below 55

    classes 0,  1,  2,  3,  4,  5,  6    0,  1,  2,  3,  4,  5\text{classes }0,\;1,\;2,\;3,\;4,\;5,\;\ge 6\;\Rightarrow\;0,\;1,\;2,\;3,\;4,\;\ge 5

    Merging from the tail inwards leaves 6 classes, each with E5E\ge5.

  6. Find the number of degrees of freedom

    ν=611=4\nu=6-1-1=4

    There are 6 classes after pooling and 1 parameter estimated from the data.

  7. Find the contribution of every class

    1.2828+0.1466+0.2810+3.2915+0.0586+4.8521    χcalc2=9.9131.2828+0.1466+0.2810+3.2915+0.0586+4.8521\;\Rightarrow\;\chi^2_{\text{calc}}=9.913

    The test statistic is the sum of the contributions of the pooled classes.

  8. Add the contributions

    χcalc2=1.2828+0.1466+0.2810+3.2915+0.0586+4.8521=9.913\chi^2_{\text{calc}}=1.2828+0.1466+0.2810+3.2915+0.0586+4.8521=9.913

    This is the value of the test statistic, to 33 decimal places.

  9. Find the critical value

    χcrit2=χ0.052(4)=9.488\chi^2_{\text{crit}}=\chi^2_{0.05}(4)=9.488

    This is the upper 5\% point of the chi-squared distribution with ν=4\nu=4.

  10. Compare the statistic with the critical value

    9.913>9.4889.913>9.488

    H0H_0 is rejected if and only if χcalc2>χcrit2\chi^2_{\text{calc}}>\chi^2_{\text{crit}}.

  11. Recall the chi-squared test statistic

    χcalc2=(OE)2E\chi^2_{\text{calc}}=\sum\frac{(O-E)^2}{E}

    Each class contributes (OE)2E\frac{(O-E)^2}{E}, so the statistic is never negative.

  12. Recall the pooling rule

    Ei5 for every class used in the testE_i\ge5\text{ for every class used in the test}

    Classes are combined with their neighbour towards the tail until this holds.

  13. Recall the degrees-of-freedom rule for a goodness-of-fit test

    ν=k1m\nu=k-1-m

    Here kk is the number of classes AFTER pooling and mm the number of parameters estimated from the data.

  14. Recall the degrees-of-freedom rule for a contingency table

    ν=(r1)(c1)\nu=(r-1)(c-1)

    The row and column totals are fixed, which removes r+c1r+c-1 degrees of freedom.

  15. Select the correct conclusion in context

    reject H0; there is evidence at the 5% level that a Poisson model is not a good fit for the number of customers\text{reject }H_0\text{; there is evidence at the 5\% level that a Poisson model is not a good fit for the number of customers}

    The conclusion must be stated in the context of the question.

Answer
ν=4,  χcalc2=9.913,  χcrit2=9.488,  so χcalc2>χcrit2: reject H0; there is evidence at the 5% level that a Poisson model is not a good fit for the number of customers\nu=4,\;\chi^2_{\text{calc}}=9.913,\;\chi^2_{\text{crit}}=9.488,\;\text{so }\chi^2_{\text{calc}}>\chi^2_{\text{crit}}\text{: reject }H_0\text{; there is evidence at the 5\% level that a Poisson model is not a good fit for the number of customers}

Unlock 29 more Chi-squared tests questions

Create a free account to work through every Further Maths Chi-squared tests question with instant step-by-step worked solutions, progress tracking and interactive lessons.

  • Full worked solutions for every question
  • Interactive lessons and instant feedback
  • Track your mastery across every topic
Create a Free Account

No card required · Free forever

More Chi-squared tests practice

Related Statistics topics