Statistics 🔬 Confidence & Inference

Type I and Type II Errors and Power

Every hypothesis test can be wrong in two different ways — and one number, power, measures how often you catch a real effect.

Intro StatisticsAP Statistics level
💡
The big idea: A hypothesis test makes a yes-or-no decision from noisy data, so it can slip up in two opposite directions: sounding a false alarm when nothing is going on (a Type I error), or missing a real effect that is right in front of it (a Type II error). Their rates, alpha and beta, trade off against each other — tightening one loosens the other. Power, which is 1 minus beta, is the test's ability to detect a real effect, and you raise it mostly by studying bigger effects and collecting more data.
🎯 By the end, you'll be able to
  • Define a Type I error and a Type II error and match each to its rate, alpha and beta
  • Explain what statistical power (1 minus beta) measures and why it matters
  • Describe the trade-off between alpha and beta and why lowering one raises the other
  • Identify what raises power: a larger true effect, a bigger sample, or a larger alpha
📎 You should already know
  • Hypothesis testing basics: the null and alternative hypotheses
  • The significance level alpha and p-values
  • The normal distribution and sampling distributions

Two ways to be wrong

Think of a smoke detector. It faces a genuinely uncertain world and has to make a call, so it can fail in two completely different ways. It can shriek when you are only making toast — a false alarm. Or it can stay silent during a real fire — a miss. Making it more sensitive cuts down the misses but causes more false alarms; making it less twitchy does the reverse. You cannot drive both kinds of mistake to zero at once.

A hypothesis test is exactly this kind of detector. It starts from a null hypothesis \(H_0\) (the "nothing unusual is happening" claim) and decides whether the data give enough reason to reject it. Because the data are noisy, the test can be wrong in two opposite ways — the statistical versions of the false alarm and the miss.

The four outcomes of a test

Reality is either that \(H_0\) is true or that it is false, and your test either rejects \(H_0\) or does not. That makes four combinations — two right, two wrong:

  • \(H_0\) true, you do not reject — correct. No effect, and you said so.
  • \(H_0\) false, you reject — correct, and this is the outcome you usually want: a real effect, detected.
  • \(H_0\) true, but you reject it — a Type I error: a false alarm. You announced an effect that is not there.
  • \(H_0\) false, but you fail to reject it — a Type II error: a miss. A real effect was there and you walked past it.

Notice the errors are not symmetric in meaning: one invents an effect, the other overlooks one.

🔑 The two errors and their rates
A Type I error is rejecting a null hypothesis that is actually true. You control its long-run rate directly: it is the significance level, alpha (often 0.05). A Type II error is failing to reject a null hypothesis that is actually false. Its rate is called beta, and unlike alpha you do not set it directly — it depends on how big the real effect is, how much data you have, and the alpha you chose.
\[ \alpha = P(\text{reject } H_0 \mid H_0 \text{ true}), \qquad \beta = P(\text{fail to reject } H_0 \mid H_0 \text{ false}) \]
Alpha is the false-alarm rate you accept; beta is the miss rate you are left with. Both are conditional rates, each read under a different assumed truth.
\[ \text{Power} = 1 - \beta = P(\text{reject } H_0 \mid H_0 \text{ false}) \]
Power is the probability of correctly detecting a real effect. Higher is better; a test with 0.80 power catches a genuine effect of the assumed size about 80% of the time.

Two curves, one cutoff

The cleanest way to see all of this is to draw the sampling distribution of your test statistic under both stories at once. The left curve is what the statistic looks like if \(H_0\) is true; the right curve is what it looks like if a specific alternative is true instead. Because data are noisy, the two curves overlap — and that overlap is where errors live.

You reject \(H_0\) whenever the statistic lands past a cutoff. That single line splits both curves into shaded pieces: alpha is the sliver of the null curve past the cutoff (a true null wrongly rejected), beta is the chunk of the alternative curve on the not-reject side (a real effect missed), and power is the rest of the alternative curve, past the cutoff. Change alpha to slide the cutoff, or raise the effect size to pull the curves apart, and watch the three areas respond.

🎮 Interactive: alpha, beta, and power LIVE
Left curve: the test statistic if H0 is true. Right curve: if the alternative is true. The cutoff c (fixed by alpha) shades three areas — red alpha on the null curve (Type I), amber beta on the alternative curve (Type II), and green power past the cutoff. Slide the effect size d up — a bigger real effect, or equivalently more data, which widens the gap in standard-error units — and watch power grow; switch alpha from 0.05 to 0.01 to shrink the red area and watch beta swell.
✨ Lowering alpha does not come free
Slide the cutoff to make alpha smaller — say from 0.05 to 0.01 — and the red false-alarm area shrinks, which sounds like pure progress. But the same move pushes the cutoff deeper into the alternative curve, so beta grows and power falls. With the effect size and sample size held fixed, being stricter about false alarms necessarily means missing more real effects. There is no cutoff that makes both errors small at once — the only way to shrink both is to separate the curves.

What makes a test powerful

Since power falls out of the overlap between the two curves, anything that reduces that overlap raises power. Three levers do it:

  • A bigger true effect. The farther the real value sits from the null, the more the alternative curve slides to the right, clearing the cutoff. Big effects are easy to detect; tiny ones are not.
  • A larger sample size \(n\). More data shrinks the standard error \(\sigma/\sqrt{n}\), making both curves narrower and taller so they overlap less. This is the lever you actually control — plan for enough \(n\).
  • A larger alpha. Loosening the cutoff (0.05 instead of 0.01) raises power, but only by accepting more Type I errors. It trades one error for the other rather than removing overlap.

Lower variability in the data (or a better-designed study) helps too, for the same reason a bigger \(n\) does: it narrows the curves.

⚠️ Read these numbers honestly

Alpha and beta are long-run error rates of the procedure, not statements about any single result. A test that rejects at the 0.05 level does not mean there is a 95% chance the effect is real, and a p-value is not the probability that \(H_0\) is true — it is how surprising your data would be if \(H_0\) were true.

Just as important: failing to reject \(H_0\) is not proof that \(H_0\) is true. A non-significant result from a low-power test (small effect, small sample) is often just a miss — absence of evidence, not evidence of absence. This is why power matters before you run the study, not only after.

📝 Worked example: You test H0: mu = 100 against Ha: mu > 100 with a known sigma = 15, a sample of n = 25, and alpha = 0.05 (one-sided). Suppose the true mean is actually 106. What are the chances your test misses it (beta) and catches it (power)?
  1. Find the standard error: SE = sigma / sqrt(n) = 15 / sqrt(25) = 15 / 5 = 3.
  2. Find the cutoff. A one-sided test at alpha = 0.05 rejects when the sample mean exceeds mu_0 + 1.645 times SE = 100 + 1.645 times 3 = 104.9 (approximately).
  3. Assume the alternative is the truth (mean = 106) and ask how often the sample mean still falls below the cutoff — that is beta: \(\beta = P(\bar{x} < 104.9 \mid \mu = 106) = P\!\left(Z < \tfrac{104.9 - 106}{3}\right) = P(Z < -0.37) \approx 0.36.\)
  4. Power is the complement: power = 1 minus beta ≈ 1 − 0.36 = 0.64.
  5. Now raise the sample size to n = 100. Then SE = 1.5, the cutoff is 100 + 1.645 times 1.5 ≈ 102.5, and \(\beta = P(Z < \tfrac{102.5 - 106}{1.5}) = P(Z < -2.35) \approx 0.01\), so power jumps to about 0.99.
✓ At n = 25 the test has only about 0.64 power — it would miss this real effect roughly a third of the time (beta ≈ 0.36). Quadrupling the sample to n = 100 pushes power up to about 0.99, because the narrower curves overlap far less. Same effect, same alpha — more data is what buys the power.

Check your understanding

1. A researcher rejects the null hypothesis, but in reality the null hypothesis is true. What kind of mistake is this?
Rejecting a null hypothesis that is actually true is a Type I error — a false alarm. Its long-run rate is the significance level alpha.
2. The power of a test is defined as…
Power = 1 minus beta = the probability of correctly rejecting H0 when it is false — the chance of detecting a real effect.
3. Holding the true effect size and the sample size fixed, you lower the significance level from alpha = 0.05 to alpha = 0.01. What happens to the probability of a Type II error, beta?
Making alpha smaller moves the cutoff deeper into the alternative curve, so more real effects fall on the not-reject side. Beta increases and power falls — the alpha/beta trade-off.
4. Which of these changes would INCREASE the power of a test?
A larger sample shrinks the standard error, narrows both curves, and reduces their overlap — raising power. A smaller effect, noisier data, and a stricter alpha all lower power.
✅ Key takeaways
  • A hypothesis test can be wrong two ways: a Type I error (rejecting a true H0 — a false alarm, rate alpha) and a Type II error (failing to reject a false H0 — a miss, rate beta).
  • You set alpha directly as the significance level; beta is left over and depends on the effect size, the sample size, and alpha.
  • Power = 1 minus beta is the probability of detecting a real effect. Higher power means fewer misses.
  • Alpha and beta trade off: with effect size and n fixed, lowering alpha raises beta (and lowers power), and vice versa.
  • You raise power by studying a bigger true effect, collecting a larger sample, or accepting a larger alpha — and a bigger sample is the lever you truly control.
  • Be honest: alpha and beta are long-run error rates, a p-value is not the probability H0 is true, and failing to reject H0 is not proof that H0 is true.