What is Statistical Hypothesis Testing?
Statistical hypothesis testing, told as a story about a publishing house using numbers to tell whether a new cover really sells better.
The editor has a hunch — but no real certainty.Changing the cover on a hunch alone is risky.
The new cover may just have had one lucky day, not a real difference.We need numbers to separate chance from a real difference.
Hypothesis testing starts by assuming 'no difference', then checks with data.If the p-value falls below the threshold, you drop the 'no difference' assumption.
If the p-value is below the significance level, reject the null; otherwise you fail to reject it — which doesn't prove there's no difference.Hypothesis tests can be wrong too — you judge while accepting a risk of error.
Statistically significant isn't the same as practically important.Even when the p-value points to a difference, you still have to ask if it's worth what the new cover cost.
Statistical hypothesis testing starts by assuming there's no difference, then checks how badly the data clashes with that assumption to judge whether a real difference exists.
Hypothesis testing sets up a null hypothesis (no effect/difference) and an alternative (there is one), computes a p-value from sample data — the probability of seeing a result this extreme by chance if the null were true — and compares it to a significance level (often 0.05) to decide whether to reject the null. Wrongly rejecting a true null is a Type I error; wrongly failing to reject a false null is a Type II error.
When grown-ups say it
- Null Hypothesis
- The starting assumption of 'no difference'. You begin by assuming there's no difference, for now.
- Alternative Hypothesis
- The claim that there IS a difference. Accepted when the null gets rejected.
- p-value
- The chance of a result this extreme or more by luck, if there's really no difference. The smaller it is, the worse the data fits 'no difference'.
- Significance Level
- The judgment threshold (often 0.05). Reject the null when the p-value falls below it.
- Type I Error
- Wrongly saying there IS a difference. The risk of jumping to conclusions.
- Type II Error
- Wrongly saying there is NO difference. The risk of missing a real difference.
- Performance Testing
- A test that measures a system's limits with numbers. A different goal, same reliance on numbers. → the pretend readers who rush in early
- Metamorphic Testing
- Checking via relationships, even without a known answer. A different approach for when there is no known answer at all. → checking by relationship, with no answer key