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

jmaths

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

Type II errors 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. Find the probability of a Type II error for each test of a normal mean. Give answers to 3 significant figures.

    1. (a) \(X \sim N(\mu, 0.6^2)\), sample size 9. H0: μ = 12, H1: μ < 12. Critical region \(\bar X < 11.6\). True mean μ = 11.2.

      • True distribution: \(\bar X \sim N(11.2, 0.6^2/9)\), standard deviation \(0.6/\sqrt{9} = 0.200\).
      • Reject H0 if \(\bar X < 11.6\). A Type II error is \(\bar X > 11.6\).
      • From the calculator: normal cdf, lower bound 11.6, upper bound 1E99, mean 11.2, standard deviation 0.200: 0.0228
      • P(Type II error) = 0.0228
    2. (b) \(X \sim N(\mu, 4^2)\), sample size 16. H0: μ = 50, H1: μ ≠ 50. Critical region \(\bar X < 48\) or \(\bar X > 52.5\). True mean μ = 51.5.

      • True distribution: \(\bar X \sim N(51.5, 4^2/16)\), standard deviation \(4/\sqrt{16} = 1.00\).
      • Reject H0 if \(\bar X < 48.0\) or \(\bar X > 52.5\). A Type II error is \(48.0 < \bar X < 52.5\).
      • From the calculator: normal cdf, lower bound 48.0, upper bound 52.5, mean 51.5, standard deviation 1.00: 0.841
      • P(Type II error) = 0.841
  2. Find the probability of a Type II error for each test. Give answers to 3 significant figures.

    1. (a) \(X \sim B(25, p)\). H0: p = 0.4, H1: p > 0.4. Critical region \(X \ge 14\). True p = 0.6.

      • True distribution: X ~ B(25, 0.6).
      • Reject H0 if X ≥ 14. A Type II error is X ≤ 13.
      • From the calculator: binomial cdf, n = 25, p = 0.6, upper bound 13: 0.268
      • P(Type II error) = 0.268
    2. (b) \(X \sim Po(\lambda)\). H0: λ = 6, H1: λ < 6. Critical region \(X \le 2\). True λ = 3.5.

      • True distribution: X ~ Po(3.5).
      • Reject H0 if X ≤ 2. A Type II error is X ≥ 3.
      • P(X ≥ 3) = 1 − P(X ≤ 2)
      • From the calculator: Poisson cdf, mean 3.5, upper bound 2: 0.321, so 1 − 0.321 = 0.679
      • P(Type II error) = 0.679
  3. Find the probability of a Type I error in each test. Give answers to 3 significant figures.

    1. (a) \(X \sim N(\mu, 2.5^2)\), sample size 10. H0: μ = 30, H1: μ ≠ 30. Critical region \(\bar X < 28.6\) or \(\bar X > 31.8\).

      • Under H0, \(\bar X \sim N(30, 2.5^2/10)\), standard deviation 0.791.
      • P(Type I error) = P(\(\bar X < 28.6\)) + P(\(\bar X > 31.8\))
      • From the calculator: normal cdf, mean 30, standard deviation 0.791: P(\(\bar X < 28.6\)) = 0.0383; P(\(\bar X > 31.8\)) = 0.0114
      • P(Type I error) = 0.0497
    2. (b) \(X \sim B(18, p)\). H0: p = 0.35, H1: p < 0.35. Critical region \(X \le 3\).

      • Under H0, X ~ B(18, 0.35).
      • P(Type I error) = P(X ≤ 3)
      • From the calculator: binomial cdf, n = 18, p = 0.35, upper bound 3: 0.0783
      • P(Type I error) = 0.0783
    3. (c) The number of events in one hour is Poisson with mean 1.5 under H0. The test counts events over 4 hours, and the critical region is \(X \ge 11\).

      • Under H0, X ~ Po(6).
      • P(Type I error) = P(X ≥ 11) = 1 − P(X ≤ 10)
      • From the calculator: Poisson cdf, mean 6, upper bound 10: 0.95738, so 1 − 0.95738 = 0.0426
      • P(Type I error) = 0.0426
  4. Answer the following.

    1. (a) A coffee shop says that 40% of its customers order a flat white. The owner thinks the proportion has risen after a menu change and will test this with 30 customers. State suitable hypotheses, defining p.

      • The owner thinks the proportion has risen, so the test is upper tailed.
      • H0: p = 0.4
      • H1: p > 0.4, where p is the proportion of customers who order a flat white.
    2. (b) A website averages 7.2 sales a day. The designer hopes a new layout has increased the daily mean. State suitable hypotheses, defining λ.

      • A Poisson mean, tested for an increase.
      • H0: λ = 7.2
      • H1: λ > 7.2, where λ is the mean number of sales a day.
    3. (c) In the coffee shop test, describe a Type I error and a Type II error in context.

      • Type I error: H0 is true but is rejected. The owner decides the proportion has risen when it is still 0.4.
      • Type II error: H0 is false but is not rejected. The owner decides there is no evidence of a rise when the proportion has in fact risen.

In context

  1. A machine makes steel rods whose length is normally distributed with standard deviation 0.5 mm. The mean length should be 14.0 mm. After a service the engineer thinks the mean length has increased. She takes a sample of 10 rods and tests H0: μ = 14.0 against H1: μ > 14.0 at the 5% significance level.

    13.413.613.81414.214.414.614.80.511.522.5sample mean (mm)yH0 true: mean 14True mean 14.314.26
    1. (a) Find the critical region. Give the critical value to 3 significant figures.

      • Under H0, \(\bar X \sim N(14, 0.5^2/10)\), standard deviation 0.158.
      • From the calculator: inverse normal, area 0.95, mean 14, standard deviation 0.158: 14.3
      • Critical region: \(\bar X > 14.3\)
    2. (b) The true mean is 14.3 mm. Find the probability of a Type II error. Use the unrounded critical value.

      • True distribution: \(\bar X \sim N(14.3, 0.5^2/10)\).
      • Type II error: \(\bar X < 14.26\).
      • From the calculator: normal cdf, lower bound −1E99, upper bound 14.26 (the unrounded critical value, 14.260), mean 14.3, standard deviation 0.158: 0.400
      • P(Type II error) = 0.400
  2. A packing line fills sacks of grain. The mass is normally distributed with standard deviation 3.0 kg. A manager tests H0: μ = 80.0 against H1: μ ≠ 80.0 using the mean of 8 sacks. He rejects H0 if the sample mean is below 77.4 kg or above 82.6 kg.

    1. (a) The true mean mass is 78.5 kg. Find the probability of a Type II error.

      • True distribution: \(\bar X \sim N(78.5, 3.0^2/8)\), standard deviation \(3.0/\sqrt{8} = 1.06\).
      • Reject H0 if \(\bar X < 77.4\) or \(\bar X > 82.6\). A Type II error is \(77.4 < \bar X < 82.6\).
      • From the calculator: normal cdf, lower bound 77.4, upper bound 82.6, mean 78.5, standard deviation 1.06: 0.850
      • P(Type II error) = 0.850
    2. (b) The manager now uses 30 sacks and keeps the same significance level. Explain the effect on the probability of a Type I error and on the probability of a Type II error.

      • The significance level is fixed, so P(Type I error) does not change.
      • A larger sample makes the sample mean less spread out, so the two curves overlap less and P(Type II error) decreases.
  3. A hospital screens patients for a rare condition. The test result is used to decide between H0: the patient does not have the condition, and H1: the patient has the condition.

    1. (a) Describe a Type I error and a Type II error in this context.

      • Type I: H0 true but rejected: a healthy patient is told they have the condition.
      • Type II: H0 false but not rejected: a patient with the condition is told they are healthy.
    2. (b) Which error is more important to avoid? Give a reason.

      • A Type II error leaves a patient with the condition untreated, which can be serious.
      • A Type I error leads to more tests, which is less harmful. So the test should keep P(Type II) small, even if P(Type I) is higher.
  4. A cyclist says that she wins 50% of her sprint finishes. Her coach thinks the claim is too high and records the results of 20 sprint finishes. The coach rejects the claim if the cyclist wins 5 or fewer, using H0: p = 0.5 against H1: p < 0.5.

    1. (a) Find the probability that the coach makes a Type I error.

      • Under H0, X ~ B(20, 0.5).
      • P(Type I error) = P(X ≤ 5)
      • From the calculator: binomial cdf, n = 20, p = 0.5, upper bound 5: 0.0207
      • P(Type I error) = 0.0207
    2. (b) The cyclist's true probability of winning is 0.3. Find the probability that the coach makes a Type II error.

      • True distribution: X ~ B(20, 0.3).
      • Reject H0 if X ≤ 5. A Type II error is X ≥ 6.
      • P(X ≥ 6) = 1 − P(X ≤ 5)
      • From the calculator: binomial cdf, n = 20, p = 0.3, upper bound 5: 0.416, so 1 − 0.416 = 0.584
      • P(Type II error) = 0.584

Stretch

  1. A café owner says that 30% of customers buy a cake. A student thinks the proportion is higher and counts the number of cake buyers among 25 customers. The student rejects the owner's claim for a critical region \(X \ge c\) with probability of a Type I error less than 0.05.

    1. (a) State H0 and H1 and find the critical region that gives the smallest probability of a Type II error.

      • H0: p = 0.3, H1: p > 0.3
      • Under H0, X ~ B(25, 0.3); critical region X ≥ c, with P(X ≥ c) < 0.05.
      • From the calculator: binomial cdf: P(X ≥ 11) = 0.0978; P(X ≥ 12) = 0.0442
      • The smallest c with probability below 0.05 is 12, which gives the smallest Type II error. Critical region: X ≥ 12
    2. (b) Given that the true probability that a customer buys a cake is 0.5, find the smallest probability of a Type II error.

      • True distribution: X ~ B(25, 0.5).
      • Reject H0 if X ≥ 12. A Type II error is X ≤ 11.
      • From the calculator: binomial cdf, n = 25, p = 0.5, upper bound 11: 0.345
      • P(Type II error) = 0.345
  2. The number of parcels delivered to a building in one hour is Poisson with mean 9.0. After a change of courier the building manager thinks the mean has decreased. She counts the parcels in one hour and rejects H0 if the count is in a critical region \(X \le c\). The true mean is now 3.0. She wants the probability of a Type II error to be less than 0.15.

    1. (a) State the hypotheses and find the critical region that gives the smallest probability of a Type I error.

      • H0: λ = 9, H1: λ < 9
      • Critical region X ≤ c. Under the true mean, X ~ Po(3): Type II error is X ≥ c + 1, so P(X ≥ c + 1) = 1 − P(X ≤ c) < 0.15, that is P(X ≤ c) > 0.85.
      • From the calculator: Poisson cdf: P(X ≤ 4) = 0.815; P(X ≤ 5) = 0.916
      • The smallest c with P(X ≤ c) > 0.85 is 5, which gives the smallest Type I error. Critical region: X ≤ 5
    2. (b) Find that smallest probability of a Type I error.

      • Under H0, X ~ Po(9).
      • P(Type I error) = P(X ≤ 5)
      • From the calculator: Poisson cdf, mean 9, upper bound 5: 0.116
      • P(Type I error) = 0.116
  3. A drawer holds 15 socks, r of them black and the rest white. Ravi knows that r is either 4 or 10. He takes 3 socks without looking and tests H0: r = 4 against H1: r = 10. He rejects H0 if at least 2 of the socks are black.

    1. (a) Find the probability that he makes a Type I error.

      • Type I error: reject H0 when r = 4, so X ≥ 2.
      • P(X ≥ 2) = (C(4,2) × C(11,1) + C(4,3) × C(11,0)) ÷ C(15,3) = 70/455
      • P(Type I error) = 0.154
    2. (b) Find the probability that he makes a Type II error.

      • Type II error: do not reject H0 when r = 10, so X ≤ 1, which is 1 − P(X ≥ 2).
      • P(X ≥ 2) = (C(10,2) × C(5,1) + C(10,3) × C(5,0)) ÷ C(15,3) = 345/455
      • P(Type II error) = 1 − 345/455 = 0.242

jmaths.xyz · AI HL · 13.4.20 Type II errors and how they link to Type I