Hypotheses and Errors
A hypothesis test starts from a boring default claim, the null hypothesis, and asks whether the data are too surprising to square with it. Like a jury, it can go wrong two ways: convicting an innocent claim (Type I) or letting a false one walk (Type II).
What the symbols mean
- Null hypothesis
The default claim of no effect or no difference; it always contains the equals sign.
- Alternative hypothesis
What you're trying to find evidence for.
- Hypothesized value
The value the null hypothesis claims.
What the symbols mean
- Significance level
The risk of rejecting a true null you're willing to accept, often 0.05.
- Type II error rate
The chance of missing a real effect; 1 − β is the test's power.
Explanation
A hypothesis test is simply a way to decide whether data give real evidence against a claim, or whether what you saw could easily be luck. The claim being tested is called the null hypothesis, "null" because it's usually the no-change, no-effect, nothing-to-see-here position. The notation is just two competing statements: (the default, with an equals sign) and (what you suspect instead). And and are just names for the two ways you can be wrong: (crying wolf when nothing's there) and (missing something that is). That's the whole framework, and every test in this unit plugs into it.
Think of a courtroom. The defendant is presumed innocent, and that presumption is . The prosecution has to bring evidence strong enough to overturn it "beyond reasonable doubt." If the evidence isn't strong enough, the verdict is "not guilty," which isn't the same as proving innocence. A hypothesis test works exactly the same way, with data as the evidence.
Writing hypotheses. Hypotheses are about population parameters (, ), never about sample statistics. That makes sense: you already know your sample mean exactly, so there's nothing to test about it. The question is what it says about the population. The alternative decides the test's direction:
- "has changed" or "is different": two-tailed, .
- "has decreased": left-tailed, .
- "has increased": right-tailed, .
The two errors:
| true | false | |
|---|---|---|
| Reject | Type I error () | Correct |
| Fail to reject | Correct | Type II error () |
A trade-off. Lowering makes Type I errors rarer but Type II errors more common. Think about the courtroom again: demand more evidence before convicting and you'll convict fewer innocent people, but more guilty ones will go free. Only more data reduces both at once. There's an animation further down that shows this tug-of-war.
A common mistake. When a test fails to reject , it's tempting to say "so is true." It isn't proven. Not finding evidence against is like a "not guilty" verdict: it means the case wasn't strong enough, not that the defendant is innocent. That's why we say "fail to reject," never "accept."
See it
Worked examples
A company claims its batteries last 500 hours on average. A consumer group suspects they last less. State the hypotheses.
- 1
The company's claim, with its "=", is the default we'll test, so it's the null. The consumer group's suspicion that the mean is lower is what we're looking for evidence of, so it's the alternative, and it points left.
, (left-tailed)
Practice
Type your answer and check it. Solve them all to complete the lesson.
A company claims batteries last 500 hours; you suspect less. Which is the alternative hypothesis?
A new drug is approved although it doesn't work. Which error is this?
A smoke detector stays silent during a real fire (: no fire). Which error?
With , what is the probability of rejecting when it is true?
A test fails to reject . The right conclusion is:
A spam filter tests the null hypothesis "this email is legitimate." It sends a real email from your boss to the spam folder. Which error is that?
Twenty independent tests are run at , all on true null hypotheses. What's the probability that at least one of them rejects by mistake?
The hardest one here. Get it, and you've got this lesson.
Test against with , and , rejecting when . If the true mean is 105, what is the power, the probability of correctly rejecting ?
Where it's used
Drug trials, spam filters, airport security and quality inspection all balance false alarms (Type I) against misses (Type II).