Sub topic 4
Type I and Type II Errors, Significance Level, and Power
This chapter assumes you can state a null and an alternative hypothesis and compute a test statistic. It also assumes you know the normal distribution and the standard error. Here you learn what can go wrong when you decide, and how to measure and control those risks.
Two ways to be wrong
A hypothesis test ends in one of two decisions: reject H0 or fail to reject H0. The truth is also one of two states: H0 is true or H0 is false. That gives four outcomes, and two of them are mistakes.
| Row | H0 is true | H0 is false |
|---|---|---|
| Reject H0 | Type I error (probability α) | Correct decision (probability 1 − β, the power) |
| Fail to reject H0 | Correct decision (probability 1 − α) | Type II error (probability β) |
- A Type I error is rejecting a true null hypothesis. This is a false positive. Example: you conclude a fund has positive alpha when its true mean excess return is zero.
- A Type II error is failing to reject a false null hypothesis. This is a false negative. Example: a fund really does add value, but your sample is too noisy to show it.
The significance level
The significance level, α, is the probability of a Type I error that you accept before you look at the data. Common choices are 10%, 5%, and 1%. Setting α = 0.05 fixes the critical value so that, if H0 is true, you reject in 5% of repeated samples.
Two points are often confused:
- α is chosen by the analyst. It is not computed from the sample.
- The p-value is computed from the sample. It is the smallest significance level at which you could reject H0. You reject when the p-value is less than α.
Power and its link to β
Power is the probability of correctly rejecting a false null: power = 1 − β. Unlike α, β is not a single number. It depends on which specific alternative is true. A test has low power against an alternative close to the null value and high power against one far from it.
To compute power for a z-test, find the critical value, then ask how likely the test statistic is to land beyond it when the true mean is μ1. If the true mean is μ1, the test statistic is centered at (μ1 − μ0) / SE instead of 0. The code below computes this for a two-tailed test.
import numpy as np
from scipy import stats
mu0, mu1 = 0.0, 0.5 # null mean and one specific true mean
sigma, alpha = 2.0, 0.05
z_crit = stats.norm.ppf(1 - alpha / 2)
for n in (100, 200, 400):
se = sigma / np.sqrt(n)
shift = (mu1 - mu0) / se
# P(Z > z_crit) + P(Z < -z_crit) when Z is centered at `shift`
power = stats.norm.sf(z_crit - shift) + stats.norm.cdf(-z_crit - shift)
print(f"n={n:4d} power={power:.3f} beta={1 - power:.3f}")With n = 100 the power is about 0.71, so β is about 0.29. Quadrupling the sample to 400 pushes power above 0.99.
What moves power
Four factors control power. Each follows from how far the test statistic's distribution shifts away from the null distribution, and how much the two overlap.
- Significance level. A larger α lowers the critical value. Power rises, but Type I errors become more likely. For a fixed sample, you trade one error for the other.
- Sample size. A larger n shrinks the standard error. The shift (μ1 − μ0) / SE grows and power rises. This is the only factor that lowers both errors at once.
- Effect size. The farther the true mean is from the null value, the higher the power.
- Variability. A larger population standard deviation increases the standard error and lowers power.
A one-tailed test also has more power than a two-tailed test at the same α, provided the true effect lies in the direction you predicted. The one-tailed test puts all of α in one tail, so its critical value is closer to the null. If the effect lies in the other direction, the one-tailed test has almost no power.
Common errors
- Reading the p-value as the probability that H0 is true. It is the probability of seeing a statistic at least this extreme if H0 is true.
- Treating "fail to reject" as "accept". A non-rejection can come from a true null or from a low-power test. The correct wording is "fail to reject H0".
- Assuming α + β = 1. They are probabilities under different states of the world, so they do not sum to one. The pairs that sum to one are α with 1 − α, and β with 1 − β.
- Thinking a significant result must be important. With a huge sample, a trivial difference can have a tiny p-value. Statistical significance is not economic significance. A fund that beats its benchmark by 0.01% a year may be statistically significant and still lose money after costs.
- Testing many hypotheses at one α. If you run 20 independent tests at 5% and all nulls are true, you expect about one false rejection. The chance of at least one is 1 − 0.95^20, about 64%. This is the logic behind data mining bias.
Choosing between the two errors
Which error costs more depends on the setting. Suppose a manager's null is "the strategy has no edge". A Type I error means deploying a strategy that does nothing, and paying costs for it. A Type II error means discarding a strategy that works. If trading costs and reputational risk are high, you would lower α, for example to 1%, and accept lower power. If the strategy is cheap to run and missed opportunities are costly, you might raise α and aim for higher power.
For the exam, remember the direction of each trade-off. At a fixed sample size, lowering α raises β. Only a larger sample, a larger effect, or lower variability improves both.
Exercise
A test of H0: μ = 0 uses α = 5% and has power of 80% against the alternative μ = 1.5. (a) What is the probability of a Type II error against that alternative? (b) If you lower α to 1% and keep everything else fixed, does power rise or fall? (c) Name one change that raises power without raising α.
Show answer
(a) β = 1 − 0.80 = 0.20, or 20%. (b) Power falls, because a smaller α moves the critical value farther from the null and makes rejection harder, which raises β. (c) Increase the sample size. This shrinks the standard error and raises power at the same α. Reducing the population variability, if possible, also works.
Exercise
An analyst runs 10 independent tests of true null hypotheses, each at α = 5%. What is the probability of at least one Type I error, and what does this say about repeated testing?
Show answer
P(at least one) = 1 − 0.95^10 ≈ 1 − 0.599 = 0.401, about 40%. Each test keeps its 5% error rate, but the chance of at least one false rejection across the group is much larger. This is why searching through many strategies or variables and reporting only the significant ones overstates the evidence.