AP Statistics · Inference for categorical data: proportions
Type I and Type II errors
1Two kinds of mistake
Because tests use samples, they can reach the wrong conclusion.
- Type I error: rejecting $H_0$ when $H_0$ is actually true (a "false alarm").
- Type II error: failing to reject $H_0$ when $H_a$ is actually true (a "missed detection").
Possible outcomes:
- $H_0$ true, reject → Type I error.
- $H_0$ true, fail to reject → correct.
- $H_a$ true, reject → correct (this is power).
- $H_a$ true, fail to reject → Type II error.
a factory tests $H_0$: the machine is working properly, against $H_a$: it is producing too many defects.
- Type I: concluding the machine is faulty when it is fine → unnecessary shutdown and repair costs.
- Type II: concluding the machine is fine when it is faulty → defective products reach customers.
Check yourself
A Type I error is:
Show the answer
Rejecting H₀ when it is true
False alarm.
2Probabilities of errors
- $P(\text{Type I error}) = \alpha$, the significance level.
- $P(\text{Type II error}) = \beta$.
- Power $= 1 - \beta$: the probability of correctly rejecting $H_0$ when a specific alternative is true.
α, β and power: moving the cut-off trades one error for the other
Lowering $\alpha$ reduces Type I errors but increases Type II errors (power falls), for a fixed sample size.
Check yourself
If α = 0.05, the probability of a Type I error is:
Show the answer
0.05
Set by α.
3Increasing power
Power increases when:
- the sample size $n$ increases (less variability);
- the significance level $\alpha$ increases (easier to reject);
- the true parameter is further from $p_0$ (a bigger effect is easier to detect);
- variability in the data is reduced (better measurement, blocking).
a researcher plans to test whether a new teaching method raises the pass rate above 70%. With $n = 50$ power is 0.45; with $n = 200$ it rises to about 0.90. A larger sample makes it much more likely to detect a real improvement.
Check yourself
Which change increases power?
Show the answer
Increasing the sample size
Less sampling variability.
4Choosing α
Think about which error is more serious in context:
- If a Type I error is worse (e.g. approving an ineffective drug), choose a small $\alpha$ such as 0.01.
- If a Type II error is worse (e.g. missing a dangerous contaminant), choose a larger $\alpha$ such as 0.10, to increase power.
testing water for lead. $H_0$: lead is at a safe level; $H_a$: lead is above the safe level. A Type II error means people drink unsafe water, so a larger $\alpha$ is sensible.
Check yourself
In a medical screening test where missing a disease is very costly, we should:
Show the answer
Use a larger α to increase power
Reduce Type II errors.
5Going deeper: describing each error in context, and what determines power
A significance test can reach a wrong decision in two ways.
- Type I error: rejecting H₀ when H₀ is true. A false alarm: finding convincing evidence for the alternative when the alternative is false.
- Type II error: failing to reject H₀ when Hₐ is true. A missed detection: not finding convincing evidence for an alternative that is true.
Probabilities
- P(Type I error) = α, the significance level. The researcher chooses it.
- P(Type II error) = β.
- Power = 1 − β: the probability that the test correctly rejects H₀ when a particular alternative is true.
Describing the errors in context: say (1) what the truth is, (2) what the test concluded, and (3) the consequence.
a city tests its water for lead. H₀: the mean lead level is at the safe limit (μ = 15 parts per billion); Hₐ: μ > 15 (unsafe).
- Type I error: the water is actually safe, but the test finds convincing evidence that it is unsafe. Consequence: the city spends money on unnecessary treatment and alarms residents.
- Type II error: the water is actually unsafe, but the test does not find convincing evidence of that. Consequence: residents go on drinking contaminated water.
- Which is worse? Here the Type II error, a risk to health. So the city should accept a larger α (say 0.10), making it easier to reject H₀ and reducing the chance of missing a real problem.
a drug company tests a new medicine. H₀: it is no better than the current one; Hₐ: it is better.
- Type I: an ineffective drug is concluded to be better; patients switch for no benefit.
- Type II: a truly better drug is not recognized; patients miss out on an improved treatment.
The trade-off: for a fixed sample size, lowering α raises β. Making it harder to reject H₀ reduces false alarms but increases missed detections. The choice of α should reflect which error is more serious.
Courtroom analogy: H₀ is "innocent." A Type I error convicts an innocent person; a Type II error acquits a guilty one. "Beyond reasonable doubt" corresponds to a small α.
What increases power?
- A larger sample size: less variability in the statistic. (The best way: it reduces Type II error without increasing Type I.)
- A larger significance level α: easier to reject, at the cost of more Type I errors.
- A larger effect size: a true parameter value farther from the null value is easier to detect.
- Less variability in the data: better measurement, or a design with blocking or matched pairs.
What does not change power: the particular data obtained. Power is a property of the test's design.
Worked example (reading the numbers): a test has α = 0.05 and power 0.80 against a particular alternative.
- P(Type I error) = 0.05.
- P(Type II error) = 1 − 0.80 = 0.20.
- Interpretation of power: "If the true parameter has that alternative value, there is a 0.80 probability that the test will find convincing evidence for Hₐ."
Worked example (comparing designs): which gives more power?
- n = 50 or n = 200 (same α): n = 200.
- α = 0.01 or α = 0.10 (same n): α = 0.10.
- Detecting a true mean of 16 or of 20 when H₀ says 15: 20 (further from the null).
Which error is possible? After a decision, only one type could have occurred.
- If H₀ was rejected, the only possible error is Type I.
- If H₀ was not rejected, the only possible error is Type II.
Planning a study: before collecting data, researchers choose α, decide what size of effect matters in practice, and pick a sample size large enough to give adequate power (often 0.80 or more). A study with low power may fail to detect a real effect; "no significant difference" from a small study proves little.
Multiple tests: carry out many tests at α = 0.05 and, even if every null hypothesis is true, about 1 in 20 will be "significant" by chance. A single significant result picked out from many should be treated with caution.
Common mistakes
- Swapping the two definitions.
- Describing the errors without context or consequences.
- Saying power is the probability that H₀ is true, or the probability of a Type II error.
- Saying a larger sample reduces α (α is chosen, not computed from n).
- Saying both errors can be reduced at once by changing α alone.
- Defining a Type II error as "accepting a false H₀" and leaving out that Hₐ is true.
Check yourself
Which change increases the power of a significance test without increasing the probability of a Type I error?
Show the answer
Increasing the sample size
A larger sample reduces variability, making a true alternative easier to detect at the same α.
6For top marks
- Describe errors in context, including the consequence: "We would conclude the drug works when it doesn't, and patients would take an ineffective drug."
- Identify which error is possible after a decision: after rejecting $H_0$, only a Type I error is possible; after failing to reject, only a Type II error is possible.
- Link power to sample size and α explicitly.
"Since we rejected H₀, we may have made a Type I error: concluding more than 60% of voters support the plan when in fact 60% or fewer do."
Check yourself
After failing to reject H₀, which error might have been made?
Show the answer
Type II
Only possible if Hₐ is true.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera