In a hypothesis test, what are a type I error, a type II error and the power, and how do they appear in a spam filter that tests "this email is spam"?
Probability and statistics, Hypothesis testing
Level L1 Beginner. Length Short. Nature Th Theoretical.
What's being asked
Whether you can name the two errors without mixing them up, and link power to the type II error rate.
Key idea
Take the null hypothesis as the "nothing special" default. Type I error: rejecting when it is true, with probability . Type II error: failing to reject when it is false, with probability . Power .
Steps
- Fix the null hypothesis. Here : "the email is genuine (not spam)". The alternative : "the email is spam".
- Type I error (false positive): a genuine email is flagged as spam. Its probability is the significance level , which you choose before looking at the data.
- Type II error (false negative): a spam email gets through. Its probability is .
- Power is , the probability of catching spam when the email really is spam.
- State the trade-off. For a fixed sample size, lowering (a stricter filter) raises . Only more data, or a larger true effect, improves both at once.
Common mistakes
- Defining the errors by their names ("false positive") without saying which hypothesis is the null. The labels swap if you swap and .
- Saying is the probability that is true. It is the probability of rejecting given that is true.
- Thinking . They are separate probabilities, computed under different hypotheses.
How long your answer should be
4–5 sentences.
Last checked on 4 December 2026.
Read this
Previous in Probability and statistics: What are the mean and variance of a Poisson random variable, and what kind of data is it used to model?
Next in Probability and statistics: A test gives . Is it true that "there is a 3% probability the null hypothesis is true", and why?