01 / 21

Type I/II Errors
& Power

Understand the decision errors in hypothesis testing, the power function, and how significance level controls the trade-off between error types.

Statistics

The Hypothesis Testing Framework

In statistical inference, we choose between two competing hypotheses about a population parameter \(\theta\):

\(H_0\): Null Hypothesis
The default claim: no effect, no difference, or a specific parameter value. E.g., \(H_0: \theta = \theta_0\).
\(H_1\): Alternative Hypothesis
The research claim: an effect exists or the parameter differs. E.g., \(H_1: \theta \neq \theta_0\).

Two Types of Decision Errors

Since our decision is based on random data, we can make two kinds of mistakes:

Type I Error
Rejecting \(H_0\) when \(H_0\) is true. A "false positive": we claim an effect exists when it does not.
Type II Error
Failing to reject \(H_0\) when \(H_1\) is true. A "false negative": we miss a real effect.

The Decision Matrix

\(H_0\) True \(H_1\) True
Reject \(H_0\) Type I Error (\(\alpha\)) Correct: Power (\(1 - \beta\))
Fail to Reject \(H_0\) Correct (\(1 - \alpha\)) Type II Error (\(\beta\))

The Size of a Test

The size (or significance level) of a test is the maximum probability of a Type I error over the null parameter space:

For a simple null \(H_0: \theta = \theta_0\), this simplifies to \(\alpha = P_{\theta_0}(\text{Reject } H_0)\). We typically fix \(\alpha\) at 0.05, 0.01, or 0.10 before collecting data.

The Power Function

The power function of a test measures the probability of rejection as a function of the true parameter value \(\theta\):

When \(\theta \in \Theta_0\)
\(\beta(\theta) \leq \alpha\). The power function should be small under \(H_0\).
When \(\theta \in \Theta_1\)
\(\beta(\theta)\) should be close to 1. Higher power means better detection of the true alternative.

Visualizing the Power Function

0 1 0.5
\(\theta\)
\(\beta(\theta)\)
\(\theta_0\)
\(\alpha\)
\(\Theta_0\)
\(\Theta_1\)
\(\theta_1\)
\(1 - \beta\)
\(\beta(\theta)\)

Type I vs Type II: The Trade-off

Type I Error Type II Error
Definition Reject true \(H_0\) Fail to reject false \(H_0\)
Probability \(\alpha\) \(\beta\)
Analogy Convicting an innocent Acquitting a guilty
Controlled by Fixing significance level Increasing sample size or effect size
Reducing it Decrease \(\alpha\) (stricter threshold) Increase \(n\), larger effect, or larger \(\alpha\)

Factors That Increase Power

1
Larger sample size \(n\): Reduces variance of the test statistic, making it easier to detect departures from \(H_0\).
2
Larger significance level \(\alpha\): A wider rejection region catches more alternatives, but at the cost of more Type I errors.
3
Larger true effect size: If the true \(\theta\) is far from \(\theta_0\), the signal is stronger and easier to detect.
4
Smaller population variance \(\sigma^2\): Less noise means the test statistic is more concentrated around the true parameter.

How to Compute Power: Step by Step

1
State the hypotheses: Define \(H_0: \theta = \theta_0\) and \(H_1: \theta = \theta_1\) (or a range).
2
Choose the test and \(\alpha\): Select a test statistic and fix the significance level (e.g., \(\alpha = 0.05\)).
3
Find the rejection region \(R\): Determine the critical value(s) such that \(P_{\theta_0}(\mathbf{X} \in R) = \alpha\).
4
Compute power at \(\theta_1\): Evaluate \(\beta(\theta_1) = P_{\theta_1}(\mathbf{X} \in R)\) using the distribution under \(\theta_1\).
5
Type II error: The probability of a Type II error at \(\theta_1\) is \(1 - \beta(\theta_1)\).

Example 1: Normal Mean Test

Let \(X_1, \ldots, X_{25} \overset{iid}{\sim} N(\mu, 4)\). Test \(H_0: \mu = 10\) vs \(H_1: \mu = 12\) at \(\alpha = 0.05\) using \(\bar{X}\).

Visualizing \(\alpha\), \(\beta\), and Power

critical value
\(\alpha\)
\(\beta\)
Power = \(1 - \beta\)
\(H_0\) distribution
\(H_1\) distribution
\(\mu_0\)
\(\mu_1\)

Example 2: Required Sample Size

Using the same setup (\(\sigma^2 = 4\), \(\mu_0 = 10\), \(\mu_1 = 12\), \(\alpha = 0.05\)), how large must \(n\) be to achieve power \(\ge 0.90\)?

Example 3: Two-Sided Power

Let \(X_1, \ldots, X_{16} \overset{iid}{\sim} N(\mu, 9)\). Test \(H_0: \mu = 5\) vs \(H_1: \mu \neq 5\) at \(\alpha = 0.05\). Find the power at \(\mu = 7\).

Common Mistakes

✕ Confusing \(\alpha\) and \(\beta\)
\(\alpha\) is under \(H_0\), \(\beta\) is under \(H_1\). They are computed from different distributions.
✕ "Accept \(H_0\)"
We never accept \(H_0\): we "fail to reject" it. Absence of evidence is not evidence of absence.
✕ Ignoring Effect Size
Power depends on the true parameter. A test can have high power for large effects and low power for small effects.

Summary of Key Concepts

Concept Symbol Definition
Type I Error \(\alpha\) P(Reject \(H_0\) | \(H_0\) true)
Type II Error \(\beta\) P(Fail to reject \(H_0\) | \(H_1\) true)
Power \(1 - \beta\) P(Reject \(H_0\) | \(H_1\) true)
Size of test \(\alpha\) \(\sup_{\theta \in \Theta_0} P_\theta(\text{Reject})\)
Power function \(\beta(\theta)\) \(P_\theta(\mathbf{X} \in R)\) for all \(\theta\)

Question 1 of 5

A Type I error occurs when we:

Question 2 of 5

Which of the following will increase the power of a test while keeping \(\alpha\) fixed?

Question 3 of 5

Let \(X_1, \ldots, X_n \overset{iid}{\sim} N(\mu, 1)\). For testing \(H_0: \mu = 0\) vs \(H_1: \mu = 1\) with \(n = 4\) and \(\alpha = 0.05\), the rejection region is \(\bar{X} > c\). What is the critical value \(c\)?

Question 4 of 5

Using the test from Question 3 (\(n=4\), \(\sigma^2 = 1\), \(c = 0.8225\)), what is the power at \(\mu = 1\)?

Question 5 of 5

The size of a test is defined as: