Menu
Sign up Sign in

AI HL · 13.4

Hypothesis Testing

13.4.19

Type I errors

13.4.19

Type I errors

Target: I can say what a Type I error is, in context. (+4 more)

By the end of this section

Key points

What a Type I error is

  • Type I error: you reject H0 when H0 is true. Type II error: you do not reject H0 when H0 is false.
  • You cannot remove both risks. You can find the probability of each.
  • To find P(Type I error), always assume that H0 is true and find the probability of landing in the critical region.

Continuous distributions

  • For a test of a normal mean, P(Type I error) is the significance level, one-tailed or two-tailed. For a two-tailed test at 10%, that is 5% in each tail.
  • If the critical region is given, find its probability under H0. The sample mean has distribution \(N(\mu_0, \sigma^2/n)\), so the standard deviation is \(\sigma/\sqrt{n}\).
  • For a two-tailed critical region add the two tail probabilities.

Discrete distributions

  • For a binomial or a Poisson test, P(Type I error) is the probability of the critical region under H0. Use the H0 value of p or λ.
  • Upper tail: P(X ≥ k) = 1 − P(X ≤ k − 1). Lower tail: P(X ≤ k).
  • The critical region is the largest one with probability at most the level, so P(Type I error) is at most the significance level. It is usually less. The level you are told is the nominal level and P(Type I error) is the actual level.

On the calculator

Normal cumulative probability for a sample mean

  • Choose the normal cumulative distribution. Enter the bounds, the H0 mean and the standard deviation \(\sigma/\sqrt{n}\).
  • For a two-tailed region find each tail and add.

Screenshot and video to come

Binomial or Poisson cumulative probability

  • Choose the binomial or Poisson cumulative distribution and enter the parameters from H0.
  • The calculator gives P(X ≤ k). For an upper tail use 1 − P(X ≤ k − 1).

Screenshot and video to come

Explore: Type I and Type II errors

A test of H₀: μ = 50 against H₁: μ > 50, with σ = 10. H₀ is rejected if the sample mean is above the critical value c. Drag the orange point to move c.

Standard deviation of X̄, σ/√n
Critical value, c
P(Type I error)
P(Type II error)

Type I error: H₀ is rejected when it is true. Type II error: H₀ is not rejected when it is false. When n changes, c moves so that P(Type I error) stays the same.

Drag c along the axis.

  1. Drag c to the right. What happens to the orange area? What happens to the teal area? Can you make both smaller by moving c?
  2. Move the true mean closer to 50. What happens to P(Type II error)? Why is it hard to spot a small change in the mean?
  3. Make n larger. What happens to the two curves, and to P(Type II error), when P(Type I error) is kept the same?
  4. A medicine test: which error is worse, saying a medicine works when it does not, or missing one that does? What would you do to c?

Worked examples

Problems like the ones in class. Pick one, try it, then open the working.
A continuous test

X ~ N(μ, 6.4²) and a sample of n = 12 is used to test H0: μ = 85 against H1: μ ≠ 85 at the 4% significance level. Find the probability of making a Type I error.

Working
  1. Meaning

    Type I error: reject H0 when H0 is true

    The probability is found assuming H0 is true.

  2. Continuous

    The sample mean has a continuous distribution, so the critical region can be chosen to have probability exactly 0.04 under H0.

    For a continuous test, the significance level is the probability of rejecting a true H0.

  3. Answer

    P(Type I error) = 0.04

    Two-tailed or one-tailed, it is the significance level: 0.02 + 0.02 here.

Video walkthrough coming
A given critical region

X ~ N(μ, 3.5²) and a sample of n = 9 is used to test H0: μ = 48 against H1: μ < 48. The critical region is \(\bar X < 46\). Find the probability of making a Type I error.

Working
  1. Assume H0

    Under H0, X̄ ~ N(48, 3.5²/9), standard deviation = 3.5/√9 = 1.17

    Type I error is rejecting H0 when it is true, so use the H0 mean.

  2. Probability

    P(Type I error) = P(X̄ < 46)

    The critical region is the rejection region.

  3. Calculator

    From the calculator: normal cumulative probability, mean 48, standard deviation 1.17: P(X̄ < 46) = 0.0432

    Lower bound −∞ or a very small number.

Video walkthrough coming
Binomial, upper tail

X ~ B(12, p) and the hypotheses H0: p = 0.35, H1: p > 0.35 are tested. The critical region is X ≥ 8. Find the probability of making a Type I error.

Working
  1. Assume H0

    Under H0, X ~ B(12, 0.35)

    Use the H0 value of p.

  2. Probability

    P(Type I error) = P(X ≥ 8) = 1 − P(X ≤ 7)

    For an upper tail, subtract the cumulative probability up to one below the boundary.

  3. Calculator

    From the calculator: P(X ≤ 7) = 0.97449, so P(Type I error) = 0.0255

    The value is the exact probability. It is not a significance level you chose.

Video walkthrough coming
Poisson, lower tail

X ~ Po(λ) and the hypotheses H0: λ = 6.2, H1: λ < 6.2 are tested. The critical region is X ≤ 2. Find the probability of making a Type I error.

Working
  1. Assume H0

    Under H0, X ~ Po(6.2)

    Use the H0 mean.

  2. Probability

    P(Type I error) = P(X ≤ 2)

    Lower tail: no subtraction needed.

  3. Calculator

    From the calculator: Poisson cumulative probability with mean 6.2: P(X ≤ 2) = 0.0536

    This is the chance of wrongly rejecting H0.

Video walkthrough coming
Actual and nominal level

A medicine is said to work for 40% of patients. A doctor thinks it works for fewer and tests this at the 5% significance level using a random sample of 20 patients. Find the critical region, and find the probability of making a Type I error.

Working
  1. Hypotheses

    H0: p = 0.4, H1: p < 0.4

    p is the proportion of patients for whom the medicine works.

  2. Critical region

    Under H0, X ~ B(20, 0.4). From the calculator: P(X ≤ 3) = 0.0160 ≤ 0.05 and P(X ≤ 4) = 0.0510 > 0.05

    Critical region: X ≤ 3. Take the largest region with probability at most 5%.

  3. Type I error

    P(Type I error) = P(X ≤ 3) = 0.0160

    The 5% is the nominal level. The actual probability of a Type I error is lower because X takes whole values only.

Video walkthrough coming