Before you run a t-test, an ANOVA, or any other test, you state two competing claims about the world: the null hypothesis and the alternative hypothesis. The whole machinery of significance testing is just a way of deciding which one your data supports.
The null hypothesis (H₀)
The null hypothesis is the "nothing is happening" claim — no difference, no effect, no relationship. It's the default position the test tries to disprove. Examples:
- The new drug works no better than the placebo.
- The two teaching methods produce the same average score.
- There is no correlation between hours studied and exam grade.
Symbolically these are written as equalities: H₀: μ₁ = μ₂, or H₀: r = 0.
The alternative hypothesis (H₁ or Hₐ)
The alternative hypothesis is what you actually suspect or hope to show — that there is a difference, effect, or relationship. It's the claim you accept only if the data gives you enough evidence against the null.
- The drug does outperform placebo.
- The two methods produce different average scores.
- Study time and grade are correlated.
Key mindset: you never "prove" the alternative. You gather evidence against the null. If that evidence is strong enough (a small p-value), you reject H₀ in favour of H₁. If not, you fail to reject H₀ — which is not the same as proving it true.
Directional vs non-directional
The alternative can be phrased two ways, and this choice determines whether you run a one-tailed or two-tailed test:
| Type | Alternative hypothesis | Test |
|---|---|---|
| Non-directional | μ₁ ≠ μ₂ (they differ, either way) | Two-tailed |
| Directional | μ₁ > μ₂ (specifically greater) | One-tailed |
Use a two-tailed alternative unless you have a strong prior reason to test only one direction — it's the more conservative, widely accepted default.
How to write them: a worked example
You want to know if a new website design changes the average time users spend on a page (currently 60 seconds).
- H₀: μ = 60 — the new design does not change average time on page.
- H₁: μ ≠ 60 — the new design changes average time on page.
You then collect data, run a one-sample t-test, and look at the p-value. If p < 0.05, you reject H₀ and conclude the design made a difference.
Common mistakes
- Putting the effect in the null. The null is always the "no effect / equals" statement — never the thing you're trying to demonstrate.
- Choosing the direction after seeing the data. Decide one- vs two-tailed before collecting data, or you inflate your false-positive rate.
- Reading "fail to reject" as "the null is true." It only means you lacked sufficient evidence — possibly because your sample was too small (low power).
Put it into practice
Run a t-test on your hypothesis →Enter your data; we return the p-value and a plain-English verdict on H₀.Related reading: Interpreting p-values · Type I & II errors · One- vs two-tailed tests · Choosing a statistical test.