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.
The Hypothesis Testing Framework
In statistical inference, we choose between two competing hypotheses about a population parameter \(\theta\):
Two Types of Decision Errors
Since our decision is based on random data, we can make two kinds of mistakes:
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\):
Visualizing the Power Function
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
How to Compute Power: Step by Step
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
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
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: