Further Statistics: Chi-Squared Tests (Goodness of Fit and Contingency Tables) - Worksheets, Questions and Revision

12 original exam-style questions - 8 pages of questions with a full mark scheme - free printable PDF.

Download PDFJump to mark scheme (page 9)
« Previous: Further Statistics: Poisson and Geometric DistributionsNext: Further Statistics: Hypothesis Testing, Type I and Type II Errors »
Revision Library
revisionlibrary.co.uk
A-Level · Further Statistics 1 (Chi-Squared Tests)

FP.FS3 Further Statistics: Chi-Squared Tests (Goodness of Fit and Contingency Tables)

AQA 7367 · Calculator allowed · about 180 minutes
Total Marks
Name: _______________________________    Date: ____ / ____ / ______
Answer ALL questions. Show all your working.

Key facts: chi-squared tests

Original content written for Revision Library.

A chi-squared test compares observed frequencies O with the expected frequencies E predicted by a proposed model, using the test statistic X^2 = sum of (O - E)^2 / E, calculated over all classes (or cells) after any pooling. For a goodness-of-fit test to a fully specified distribution (for example a uniform distribution, or given proportions), degrees of freedom = (number of classes) - 1. If one or more parameters of the model (for example p for a binomial, or the mean for a Poisson) are estimated from the same sample used in the test, one further degree of freedom is lost for each parameter estimated. For an r by c contingency table testing independence between two variables, expected frequencies are E = (row total * column total) / grand total, and degrees of freedom = (r - 1)(c - 1). Classes with an expected frequency below 5 should be pooled (combined with a neighbouring class) before the test statistic is calculated, reducing the number of classes, and hence the degrees of freedom, accordingly. For any test with 1 degree of freedom, including every 2 by 2 contingency table, Yates' continuity correction is applied: X^2 = sum of (|O - E| - 0.5)^2 / E. The calculated test statistic is compared with the critical value from chi-squared tables at the chosen significance level and the stated degrees of freedom; if the test statistic exceeds the critical value, the null hypothesis is rejected.

1
For each scenario below, state the number of degrees of freedom that should be used in the chi-squared test described, giving a brief reason for your answer. You are not required to state hypotheses or carry out any calculations.
(a)A six-sided spinner is spun 120 times to test whether each of the six outcomes is equally likely.(2)
(b)The number of accidents per week at a road junction is recorded for 80 weeks, to test whether it follows a Poisson distribution, with the mean estimated from the same sample. After pooling classes with small expected frequencies, 6 classes remain in total.(2)
(c)A 4 by 3 contingency table is used to test whether a person's favourite sport is associated with their year group.(2)
(d)The number of faulty items in independent samples of 8 items is tested against a binomial model B(8, p), where p is estimated from the data. After pooling classes with small expected frequencies, 5 classes remain in total.(2)
(Total for Question 1 is 8 marks)
2
At a summer fair in Bristol, a stallholder uses a spinner with six equal sectors, numbered 1 to 6, for a prize game. Some visitors suspect the spinner is biased. Over the course of the day the spinner is spun 180 times, with the results recorded below.

Score 1: 25 spins. Score 2: 34 spins. Score 3: 28 spins. Score 4: 32 spins. Score 5: 22 spins. Score 6: 39 spins.
(a)State suitable null and alternative hypotheses for a test of whether the spinner is fair.(2)
(b)State the expected frequency for each score under H0, and calculate the value of the chi-squared test statistic.(3)
(c)State the number of degrees of freedom and the critical value at the 5% significance level, and hence test, at the 5% level, whether the spinner is fair. State your conclusion clearly, in context.(3)
(Total for Question 2 is 8 marks)
3
National figures suggest that a randomly chosen child is equally likely to be a boy or a girl, independently of other children in the family. Amir, a statistics student, surveys 200 randomly chosen households in Leeds that each have exactly 4 children, and records X, the number of boys in each household. His results are shown below.

Number of boys (X): 0, 1, 2, 3, 4. Frequency: 10, 54, 80, 46, 10.
(a)Using the national figure that a child is equally likely to be a boy or a girl, state suitable hypotheses to test whether X follows a binomial distribution.(2)
(b)Show that P(X=2) = 0.375, and hence state the expected frequency of each value of X in a sample of 200 households.(3)
(c)Calculate the value of the chi-squared test statistic.(2)
(d)Explain why this test has 4 degrees of freedom, state the critical value at the 5% significance level, and test whether the binomial model is a good fit. State your conclusion clearly, in context.(3)
(Total for Question 3 is 10 marks)
4
A bakery in York claims that its daily sales split across four product types, cakes, pastries, bread and biscuits, in the ratio 4:3:2:1. On a randomly chosen day, 200 items are sold, with the following breakdown.

Cakes: 70. Pastries: 64. Bread: 44. Biscuits: 22.
(a)State suitable null and alternative hypotheses to test the bakery's claim.(2)
(b)Find the expected number of each product type sold, based on the claimed ratio.(2)
(c)Calculate the chi-squared test statistic.(2)
(d)State the number of degrees of freedom, explaining your answer, and the critical value at the 5% significance level. Hence test the bakery's claim, stating your conclusion clearly, in context.(3)
(Total for Question 4 is 9 marks)
5
A GP surgery in Cardiff investigates whether there is an association between having a flu vaccine and catching flu during the winter, among 160 randomly chosen patients. The results are shown in the table below.

Vaccinated: caught flu 18, did not catch flu 72, row total 90.
Not vaccinated: caught flu 22, did not catch flu 48, row total 70.
Column totals: caught flu 40, did not catch flu 120, grand total 160.
(a)State suitable null and alternative hypotheses for this test.(2)
(b)Show that the expected frequency for vaccinated patients who caught flu is 22.5, and complete the expected frequency table.(3)
(c)Explain why Yates' continuity correction should be used in this test, and calculate the value of chi-squared with the correction applied.(5)
(d)State the number of degrees of freedom and the critical value at the 5% significance level, and test whether there is an association between vaccination and catching flu. State your conclusion clearly, in context.(3)
(Total for Question 5 is 13 marks)
6
When carrying out a chi-squared test, classes with a small expected frequency are sometimes combined ('pooled') with a neighbouring class before the test statistic is calculated.
(a)State the usual condition used to decide whether an expected frequency is too small and pooling is required.(1)
(b)Explain the effect that pooling two classes into one has on the number of degrees of freedom used in the test.(1)
(c)A goodness-of-fit test for a Poisson distribution initially uses 7 classes. After pooling classes with expected frequency below 5, 5 classes remain in total. The mean of the Poisson distribution was estimated from the sample data. State the number of degrees of freedom used in the test.(2)
(d)State two conditions, other than the expected frequency condition, that should hold for a chi-squared test to be valid.(2)
(Total for Question 6 is 6 marks)
7
A factory inspects lightbulbs in boxes of 5 for defects. Over a period of production, 180 boxes are sampled, and X, the number of defective bulbs in each box, is recorded. The total number of defective bulbs found across all 180 boxes is 150. The factory wants to test whether X follows a binomial distribution B(5, p), with p estimated from the data.

Number of defective bulbs (X): 0, 1, 2, 3, 4, 5. Frequency: 77, 67, 27, 7, 2, 0.
(a)State suitable null and alternative hypotheses for this test.(2)
(b)Show that an estimate for p, the probability that a bulb is defective, is 1/6, and find P(X=2), giving your answer to 4 decimal places.(4)
(c)Using p = 1/6, find the expected frequency for each value of X, giving each to 3 decimal places.(2)
(d)Explain why pooling is required, and give the pooled observed and expected frequency tables.(3)
(e)Calculate the chi-squared test statistic for the pooled data.(2)
(f)State the number of degrees of freedom, explaining your reasoning, the critical value at the 5% significance level, and test whether the binomial model is a good fit. State your conclusion clearly, in context.(3)
(Total for Question 7 is 16 marks)
8
A quality inspector at a car windscreen manufacturer records X, the number of scratches found on each of a sample of 100 windscreens, to test whether X can be modelled by a Poisson distribution, with the mean estimated from the data.

Number of scratches (X): 0, 1, 2, 3, 4, 5. Frequency: 22, 34, 25, 12, 5, 2.

No windscreen in the sample had more than 5 scratches, but since a Poisson distribution allows any non-negative integer value, the final class should be treated as 'X ≥ 5' when finding expected frequencies from the model.
(a)Calculate the mean number of scratches per windscreen for this sample.(2)
(b)Using this mean, find P(X=3) for a Poisson distribution, giving your answer to 4 decimal places, and state the expected frequency for X=3 in the sample of 100 windscreens.(3)
(c)The expected frequencies for X = 0, 1, 2 and 4 are 22.313, 33.470, 25.102 and 4.707 respectively (to 3 dp), and P(X≥5) gives an expected frequency of 1.858. Explain why pooling is required, and give the pooled observed and expected frequency tables.(3)
(d)Calculate the chi-squared test statistic for the pooled data.(2)
(e)State the number of degrees of freedom, explaining your reasoning, and the critical value at the 5% significance level. Hence test whether a Poisson distribution is a suitable model, stating your conclusion clearly, in context.(3)
(f)The value of the test statistic found in part (d) is very small. Comment briefly on what this suggests about the fit of the Poisson model, and suggest one reason, other than chance, why an unusually small chi-squared value might sometimes arise in practice.(2)
(Total for Question 8 is 15 marks)
9
A college in Manchester surveys 240 A-level students about their preferred revision method (flashcards, past papers or online videos), grouped by subject area (STEM, Humanities or Arts). Some results are shown in the table below, where a and b represent two missing values.

STEM: flashcards 24, past papers 56, online videos a, row total 120.
Humanities: flashcards 18, past papers 30, online videos 12, row total 60.
Arts: flashcards b, past papers 14, online videos 28, row total 60.
Column totals: flashcards 60, past papers 100, online videos 80, grand total 240.
(a)Find the values of a and b.(2)
(b)State suitable null and alternative hypotheses for a test of association between subject area and preferred revision method.(2)
(c)Show that the expected frequency for Humanities students who prefer online videos is 20, and complete the expected frequency table.(3)
(d)Calculate the chi-squared test statistic.(3)
(e)State the degrees of freedom, and the critical values at the 5% and 1% significance levels. Hence state, with a reason, the strongest conclusion that can be drawn from this test.(3)
(f)By comparing observed and expected frequencies, identify the subject area and revision method combination that contributes most to the value of chi-squared, and briefly describe how its observed frequency differs from what would be expected under independence.(2)
(Total for Question 9 is 15 marks)
10
A students' union at a university in Sheffield investigates whether attending an exam workshop is associated with passing a resit exam, among 120 students. The results are shown below.

Attended workshop: passed resit 42, failed resit 18, row total 60.
Did not attend: passed resit 24, failed resit 36, row total 60.
Column totals: passed resit 66, failed resit 54, grand total 120.
(a)State suitable null and alternative hypotheses for this test.(2)
(b)Show that the expected frequency for students who attended the workshop and passed the resit is 33, and complete the expected frequency table.(3)
(c)Calculate the chi-squared test statistic, applying Yates' continuity correction.(3)
(d)State the number of degrees of freedom, and determine the lowest of the standard significance levels (10%, 5%, 1%) at which the null hypothesis would be rejected.(3)
(e)State your conclusion in context, and give one reason why this result does not necessarily mean that attending the workshop causes students to pass the resit.(2)
(Total for Question 10 is 13 marks)
11
A cafe in Norwich records the number of coffees sold in each of four two-hour periods during a working day, over a sample of 180 coffees sold in total, to test whether sales are uniformly distributed across the four periods.

Period 1 (8am-10am): 38. Period 2 (10am-12pm): 52. Period 3 (12pm-2pm): 61. Period 4 (2pm-4pm): 29.

Critical values for chi-squared with 3 degrees of freedom: 10% level 6.251; 5% level 7.815; 2.5% level 9.348; 1% level 11.345; 0.1% level 16.266.
(a)State suitable null and alternative hypotheses for this test.(2)
(b)State the expected number of coffees sold in each period under H0, and calculate the chi-squared test statistic.(3)
(c)Using the critical values given, state the range within which the p-value of this test lies, justifying your answer.(2)
(d)Hence state your conclusion at the 1% significance level, in the context of this question.(2)
(Total for Question 11 is 9 marks)
12
A factory in Coventry making phone cases records the type of defect found on faulty items over two shifts, Day and Night, across 200 faulty items in total. Defects are classified as Scratch, Crack, Discolour or Misalign.

Day: Scratch 34, Crack 28, Discolour 16, Misalign 22, row total 100.
Night: Scratch 25, Crack 31, Discolour 25, Misalign 19, row total 100.
Column totals: Scratch 59, Crack 59, Discolour 41, Misalign 41, grand total 200.
(a)State suitable null and alternative hypotheses to test whether defect type is associated with shift.(2)
(b)Show that the expected frequency for Day-shift Scratch defects is 29.5, and complete the expected frequency table.(3)
(c)Calculate the chi-squared test statistic for this test of association.(2)
(d)State the number of degrees of freedom and the critical value at the 5% significance level, and test whether defect type is associated with shift. State your conclusion clearly, in context.(3)
(e)The QA manager separately claims that, overall (combining both shifts), the four defect types should occur in the ratio 3:3:2:2 (Scratch:Crack:Discolour:Misalign). Using the column totals from the table, test this claim at the 5% significance level. State your hypotheses, expected frequencies, test statistic, degrees of freedom and conclusion.(6)
(f)Explain why the result of the test in part (e) cannot, by itself, tell us whether defect type is associated with shift.(2)
(Total for Question 12 is 18 marks)
Mark scheme · FP.FS3 Further Statistics: Chi-Squared Tests (Goodness of Fit and Contingency Tables)

Question 1

Question 2

Question 3

Question 4

Question 5

Question 6

Question 7

Question 8

Question 9

Question 10

Question 11

Question 12