Sign in to jmaths to print this page or save it as a PDF: jmaths-8ce638778fd6.herokuapp.com/maths/ai-hl/hypothesis-testing/13-4-2/problems/

jmaths

IB Mathematics: Applications and Interpretation HL · 13.4: Hypothesis Testing · 13.4.2

Chi-squared goodness of fit Problem set A Worked solutions

Skills

  1. A coffee shop says its sales of small, medium and large cups are in the ratio 5 : 3 : 2. You test this with a goodness of fit test. Write \(H_0\) and \(H_1\).

    • The shop's claim is the null hypothesis: the proportions are 5/10, 3/10, 2/10
    • \(H_0\): sales of small, medium and large are in the ratio 5 : 3 : 2
    • \(H_1\): sales are not in this ratio
  2. State the degrees of freedom of a goodness of fit test for each table.

    1. (a) The days of the week, Monday to Sunday.

      • 7 groups: df = 7 − 1 = 6
    2. (b) Data grouped into 5 classes.

      • df = 5 − 1 = 4
    3. (c) A table with 9 groups.

      • df = 9 − 1 = 8
  3. A bag of 200 beads is said to contain red, blue, green and yellow beads in the proportions 0.45, 0.30, 0.15 and 0.10. Find the expected frequency of each colour.

    • E = probability × 200
    • 0.45 × 200 = 90, 0.3 × 200 = 60, 0.15 × 200 = 30, 0.1 × 200 = 20
    • Check: the total is 200
  4. A supermarket records 135 complaints over the five days Monday to Friday. Assuming that a complaint is equally likely on each day, find the expected frequency for each day.

    • Equal probabilities: 1/5 each day
    • E = 135 ÷ 5 = 27
  5. A goodness of fit test is used to check that a five-sided spinner is fair. In 100 spins the observed frequencies are 12, 25, 18, 21, 24.

    1. (a) State the degrees of freedom and the expected frequency of each number.

      • df = 5 − 1 = 4
      • E = 100 ÷ 5 = 20
    2. (b) Use the calculator to find \(\chi^2\) and the p-value.

      • Observed list: 12, 25, 18, 21, 24; expected list: 20 each
      • From the calculator: χ² = 5.5, p = 0.24

In context

  1. A music service says that 40% of the plays on its app are pop, 30% rock, 20% hip hop and 10% other. In a sample of 400 plays, 148, 112, 90 and 50 are pop, rock, hip hop and other. Test the service's claim at the 5% significance level.

    1. (a) Write \(H_0\) and \(H_1\).

      • \(H_0\): the plays are in the proportions 40% : 30% : 20% : 10%
      • \(H_1\): the plays are not in these proportions
    2. (b) State the degrees of freedom and find the expected frequencies.

      • df = 4 − 1 = 3
      • E = 0.4 × 400, 0.3 × 400, 0.2 × 400, 0.1 × 400 = 160, 120, 80, 40
    3. (c) Use the calculator to find \(\chi^2\) and the p-value.

      • From the calculator: χ² = 5.18, p = 0.159
    4. (d) Write the conclusion in context.

      • p = 0.159 > 0.05
      • Do not reject \(H_0\). Insufficient evidence, at the 5% level, that the plays differ from the stated proportions.
  2. A school election has four candidates who are thought to be equally popular. In a sample of 200 votes 30, 58, 55 and 57 votes go to the four candidates. 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.

    1. (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 = 200 ÷ 4 = 50
    2. (b) Find \(\chi^2\) on the calculator.

      • From the calculator: χ² = 10.8, p = 0.0131
    3. (c) Compare with the critical value and write the conclusion in context.

      • 10.8 > 7.815, so reject \(H_0\)
      • There is sufficient evidence, at the 5% level, that the candidates are not equally popular
  3. A die is rolled 120 times. The bar chart shows the number of times each face came up. The dashed line shows the expected frequency for a fair die.

    1234567102030FaceFrequency
    1. (a) Find the expected frequency of each number.

      • E = 120 ÷ 6 = 20
    2. (b) Before any test, do the results look consistent with a fair die? Give a reason.

      • The counts are 17, 24, 19, 22, 18, 20
      • The largest difference from 20 is 4
      • No bar is far from the line: consistent

Stretch

  1. A bakery counts its 600 customers from Monday to Saturday in one week. If customers were equally likely on each day the expected frequency would be 100 for each day. The table shows the observed frequencies.

    MonTueWedThuFriSatObserved70758095170110
    1. (a) Find \(\chi^2\) and the p-value from the calculator.

      • df = 6 − 1 = 5
      • From the calculator: χ² = 69.5, p = 1.3 × 10⁻¹³
    2. (b) Write the conclusion at the 5% level.

      • p = 1.3 × 10⁻¹³ < 0.05, so reject \(H_0\)
      • There is sufficient evidence, at the 5% level, that customers are not equally likely on each day
    3. (c) Suggest a reason, from the context, for the result.

      • Friday and Saturday are busier, for example more people shop at the end of the week
  2. A student rolls a die 120 times for a project. The table shows the observed frequencies. The \(\chi^2\) test for a fair die gives a p-value very close to 1.

    Face123456Observed192120202119
    1. (a) Find \(\chi^2\) and the p-value from the calculator.

      • Expected frequency: 120 ÷ 6 = 20
      • From the calculator: χ² = 0.2, p = 0.999
    2. (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
    3. (c) Suggest a reason for it.

      • The results fit a fair die almost perfectly, closer than real rolls usually are. The student may have made up some of the results

jmaths.xyz · AI HL · 13.4.2 Chi-squared goodness of fit