How different is different enough?
Hypotheses, expected frequencies, degrees of freedom, and the point at which a difference stops being chance.
The maths words this lesson uses, in plain English. Open this before you start if English is not your first language.
Four quick ones from earlier work. Try each on paper before you open the answer; a slip here shows you what to watch for later in the lesson.
0.35 × 200 = 70. A percentage of a total is the same arithmetic as a row total times a column proportion, which is where expected frequencies come from.
(18 − 15)² = 9, and 9 ÷ 15 = 0.6. Square the difference first, then divide by the 15: this is one cell of a χ² sum.
0.4 × 0.5 = 0.2. For independent events the probabilities multiply. An expected frequency is exactly this, scaled up to the number of people.
Yes: 0.03 < 0.05, so the result is significant at the 5% level. A small p-value means the data would be surprising if H₀ were true.
Predict first. Each press of the shift slider moves the same number of people from one cell to another. If you shift 5 people and then 10 people, will the χ² statistic for 10 be twice the one for 5, or more than twice? Decide, and say why, before you look.
Now set the shift to 5 and read χ², then set it to 10 and read it again. How does the second compare with the first? If it is not what you predicted, look at the (O − E)² in the formula and ask what squaring does.
150 people, two groups, three preferences. Move the counts and watch χ² climb. The conclusion flips at one specific value, and nowhere else.
Grey is what you would expect if the two were unrelated. Green is what happened.
H₀: the two variables are independent. H₁: they are not independent. For goodness of fit, H₀ is that the data fits the stated distribution.
H₀ is always the boring one: nothing going on, no association. You never prove it. You either have enough evidence to reject it or you do not, and "we accept H₀" is wording that loses marks. Say "there is insufficient evidence to reject H₀".
Every expected frequency should be at least 5. If one is not, the test is not reliable and the usual fix is to combine categories. Checking this is worth a mark and almost nobody does it.
| Decide by | Reject H₀ when |
|---|---|
| critical value | χ² is bigger than it |
| p-value | p is smaller than the significance level |
The two tests always agree, and the inequalities point opposite ways, which is the thing people get backwards under pressure. Big statistic, small p, reject.
The same statistic tests whether data fit a stated distribution. This time the expected frequencies come from the model: expected = total × probability.
1.3 is less than 11.07, so there is insufficient evidence to reject H₀: the rolls are consistent with a fair die. When the model’s probabilities are not equal, multiply each one by the total. Probabilities 0.5, 0.3 and 0.2 with 200 observations give expected frequencies 100, 60 and 40.
The other test in this part of the course compares the means of two populations. Both populations are taken to be normal with the same variance, so the calculator’s pooled two-sample t-test is the one to run, and the decision is made with its p-value.
0.0374 < 0.05, so reject H₀: there is evidence at the 5% level that the mean score is higher with the app. On the TI-Nspire this is Stat Tests → 2-Sample t Test with Pooled set to Yes; on the fx-CG50 it is TEST → t → 2-SAMPLE with Pooled set to On. Choose the direction of H₁ on the same screen.
Decide one tail or two before you look at the data. If the claim had been only “the app changes scores”, H₁ would be μA ≠ μB, the p-value would double to 0.0748, and the conclusion at the 5% level would reverse.
Enter the table as a matrix, run one test, and the expected frequencies come back with it.
When you may use it. Applications. A calculator is allowed in every paper.
The mark people lose. Check the expected frequencies before you trust the verdict. Any expected value below about 5 and the test is not valid, however confident the p-value looks. The calculator will not refuse to run it.
The same test on a new table. The first three steps are written out with the reason for each; the last is yours. Cover the reasons and see if you can say them first.
100 shoppers are asked which of three payment methods they prefer, by age group. Are the two independent at the 5% level?
Under 30: 24, 18, 8 (total 50)
30 and over: 6, 32, 12 (total 50)
Column totals: 30, 50, 20.
Your answer. Type the χ² statistic, to 2 decimal places.
One question that tells you whether the main idea has landed. Each wrong option is a different common slip, so the reply tells you which one you made.
A χ² test is run at the 1% significance level and gives p = 0.03. Which conclusion is correct?
A school canteen is deciding whether to run separate menus for two year groups. Of 60 students in each year group, 38 in Year 10 and 22 in Year 11 bring a packed lunch; the rest buy lunch. So Year 10 has 38 packed and 22 buying, and Year 11 has 22 packed and 38 buying. Each expected frequency is 30.
Find the χ² statistic for this table, to 2 decimal places.
1. A contingency table has 3 rows and 5 columns. How many degrees of freedom?
2. Row total 45, column total 80, grand total 200. What is the expected frequency?
3. A goodness of fit test with 5 categories gives χ² = 10.4, and the 5% critical value is 9.488. What do you conclude?
Stating both hypotheses in context, not just as symbols. "H₀: preference is independent of group" rather than "H₀: independent".
The degrees of freedom. One number, often one mark, and easy to get wrong by forgetting to subtract.
The conclusion in context and with the comparison stated. "16.7 is greater than 5.99, so reject H₀: there is evidence that preference depends on group."
Take the table with counts 20, 30 in the top row and 30, 20 in the bottom row. Now halve every count, so the table has 50 people instead of 100 but exactly the same proportions. Predict what happens to the χ² statistic, the degrees of freedom and the conclusion at the 5% level (critical value 3.841). Then ask: what would happen if you doubled every count instead?
The proportions have not changed, so what has? Work out the new expected frequencies and the new (O − E)² ÷ E for one cell, and compare it with the same cell in the original table. Look for a rule linking the size of the sample to the size of the statistic.
Four steps, each one a little harder than the last. Every step is a piece of the exam question at the end, so by the top you have already done each part once.
Step 1 of 4: find an expected frequency. 100 people choose a cat or a dog as their preferred pet, and are grouped as adults or children. The results are:
Cat: 15 adults, 20 children (total 35)
Dog: 15 adults, 50 children (total 65)
Column totals: 30 adults, 70 children.
Assuming that choice of pet is independent of age group, find the expected frequency for cat and adults.
Step 2 of 4: one cell of the statistic. In the same survey, the observed frequency for cat and children is 20 and its expected frequency is 24.5. Find the contribution of this cell to the χ² statistic, to 2 decimal places.
Step 3 of 4: the whole statistic. Using the same observed frequencies as before, find the χ² statistic for the whole table, to 2 decimal places. You will need all four expected frequencies.
Step 4 of 4: state the conclusion. A different test of independence, on a 2 by 2 table, gives χ² = 2.9. At the 5% significance level the critical value for 1 degree of freedom is 3.841. Which conclusion is correct?
Written for this site in the style of the real papers. Do it on paper first, as you would in the exam, and show your working: most of the marks are for method. Give answers to 3 significant figures unless the question says otherwise. Then check each part below.
Paper 2 style · calculator (GDC) allowed · 9 marks · about 10 minutes
A gym records, for 140 members, the time of day of their visit and their membership type. The results are:
Morning: 32 standard, 8 premium (total 40)
Afternoon: 26 standard, 14 premium (total 40)
Evening: 22 standard, 38 premium (total 60)
Column totals: 80 standard, 60 premium.
The gym manager tests, at the 5% significance level, whether time of visit and membership type are independent.
(a) State the null hypothesis and the alternative hypothesis. [1]
(b) Write down the number of degrees of freedom. [1]
(c) Find the expected frequency for members who visit in the evening and have a premium membership. Give your answer to one decimal place. [2]
(d) Find the χ² statistic for the data. Give your answer to two decimal places. [3]
(e) The critical value for this test at the 5% significance level is 5.991. Hence state the conclusion of the test, giving a reason. [2]
Both hypotheses are written in context, naming the two variables. The null hypothesis is the claim of no link between them; the alternative says there is one.
Check (b). Type the number of degrees of freedom.
Check (c). Type the expected frequency for evening and premium, to 1 decimal place.
Check (d). Type the χ² statistic, to 2 decimal places.
Check (e). Which conclusion is correct?
This is a free sample lesson. The IB Diploma plan opens every other Diploma lesson, AA and AI, SL and HL, and every lesson from Year 7 for the refreshers. It covers every child in the family and includes all seven revision packs.
$99 for 12 months, or $149 for 2 years
That is $8.25 a month for the whole family.
Student without a card? Send this to a parent in one tap.
One payment. Nothing renews. Full refund within 30 days. Prices are in US$; Gumroad shows your local currency at checkout. Already paid? Type the email you paid with in the sign-in box, then click the link we send. See every price, including $19 revision packs.
Every lesson here has a teacher page beside it: worked answers, what each common wrong answer tells you about a student's thinking, and questions at three levels for the board. Every unit has a free sample lesson for students, and a plan opens every other lesson.