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-3/problems/

jmaths

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

Testing the fit of a model Problem set A One question at a time

Try each question on paper first. Open the working a line at a time, then say whether you had it.

Skills

  1. The capacity of a type of battery, in mAh, is claimed to follow \(N(500, 40^2)\). For a sample of 300 batteries the capacities are grouped as: below 440, 440 to 500, 500 to 540, and 540 or more. Find the expected frequency of each group.

    • Probabilities from the calculator: 0.0668, 0.4332, 0.3413, 0.1587
    • E = 300 × P
    • 20.0, 130, 102, 47.6 (total 300)
  2. A quiz has 3 questions. Each is answered correctly with probability 0.4, independently. The quiz is taken by 250 students. Let X be the number of correct answers for one student.

    1. (a) State the distribution of X.

      • 3 independent trials, each with probability 0.4: \(X \sim B(3, 0.4)\)
    2. (b) Find the expected frequency of each value of X.

      • Probabilities from the calculator: 0.2160, 0.4320, 0.2880, 0.0640
      • E = 250 × P = 54, 108, 72, 16
  3. A teacher models the number of mistakes X (from 1 to 4) that a student makes in a quiz by \(P(X = x) = \frac{x^2}{30}\). There are 240 students. Find the expected frequency of each number of mistakes.

    • Put x = 1, 2, 3, 4 into the formula: 1/30, 4/30, 9/30, 16/30
    • These add up to 1
    • E = 240 × P = 8, 32, 72, 128
  4. Write \(H_0\) and \(H_1\) for each goodness of fit test, and state the degrees of freedom for (c).

    1. (a) Testing whether the heights of trees follow \(N(20, 3^2)\).

      • \(H_0\): the heights of trees follow \(N(20, 3^2)\)
      • \(H_1\): they do not follow this distribution
    2. (b) Testing whether the number of faulty bulbs in a box of 5 follows \(B(5, 0.3)\).

      • \(H_0\): the number of faulty bulbs follows \(B(5, 0.3)\)
      • \(H_1\): it does not follow this distribution
    3. (c) A table with 6 groups, no values estimated from the data.

      • df = 6 − 1 = 5
  5. A goodness of fit test has observed frequencies 26, 55, 104, 77, 38 and expected frequencies 20, 60, 100, 80, 40.

    1. (a) State the degrees of freedom.

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

      • Observed list and expected list, df = 4
      • From the calculator: χ² = 2.59, p = 0.629

In context

  1. In the quiz above, the numbers of students with 0, 1, 2, 3 correct answers were 66, 92, 76 and 16. Test at the 5% level whether the number of correct answers follows \(B(3, 0.4)\). 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 find the expected frequencies.

      • \(H_0\): the number of correct answers follows \(B(3, 0.4)\)
      • \(H_1\): it does not
      • E = 250 × P = 54, 108, 72, 16
    2. (b) Find \(\chi^2\) on the calculator.

      • df = 4 − 1 = 3
      • From the calculator: χ² = 5.26, p = 0.154
    3. (c) Compare \(\chi^2\) with the critical value and write the conclusion in context.

      • 5.26 < 7.815
      • Do not reject \(H_0\). There is insufficient evidence, at the 5% level, that the number of correct answers does not follow \(B(3, 0.4)\)
  2. The journey times, in minutes, of 200 workers are grouped as below 28, 28 to 32, 32 to 36, 36 to 40, and 40 or more, with frequencies 30, 58, 52, 38, 22. Test at the 5% level whether the times follow \(N(34, 5^2)\).

    1. (a) Find the expected frequencies.

      • Probabilities from the calculator: 0.1151, 0.2295, 0.3108, 0.2295, 0.1151
      • E = 200 × P = 23.0, 45.9, 62.2, 45.9, 23.0
    2. (b) Write \(H_0\) and \(H_1\), and state the degrees of freedom.

      • \(H_0\): the journey times follow \(N(34, 5^2)\)
      • \(H_1\): they do not
      • df = 5 − 1 = 4
    3. (c) Find \(\chi^2\) and the p-value from the calculator.

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

      • 0.0787 > 0.05, so do not reject \(H_0\). Insufficient evidence, at the 5% level, that the journey times do not follow \(N(34, 5^2)\).
  3. A six-sided die is rolled 150 times. The faces 1 to 6 come up 20, 31, 22, 30, 18 and 29 times. Test at the 2% significance level whether the die is fair.

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

      • \(H_0\): the die is fair (each number has probability 1/6)
      • \(H_1\): the die is not fair
    2. (b) State the expected frequency and the degrees of freedom.

      • E = 150 ÷ 6 = 25
      • df = 6 − 1 = 5
    3. (c) Find \(\chi^2\) and the p-value from the calculator.

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

      • 0.269 > 0.02, so do not reject \(H_0\). Insufficient evidence, at the 2% level, that the die is not fair.

Stretch

  1. Five coins are thrown together and the number of heads X is recorded. This is done 320 times. The frequencies of 0, 1, 2, 3, 4, 5 heads are 4, 28, 86, 121, 67 and 14. Test at the 5% level whether the coins are fair.

    1. (a) State the distribution of X if \(H_0\) is true, and write \(H_0\) and \(H_1\).

      • 5 independent trials, each with probability 0.5: \(X \sim B(5, 0.5)\)
      • \(H_0\): the coins are fair, so \(X \sim B(5, 0.5)\)
      • \(H_1\): they are not fair
    2. (b) Find the expected frequencies.

      • Probabilities from the calculator: 0.0312, 0.1562, 0.3125, 0.3125, 0.1562, 0.0312
      • E = 320 × P = 10, 50, 100, 100, 50, 10
    3. (c) State the degrees of freedom and find \(\chi^2\) and the p-value on the calculator.

      • df = 6 − 1 = 5
      • From the calculator: χ² = 27.03, p = 5.63 × 10⁻⁵
    4. (d) Write the conclusion in context.

      • 5.63 × 10⁻⁵ < 0.05, so reject \(H_0\). Sufficient evidence, at the 5% level, that the coins are not fair.
  2. A librarian models the number of books X (from 1 to 5) borrowed in one visit by \(P(X = x) = \frac{6 - x}{15}\). On 300 visits the numbers of books borrowed were 1 to 5: 90, 95, 52, 38 and 25. Test at the 5% level whether the model fits.

    1. (a) Find the expected frequencies.

      • Put x = 1 to 5 into the formula and check the probabilities add up to 1
      • E = 300 × P = 100, 80, 60, 40, 20
    2. (b) Write \(H_0\) and \(H_1\), and state the degrees of freedom.

      • \(H_0\): the number of books borrowed follows the model
      • \(H_1\): it does not
      • df = 5 − 1 = 4
    3. (c) Find \(\chi^2\) and the p-value on the calculator and write the conclusion in context.

      • From the calculator: χ² = 6.23, p = 0.183
      • 0.183 > 0.05, so do not reject \(H_0\). Insufficient evidence, at the 5% level, that the model does not fit.

jmaths.xyz · AI HL · 13.4.3 Testing the fit of a model