jmaths
IB Mathematics: Applications and Interpretation HL · 13.4: Hypothesis Testing · 13.4.2
Chi-squared goodness of fit Problem set B Worked solutions
Skills
-
A radio station says that its listeners prefer pop, rock and dance music in the proportions \(\frac12\), \(\frac13\), \(\frac16\). You test this with a goodness of fit test. Write \(H_0\) and \(H_1\).
- The station's claim is the null hypothesis
- \(H_0\): listeners prefer pop, rock and dance in the proportions 1/2, 1/3, 1/6
- \(H_1\): they do not prefer them in these proportions
-
State the degrees of freedom of a goodness of fit test for each table.
(a) The twelve months of the year.
- 12 groups: df = 12 − 1 = 11
(b) Data grouped into 6 classes.
- df = 6 − 1 = 5
(c) A table with 8 groups.
- df = 8 − 1 = 7
-
A packet of 250 flower seeds is said to give white, pink, yellow and red flowers in the proportions 0.36, 0.28, 0.20 and 0.16. Find the expected frequency of each colour.
- E = probability × 250
- 0.36 × 250 = 90, 0.28 × 250 = 70, 0.2 × 250 = 50, 0.16 × 250 = 40
- Check: the total is 250
-
A teacher records 96 late arrivals across the four lessons of a morning. Assuming that a late arrival is equally likely in each lesson, find the expected frequency for each lesson.
- Equal probabilities: 1/4 for each lesson
- E = 96 ÷ 4 = 24
-
A goodness of fit test is used to check that a school's five lunchtime clubs are equally popular. For 150 pupils the observed numbers are 27, 36, 33, 22, 32.
(a) State the degrees of freedom and the expected frequency of each club.
- df = 5 − 1 = 4
- E = 150 ÷ 5 = 30
(b) Use the calculator to find \(\chi^2\) and the p-value.
- Observed list: 27, 36, 33, 22, 32; expected list: 30 each
- From the calculator: χ² = 4.07, p = 0.397
In context
-
A bakery says that 45% of its sales are bread, 25% cakes, 20% pastries and 10% other items. In a sample of 300 sales, 120, 85, 60 and 35 are bread, cakes, pastries and other items. Test the bakery's claim at the 5% significance level.
(a) Write \(H_0\) and \(H_1\).
- \(H_0\): the sales are in the proportions 45% : 25% : 20% : 10%
- \(H_1\): the sales are not in these proportions
(b) State the degrees of freedom and find the expected frequencies.
- df = 4 − 1 = 3
- E = 0.45 × 300, 0.25 × 300, 0.2 × 300, 0.1 × 300 = 135, 75, 60, 30
(c) Use the calculator to find \(\chi^2\) and the p-value.
- From the calculator: χ² = 3.83, p = 0.28
(d) Write the conclusion in context.
- p = 0.28 > 0.05
- Do not reject \(H_0\). Insufficient evidence, at the 5% level, that the sales differ from the stated proportions.
-
A hotel has four types of room that the manager thinks are equally popular. Of 240 bookings, 45, 75, 68 and 52 are for the four room types. Test, at the 5% level, whether the four are equally popular. The critical value of \(\chi^2\) with df = 3 at the 5% level is 7.815.
(a) Write \(H_0\) and \(H_1\), and state the expected frequency.
- \(H_0\): the four are equally popular
- \(H_1\): they are not
- E = 240 ÷ 4 = 60
(b) Find \(\chi^2\) on the calculator.
- From the calculator: χ² = 9.63, p = 0.022
(c) Compare with the critical value and write the conclusion in context.
- 9.63 > 7.815, so reject \(H_0\)
- There is sufficient evidence, at the 5% level, that the room types are not equally popular
-
A game uses a wheel with six equal sectors, numbered 1 to 6. It is spun 150 times. The bar chart shows the number of times each number came up. The dashed line shows the expected frequency for a fair wheel.
(a) Find the expected frequency of each number.
- E = 150 ÷ 6 = 25
(b) Before any test, do the results look consistent with a fair wheel? Give a reason.
- The counts are 22, 28, 26, 24, 27, 23
- The largest difference from 25 is 3
- No bar is far from the line: consistent
Stretch
-
A school records 200 student absences from Monday to Friday in one week. If absences were equally likely on each day the expected frequency would be 40 for each day. The table shows the observed frequencies.
(a) Find \(\chi^2\) and the p-value from the calculator.
- df = 5 − 1 = 4
- From the calculator: χ² = 15.8, p = 0.00323
(b) Write the conclusion at the 5% level.
- p = 0.00323 < 0.05, so reject \(H_0\)
- There is sufficient evidence, at the 5% level, that absences are not equally likely on each day
(c) Suggest a reason, from the context, for the result.
- Monday has far more absences, for example students stay at home after a weekend
-
A student spins a four-colour spinner 200 times for a project. The table shows the observed frequencies. The \(\chi^2\) test for equal probabilities gives a p-value very close to 1.
(a) Find \(\chi^2\) and the p-value from the calculator.
- Expected frequency: 200 ÷ 4 = 50
- From the calculator: χ² = 0.04, p = 0.998
(b) What does such a large p-value say about the observed frequencies compared with the expected frequencies?
- χ² is tiny, so (O − E) is tiny for every group
- The observed frequencies are almost exactly the expected ones
(c) Suggest a reason for it.
- The results fit equal probabilities almost perfectly, closer than real spins usually are. The student may have made up some of the results
jmaths.xyz · AI HL · 13.4.2 Chi-squared goodness of fit