Quality of Tests
Revise Quality of Tests for Further Mathematics — revision notes and instant AI marking. Free to start.
Quality of Tests
Every hypothesis test can go wrong in two different ways — and "size" and "power" are just the numbers that tell you how good your test is at avoiding those mistakes.
- Every hypothesis test has 4 possible outcomes — 2 are correct, 2 are errors (Type I and Type II).
- Type I error = rejecting H₀ when it was actually true (a "false alarm").
- Type II error = not rejecting H₀ when it was actually false (a "missed detection").
- P(Type I error) is found assuming H₀ is true, and equals (or is close to) the significance level.
- P(Type II error) requires you to be told the actual/true value of the parameter — you can't find it just from H₀.
- Size of a test = P(Type I error). A smaller size is better.
- Power of a test = P(correctly rejecting H₀) = 1 − P(Type II error). A bigger power is better.
- Reducing one error's probability tends to increase the other — the only way to shrink both is a bigger sample size.
- A power function is the power written algebraically in terms of the parameter (p or λ), instead of needing an actual numeric value.
The four outcomes of a hypothesis test
Think about it like a courtroom. The defendant is either actually guilty or actually innocent (that's reality — H₀ is either true or false). The jury then reaches a verdict — guilty (reject H₀) or not guilty (don't reject H₀). Put those two things together and you get four possible combinations:
| Reject H₀ | Accept (don't reject) H₀ | |
|---|---|---|
| H₀ True | Type I error | ✓ No error |
| H₀ False | ✓ No error | Type II error |
Two of these are good news (the jury reached the correct verdict). Two are bad news — the errors:
Courtroom version: an innocent person is found guilty.
Real-life version: a coin is actually fair, but your 20 flips happened to come up so heavy on heads that you (wrongly) concluded it was biased.
Courtroom version: a guilty person is found innocent (walks free).
Real-life version: a coin really is biased towards heads, but your sample of flips just happened to look "normal enough" that you didn't detect the bias.
A useful mental trick: Type I is the error you make by being too trigger-happy (rejecting when you shouldn't). Type II is the error you make by being too cautious (not rejecting when you should have).
Finding P(Type I error)
This connects directly back to how the critical region was built in the first place — it was constructed using the significance level, α%, under the assumption that H₀ was true. So:
- Continuous distributions (Normal, χ²): P(Type I error) is exactly α%. You can often just write this down — no calculation needed, because continuous critical regions can be built to hit the significance level exactly.
- Discrete distributions (Binomial, Poisson, Geometric): you usually can't hit α% exactly, because probabilities jump in discrete chunks. So the critical region is chosen to get as close as possible to α% while still being a valid critical region (≤ α%). P(Type I error) is then this actual significance level — and you do need to calculate it.
Finding P(Type II error)
For example, if H₀ assumed p = ½, saying "H₀ is false" only tells you p ≠ ½ — that's not specific enough to calculate a probability. You need something concrete, like being told the actual value is p = ⅓. Only then can you calculate the probability of your test failing to detect that change.
Type II error calculations use the actual, true parameter (given in the question).
Mixing these up is the single most common mistake on this topic!
Reducing the errors
- Reduce the significance level (α) → P(Type I error) goes down, but P(Type II error) goes up.
- Increase the significance level (α) → P(Type II error) goes down, but P(Type I error) goes up.
- The only way to reduce both at the same time is to increase the sample size.
Think of it like a smoke alarm's sensitivity dial. Turn the sensitivity up (easier to trigger = smaller α needed to "not trigger", i.e. stricter test) and you'll catch every real fire (fewer Type II errors) — but you'll also get woken up by burnt toast a lot more often (more Type I errors). Turn it down and you avoid false alarms, but you risk missing a real fire. A bigger, better sensor (bigger sample) is the only way to improve both at once.
Lucy can hit the target 70% of the time when she throws an axe with her right hand. She claims that the proportion, p, of her throws that hit the target is higher than 70% when she uses her left hand. Lucy uses the hypotheses H₀: p = 0.7 and H₁: p > 0.7 to test her claim. Lucy makes 100 throws and will reject the null hypothesis if the axe hits the target more than 77 times.
(a) Find the probability of a Type I error.
(b) Given that Lucy actually hits the target 80% of the time with her left hand, find the probability of a Type II error.
A researcher tests, at the 5% significance level, whether a die is biased towards rolling a six, using 60 rolls of the die. Explain why P(Type I error) can be stated as "exactly 5%" if the test used a Normal approximation, but not if the test used the exact Binomial distribution.
What is "size"?
The size of a test is just another name for something you've already met: it's the probability of rejecting H₀ when H₀ was actually true.
A "better" test has a smaller size — you want the probability of wrongly rejecting a true H₀ to be as low as possible. This links directly to the significance level:
- Continuous distributions: Size = significance level α (exactly). Often needs no calculation.
- Discrete distributions: Size = actual significance level (≤ α), the closest achievable value while remaining a valid critical region.
A student wants to test, at a 10% significance level, whether a coin is biased towards heads by counting the number of heads in 20 flips of the coin. Calculate the size of this test.
A test is conducted at the 5% significance level using X ~ B(15, p), H₀: p = 0.3, H₁: p > 0.3. Given that the critical region is found to be X ≥ 8, and P(X ≥ 8 | p = 0.3) = 0.0348, state the size of the test.
What is "power"?
If size measures how good a test is at avoiding false alarms, power measures how good a test is at actually catching real changes. It's the flip side of the same coin.
Just like with P(Type II error), you need to be given the actual value of the parameter to calculate power — "H₀ is false" alone isn't specific enough.
A better test has higher power — you want to maximise the chance of correctly detecting a real change. Ideally, you want power > 0.5, meaning your test is more likely than not to reach the correct conclusion when H₀ really is false.
Let X ~ Po(λ). A hypothesis test is conducted at the 5% significance level in which H₀: λ = 8 and H₁: λ < 8. It is later discovered that λ = 6. Find the power of the test.
A test uses X ~ B(25, p), H₀: p = 0.4, H₁: p < 0.4, at the 10% significance level. The critical region is found to be X ≤ 6. Given that the true value is actually p = 0.25, and P(X ≤ 6 | p = 0.25) = 0.5611, find the power of the test and state what this tells you about the test's ability to detect the change.
What is a power function?
So far, every power calculation has needed a specific numeric "actual" value of the parameter (e.g. p = 0.25, or λ = 6). But what if you want to know the power for any possible true value, without being told a specific one? That's what a power function gives you — power written as an algebraic expression in terms of p (or λ), rather than a single number.
In real life you'd almost never actually know the true parameter (if you did, why would you be running a hypothesis test on it?). Power functions sidestep that problem entirely — they describe how powerful your test would be across every possible true value, which you can then explore by substituting in different values, or by plotting a graph.
If the critical region is X ≤ 2 for a binomial hypothesis test with n = 50, find the power function.
- Plot it against p (or λ) to see visually where power is highest.
- Substitute in different values of p (or λ) to compare two or more different hypothesis tests — the better test is the one with higher power at the values you care about.
- Check where power > 0.5 — the region of true parameter values where your test is more likely than not to reach the correct conclusion (and less likely to give a Type II error).
Residents suspect the number of accidents on a main road has decreased. They test, at a 5% significance level, H₀: λ = 9 and H₁: λ < 9.
(a) Show that the power function is (1/6)e⁻ᵂ(a + bλ + cλ² + dλ³), where a, b, c, d are integers to be found.
(b) Find the largest integer value of λ for which P(Type II error) < 20%.
| λ | Power | P(Type II error) |
|---|---|---|
| 1 | 0.9810 | 0.0189 |
| 2 | 0.8571 | 0.1428 |
| 3 | 0.6472 | 0.3527 |
Explain, using the idea of a power function, why a hypothesis test is generally better at detecting a large change in a parameter than a small change, even when the sample size and significance level stay the same.
Read the full Quality of Tests notes free
That's the preview — create a free account to read the rest, plus flashcards and practice questions with instant AI marking. No credit card.
Unlock the full notes free →