Revision Library

Further Statistics: Hypothesis Testing and Chi-Squared Depth - Worksheets, Questions and Revision

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

Download PDFJump to mark scheme (page 10)Read the revision guide
« Previous: Further Statistics: Discrete Distributions Depth
Revision Library
revisionlibrary.co.uk
A-Level · Further Statistics (Hypothesis Testing and Chi-Squared Depth: Goodness of Fit, Contingency Tables, Type I/II Errors)

FP.FS6 Further Statistics: Hypothesis Testing and Chi-Squared Depth

EDEXCEL 9FM0 · Calculator allowed · about 140 minutes
Total Marks
Name: _______________________________    Date: ____ / ____ / ______
Answer ALL questions. Show all your working.

Key facts: chi-squared tests, in more depth

Original content written for Revision Library.

A chi-squared test compares observed frequencies O with the expected frequencies E predicted by a model, using X^2 = sum of (O-E)^2/E over all classes or cells, after any pooling. For a goodness-of-fit test to a fully specified distribution, df = (number of classes) - 1; if a parameter is estimated from the same sample (for example a Poisson mean, a binomial p, or a geometric p), one further degree of freedom is lost for each parameter estimated, because the estimation process artificially improves the apparent fit. For continuous data grouped into classes, expected frequencies are found from probabilities calculated using the standard Normal distribution, via z = (x - mu)/sigma and the function Phi. For an r by c contingency table testing independence between two categorical variables, E = (row total * column total)/grand total (this follows directly from the multiplication rule P(row and column) = P(row) * P(column) applied to the sample), and df = (r-1)(c-1). Classes or cells with an expected frequency below 5 should be pooled with a neighbouring class or column before the test statistic is calculated, and the degrees of freedom adjusted accordingly. Yates' continuity correction, X^2 = sum of (|O-E| - 0.5)^2/E, is applied only when df = 1 (every 2 by 2 contingency table), since this is the only case where the discrete test statistic is poorly approximated by the continuous chi-squared distribution. The signed standardised residual for a cell, e = (O-E)/sqrt(E), shows the direction as well as the size of a departure from the model, and the sum of its squares reproduces X^2. Because X^2 is never negative, only large (upper-tail) values ever provide evidence against H0; the calculated statistic is compared with the critical value from chi-squared tables at the chosen significance level and the stated degrees of freedom, and H0 is rejected if the statistic exceeds this value. As with any hypothesis test, the significance level equals P(Type I error), reducing it increases P(Type II error) for a fixed sample size, and increasing the sample size generally increases the power of the test; a chi-squared statistic also scales with sample size, so a very large sample can make even a small, unimportant deviation from a model 'statistically significant'. Combining ('pooling') data from distinct groups before testing can also mask or even reverse a genuine association found within each group, an effect known as Simpson's paradox.

1
For each scenario below, state (i) whether a chi-squared goodness-of-fit test or a chi-squared test for association is required, and (ii) the number of degrees of freedom that should be used, giving a brief reason. You are not required to state hypotheses or carry out any calculations.
(a)A tutor at a sixth-form college in Preston rolls what is claimed to be a fair four-sided die 100 times, to test whether each of the four scores is equally likely.(2)
(b)A biologist counts the number of ladybirds, X, found on each of 60 randomly chosen leaves in a garden, and wants to test whether X can be modelled by a Poisson distribution, with the mean estimated from the sample. After combining categories with a small expected frequency, 5 categories remain in total.(2)
(c)A researcher cross-tabulates 150 sixth-formers by whether they are currently studying a language A-level (yes or no) and whether they intend to take a gap year before university (yes or no).(2)
(d)A supermarket records X, the number of attempts a customer needs before their loyalty card scans successfully at a new self-checkout scanner, for a random sample of 90 customers, in order to test whether X can be modelled by a geometric distribution, with p estimated from the sample. After combining the two largest categories, 5 categories remain in total.(2)
(Total for Question 1 is 8 marks)
2
Recall that two discrete random variables X and Y are said to be independent if P(X = x and Y = y) = P(X = x) * P(Y = y) for every possible pair of values x and y (the multiplication rule used, for example, when finding E(XY) for independent variables in FP.FS1).
(a)Explain how the null hypothesis of a chi-squared test for association between two categorical variables is connected to this definition of independence.(2)
(b)For a general 2 by 2 contingency table with row totals R1 and R2, column totals C1 and C2, and grand total n, the sample estimates of the marginal probabilities are P(row 1) = R1/n and P(column 1) = C1/n. Assuming independence, so that P(row 1 and column 1) = P(row 1) * P(column 1), show that the expected frequency for the (row 1, column 1) cell is exactly R1*C1/n, the usual formula E = (row total * column total) / grand total.(2)
(c)A student says: 'If the chi-squared test statistic works out to be exactly 0, the two variables must be perfectly independent.' Comment on whether this statement is accurate.(2)
(Total for Question 2 is 6 marks)
3
When one or more parameters of a hypothesised distribution are estimated from the very same sample that is then used for the goodness-of-fit test, an extra degree of freedom is lost for each parameter estimated.
(a)Explain, in your own words, why estimating a parameter from the sample data (rather than using a value fixed in advance) tends to make the fitted distribution match that sample more closely than it otherwise would, and hence why the degrees of freedom must be reduced to compensate.(3)
(b)A goodness-of-fit test is to be carried out for a Normal distribution N(μ, σ2) using 6 weight classes. State the number of degrees of freedom in each of the following cases: (i) both μ and σ are specified in advance; (ii) μ is specified in advance but σ is estimated from the sample; (iii) both μ and σ are estimated from the sample.(3)
(Total for Question 3 is 6 marks)
4
A supermarket's self-checkout has a loyalty card scanner that sometimes needs more than one attempt before it reads a customer's card successfully. For a random sample of 100 customers, X is the number of attempts needed up to and including the first successful scan. It is suggested that X can be modelled by a geometric distribution, X ~ Geo(p), where p is unknown and is to be estimated from the sample. The results are shown below.

Number of attempts (X): 1, 2, 3, 4, 5 or more.
Frequency: 42, 26, 16, 9, 7.
(a)Show that the mean number of attempts for this sample is 2.13, treating the open category '5 or more' as if it were exactly 5.(2)
(b)Hence show that an estimate for p is 0.4695 (to 4 decimal places), using the fact that E(X) = 1/p for a geometric distribution.(1)
(c)State suitable null and alternative hypotheses for this goodness-of-fit test.(1)
(d)Using p = 0.4695, calculate P(X=1), P(X=2), P(X=3), P(X=4) and P(X ≥ 5), giving each to 4 decimal places.(3)
(e)Calculate the expected frequency for each category, to 2 decimal places.(2)
(f)State the number of degrees of freedom for this test, with a reason.(1)
(g)Calculate the value of the chi-squared test statistic.(2)
(h)Using a 5% significance level and the critical value chi-squared3(0.05) = 7.815, test whether Geo(0.4695) is a suitable model for the number of scan attempts, stating your conclusion in context.(2)
(Total for Question 4 is 14 marks)
5
A manufacturer states that the weight, X grams, of bags of flour it produces can be modelled by X ~ N(1000, 152). A quality inspector weighs a random sample of 200 bags and classifies each into one of five weight classes, obtaining the observed frequencies below.

Weight class: under 985g, 985g up to 995g, 995g up to 1005g, 1005g up to 1015g, 1015g or more.
Observed frequency: 40, 38, 50, 45, 27.
(a)Show that the z-value corresponding to a weight of 985g is -1, and find the z-values corresponding to 995g, 1005g and 1015g.(2)
(b)Hence show that P(X < 985) = 0.1587, and find the probability that a bag falls into each of the other four weight classes, given that Phi(0.3333) = 0.6306.(3)
(c)Calculate the expected frequency for each weight class, to 2 decimal places.(2)
(d)Calculate the value of the chi-squared test statistic.(3)
(e)Using a 5% significance level, state the number of degrees of freedom, the critical value, and your conclusion in context.(2)
(f)The manufacturer's engineer suspects that, although the mean weight is indeed 1000g, the standard deviation may not be exactly 15g and should instead be estimated from the sample. State, with a reason, how the number of degrees of freedom for the test would change.(2)
(Total for Question 5 is 14 marks)
6
A tutoring company in Leicester runs an optional Saturday revision club before a Year 11 mock exam. Of 150 students entered for the mock, the company records whether each student attended the Saturday club and whether they passed the mock. The results are given below.

Attended club: passed 60, did not pass 20, row total 80.
Did not attend: passed 30, did not pass 40, row total 70.
Column totals: passed 90, did not pass 60, grand total 150.
(a)State suitable null and alternative hypotheses for this test.(2)
(b)Calculate the expected frequency for each of the four cells.(2)
(c)Calculate the value of the chi-squared test statistic.(3)
(d)State the number of degrees of freedom for this test. Using the critical values chi-squared1(0.05) = 3.841 and chi-squared1(0.005) = 7.879, test at the 5% significance level and comment on the strength of the evidence found.(2)
(e)Yates' continuity correction is sometimes applied to 2 by 2 contingency tables. State a condition under which it would usually be recommended, and explain why, even without applying it here, you can be confident it would not change the conclusion of this test.(2)
(f)Explain why Yates' continuity correction is only ever applied to chi-squared tests with 1 degree of freedom (that is, 2 by 2 contingency tables), and not to larger contingency tables.(2)
(Total for Question 6 is 13 marks)
7
A tutoring company offers one-to-one sessions on four afternoons each week: Monday, Tuesday, Wednesday and Thursday. It records the day chosen by a random sample of 120 GCSE students and 60 A-level students, to test whether preferred day is associated with key stage. The results are given below.

GCSE: Monday 38, Tuesday 42, Wednesday 32, Thursday 8, row total 120.
A-level: Monday 22, Tuesday 19, Wednesday 15, Thursday 4, row total 60.
Column totals: Monday 60, Tuesday 61, Wednesday 47, Thursday 12, grand total 180.
(a)Calculate the expected frequency for each of the 8 cells of the original table, showing your method for at least two cells.(3)
(b)Identify which cell has an expected frequency below 5, and explain why, and with which neighbouring column, it should be merged before the test statistic is calculated.(2)
(c)Complete the table of observed and expected frequencies for the merged 2 by 3 table, with columns Monday, Tuesday and 'Wednesday or Thursday'.(2)
(d)State the number of degrees of freedom for the test after merging.(1)
(e)Calculate the value of the chi-squared test statistic for the merged table.(3)
(f)Using the critical value chi-squared2(0.05) = 5.991, test at the 5% significance level and state your conclusion in context.(2)
(Total for Question 7 is 13 marks)
8
A sample of 120 pet owners is classified by pet type (dog or cat) and whether they hold pet insurance, to test for association between the two.

Dog owners: insured 42, not insured 18, row total 60.
Cat owners: insured 24, not insured 36, row total 60.
Column totals: insured 66, not insured 54, grand total 120.

For a chi-squared test, the standardised residual for a cell is defined as e = (O-E)/E. Unlike the term (O-E)2/E used in the test statistic itself, the sign of e shows whether that cell's observed frequency was higher or lower than expected.
(a)Calculate the expected frequency for each cell, showing your method for one cell.(1)
(b)Calculate the standardised residual, e = (O-E)/E, for each cell, giving each to 2 decimal places.(3)
(c)Verify that summing the squares of your four standardised residuals gives the same chi-squared test statistic as the standard formula, and state its value. Comment on the significance of this value at the 5%, 1% and 0.5% levels, given critical values of 3.841, 6.635 and 7.879 respectively (df = 1).(2)
(d)Using the signs of the standardised residuals, describe the nature of the association between pet type and having pet insurance.(1)
(Total for Question 8 is 7 marks)
9
This question is about the general properties of chi-squared tests.
(a)Explain why a chi-squared test (whether for goodness of fit or for association) is always carried out using only the upper tail of the chi-squared distribution, even though the underlying question of whether a model fits well could be thought of as two-sided.(2)
(b)A shopkeeper wants to test specifically whether a six-sided die is biased towards rolling a six more often than expected, rather than just 'biased' in some unspecified way. Explain why a chi-squared goodness-of-fit test would not be the most suitable test for this specific question, and suggest a more suitable alternative approach.(2)
(c)Explain, with reference to the chi-squared formula, why every expected frequency used in the test must be comfortably greater than zero.(2)
(Total for Question 9 is 6 marks)
10
A market researcher carries out a chi-squared goodness-of-fit test on a random sample of 50 survey responses split across 4 equally likely categories under H0 (so each expected frequency is 12.5), obtaining the observed frequencies 8, 18, 14 and 10.
(a)Calculate the value of the chi-squared test statistic for this sample of 50 responses, and test at the 5% significance level using the critical value chi-squared3(0.05) = 7.815.(3)
(b)A second researcher repeats the same survey with the same proportional pattern of responses, but with a sample 10 times as large, so every observed and expected frequency above is exactly 10 times as large (that is, O' = 10*O and E' = 10*E in each category). Without recalculating from scratch, show algebraically that the new chi-squared test statistic must be exactly 10 times the value found in part (a), and hence state its value.(3)
(c)Test the result from part (b) at the 5% significance level, and comment on what this reveals about the relationship between sample size and the outcome of a chi-squared test, even when the underlying pattern of proportions is unchanged.(3)
(Total for Question 10 is 9 marks)
11
A local council carries out a chi-squared test for association at the 5% significance level between the area of a town (North, South, East) and residents' preferred recycling collection frequency (Weekly, Fortnightly), based on a survey of 300 residents. The test gives a test statistic of 8.24 with 2 degrees of freedom; the critical value at the 5% level is 5.991.
(a)State the conclusion of the test, in context.(2)
(b)Explain what is meant by a Type I error in the context of this test.(2)
(c)State the probability of a Type I error occurring in this test.(1)
(d)The council wants to reduce the probability of a Type I error occurring. State one way it could achieve this, and explain the effect this would have on the probability of a Type II error.(2)
(e)Explain why increasing the sample size, while keeping the significance level fixed, generally reduces the probability of a Type II error.(2)
(f)State one condition, referring to this context, that must hold for the chi-squared test used here to be valid.(1)
(Total for Question 11 is 10 marks)
12
A chain of driving instructors wants to see whether taking additional theory-based hazard perception sessions (alongside standard lessons) is associated with passing the driving test first time. Because overall pass rates differ a lot between branches for reasons unconnected with the hazard sessions (for example, differing local test centres), data are collected and considered separately at two branches.

Branch 1: took sessions - passed 54, failed 66, row total 120. Did not take sessions - passed 10, failed 20, row total 30.
Branch 2: took sessions - passed 24, failed 6, row total 30. Did not take sessions - passed 72, failed 48, row total 120.
(a)Calculate the pass rate (as a percentage, to 1 decimal place) for students who took the hazard sessions and for those who did not, separately for each branch. Comment on the direction of the association in each branch.(3)
(b)Calculate the corresponding pass rates for the COMBINED data (both branches together), and comment on how this compares with your answer to part (a).(3)
(c)Carry out a chi-squared test for association at the 5% significance level on the COMBINED data, stating your conclusion in context. (Critical value: chi-squared1(0.05) = 3.841.)(4)
(d)Carry out a chi-squared test for association at the 5% significance level on Branch 2's data alone, stating your conclusion in context. (Critical value: chi-squared1(0.05) = 3.841.)(3)
(e)Explain, with reference to your answers above, why simply combining ('pooling') data from different branches before testing for association can be misleading, and suggest what the company should do instead when analysing this kind of data.(3)
(Total for Question 12 is 16 marks)
Mark scheme · FP.FS6 Further Statistics: Hypothesis Testing and Chi-Squared Depth

Question 1

Question 2

Question 3

Question 4

Question 5

Question 6

Question 7

Question 8

Question 9

Question 10

Question 11

Question 12

Mark your answers

This checks your answers in your browser, stores nothing on a server and needs no account.

Question 1

8 marks
Did your answer earn the marks?

Question 2

6 marks
Did your answer earn the marks?

Question 3

6 marks
Did your answer earn the marks?

Question 4

14 marks
Did your answer earn the marks?

Question 5

14 marks
Did your answer earn the marks?

Question 6

13 marks
Did your answer earn the marks?

Question 7

13 marks
Did your answer earn the marks?

Question 8

7 marks
Did your answer earn the marks?

Question 9

6 marks
Did your answer earn the marks?

Question 10

9 marks
Did your answer earn the marks?

Question 11

10 marks
Did your answer earn the marks?

Question 12

16 marks
Did your answer earn the marks?
Mark my answers