Guides / null hypothesis
The null hypothesis: what it is and how to write one
Every significance test starts by assuming nothing is going on and asking whether the data can overturn that assumption. This guide explains why the logic works backwards, how to state the null and alternative correctly for each design, the errors you are trading off, and the one conclusion you are never entitled to draw.
The null hypothesis, written H0, is the statement that there is no effect, no difference or no relationship in the population. Statistical tests assume it is true and then measure how surprising the observed data would be under that assumption. If the data would be sufficiently unlikely, the null is rejected in favour of the alternative hypothesis.
Definition
What the null hypothesis is
The null hypothesis, written H₀, states that there is no effect, no difference or no relationship in the population. It is the position your test provisionally adopts and then attempts to overturn.
The alternative hypothesis, H₁, is what you are actually interested in: that there is a difference, an effect or a relationship. The two must be mutually exclusive and between them cover every possibility.
| Says | Symbol | |
|---|---|---|
| Null | No effect, no difference, no relationship | H₀ |
| Alternative | There is an effect, difference or relationship | H₁ or Hₐ |
Your sample means will almost never be exactly equal — random variation guarantees a difference. The null claims the difference is zero in the population. The test asks whether the difference you observed is bigger than sampling variation alone would comfortably produce.
Logic
Why the logic runs backwards
It seems perverse to start by assuming the opposite of what you believe. The reason is that only the null is specific enough to calculate with.
“There is no difference” specifies a single value: zero. That is enough to work out exactly how your test statistic would behave across repeated samples, and therefore how unusual your actual result is. “There is a difference”, by contrast, is compatible with infinitely many values — a difference of 0.1, or 5, or 400 — each producing a different distribution. There is nothing definite to compute against.
This asymmetry has a practical consequence for how a study is framed. If your research question is genuinely “are these two things equivalent?” — comparing a cheaper treatment against an established one, say — conventional significance testing is the wrong tool from the outset, and no sample size will fix it. Failing to reject the null cannot demonstrate equivalence however large the study grows. You need an equivalence design, specified as such before data collection, with a pre-agreed margin defining what counts as practically the same.
A defendant is presumed innocent until the evidence is strong enough to convict. Failing to convict does not establish innocence — it means the evidence fell short. The analogy is useful, but note one difference: a court reaches a verdict, whereas a statistical test only ever reports how surprising the evidence was.
This asymmetry is why the conclusions are phrased unevenly. You may “reject the null”, but you may only ever “fail to reject” it. There is no test result that establishes the null is true.
How to write it
Writing H0 and H1 correctly
One further point of precision. The null hypothesis is not a statement about your research being uninteresting, and it is not something you are trying to defend. It is a calculating device: a specific enough claim that the behaviour of your test statistic can be worked out exactly. This is why the null always contains an equality even when the alternative is directional. Writing H₀: μ₁ ≤ μ₂ against H₁: μ₁ > μ₂ looks asymmetric, but the calculation is performed at the boundary — at μ₁ = μ₂ — because that is the point in the null region where a false positive is most likely. If the test controls the error rate there, it controls it everywhere else in the null region too.
Symbols worth knowing
| Symbol | Means |
|---|---|
μ | Population mean |
μ₁, μ₂ | Means of two populations |
ρ | Population correlation |
π or p | Population proportion |
β | Population regression coefficient |
Hypotheses written about sample statistics — “H₀: x̄₁ = x̄₂” — are technically wrong, because you can simply look at your sample means and see whether they are equal. There is nothing to infer. Hypotheses are always claims about populations.
Examples
Worked examples across designs
| Research question | H₀ | H₁ |
|---|---|---|
| Do two teaching methods differ? | μ₁ = μ₂ | μ₁ ≠ μ₂ |
| Is the new method better? | μ₁ ≤ μ₂ | μ₁ > μ₂ |
| Do scores change after training? | μₐₑₜₑₕ = μₖₑ₌ₔₕₑ | μₐₑₜₑₕ ≠ μₖₑ₌ₔₕₑ |
| Are study hours related to grades? | ρ = 0 | ρ ≠ 0 |
| Do three groups differ? | μ₁ = μ₂ = μ₃ | At least one differs |
| Is the pass rate different from 70%? | π = 0.70 | π ≠ 0.70 |
| Are the two variables independent? | No association | An association exists |
Notice that the null in every row above is a single, precise value or a boundary, while each alternative covers a range. That is the asymmetry described earlier, appearing in the notation. It is also why the alternative is never the thing being tested directly: there is no way to compute what your statistic would do under “the means differ by some unspecified amount”.
Writing them out in full
In a dissertation, state them in words as well as symbols:
H₀: There is no difference in mean exam performance between students taught by retrieval practice and students taught by spaced practice (μ₁ = μ₂).
H₁: There is a difference in mean exam performance between students taught by retrieval practice and students taught by spaced practice (μ₁ ≠ μ₂).
For three or more groups the alternative is “at least one mean differs”, not “all means differ”. Writing the latter is a common error, and it also explains why a significant ANOVA needs post-hoc tests to establish which groups actually separate.
Send your research questions and design. A named statistician confirms the hypotheses are testable, the test matches the design, and the sample size is adequate — while it is all still fixable.
See sample size and powerDirectionality
One-tailed or two-tailed?
Two-tailed (default)
H₁: μ₁ ≠ μ₂- Detects a difference in either direction
- Splits α between both tails, .025 each
- The right choice for almost all research
One-tailed
H₁: μ₁ > μ₂- Detects a difference in one direction only
- Puts all of α in one tail
- Needs justification stated in advance
A one-tailed test roughly halves the p-value, which makes it tempting and makes switching to one after seeing the data a recognised form of p-hacking. It is only legitimate when a result in the opposite direction would be treated exactly as a null result would be — that is, when you genuinely would not care and would not report it.
If your intervention turned out to make things significantly worse, would you report that as a finding? If yes — and it almost always is — you need a two-tailed test, because you are interested in both directions.
Errors
Type I and Type II errors
Naming these “Type I” and “Type II” is unhelpful shorthand that obscures what they are, and it is worth translating them each time you use them. A Type I error means you announced a finding that is not there. A Type II error means you missed one that is. Both are failures of the study, but only the first tends to reach print, which is part of why the published literature over-represents effects that later shrink or vanish on replication.
| Error | What happens | Rate | Everyday analogy |
|---|---|---|---|
| Type I | Reject a true null — a false positive | α | Convicting an innocent person |
| Type II | Fail to reject a false null — a false negative | β | Acquitting a guilty one |
Setting α = .05 means accepting a 1-in-20 false positive rate. Tightening it to .01 reduces that risk but makes the test harder to pass, so genuine effects are missed more often. The two error rates trade off directly against each other at any fixed sample size.
The trade-off is easiest to see at the extremes. Set α to zero and you will never make a false positive, because you will never reject anything — and you will therefore miss every real effect. Set it to one and you reject everything, catching every real effect and every spurious one alongside it. Every usable value sits between those two, and choosing one is a judgement about which mistake you would rather make.
Power is the escape route
Statistical power is 1 − β, the probability of detecting an effect that is genuinely there. The convention is 80%. Increasing the sample size is the only lever that reduces both error types at once — which is why power analysis belongs at the design stage rather than after the data are in.
A study with 30% power will miss a real effect seven times in ten. Most non-significant results in small studies are Type II errors rather than genuine nulls, which is precisely why a non-significant p-value cannot be read as evidence of no effect.
Our power analysis calculator gives the sample size required to detect the effect you care about, at the power and significance level you set.
Use the calculatorInterpretation
Why you never accept the null
This is the point examiners test most reliably, and it follows directly from the logic. The test computes how surprising your data would be if the null were true. A large p-value means the data are unsurprising under the null — but they may be equally unsurprising under a great many alternatives.
Suppose you find no significant difference with 20 participants per group. Your data are consistent with a true difference of zero. They are also consistent with a true difference of 3 points, or 6 points, which your study simply lacked the power to detect. Nothing in the result distinguishes those possibilities.
| Do not write | Write instead |
|---|---|
| “We accept the null hypothesis” | “We failed to reject the null hypothesis” |
| “There is no difference” | “No significant difference was detected” |
| “The treatment does not work” | “This study found insufficient evidence that the treatment works” |
| “The variables are unrelated” | “No significant association was found” |
Standard significance testing cannot demonstrate that two things are the same. For that you need an equivalence test, such as two one-sided tests (TOST), where you specify in advance the smallest difference that would matter and test whether the effect falls entirely inside that range. Reporting a confidence interval that excludes all meaningful values achieves much the same thing.
Practice
Fixing the hypothesis before the data
Everything in this guide depends on one condition: the hypothesis and the test were decided before the data were seen. A p-value calculated after the analysis was chosen to suit the result does not mean what it claims to mean.
Why the order matters so much
The p-value assumes a single, pre-specified test. Every additional decision made after seeing the data — a different outcome measure, an added covariate, a dropped outlier, a subgroup — multiplies the opportunities for a chance result to appear, while the reported p-value continues to assume there was only one. The stated error rate quietly becomes fiction.
| Decision | Fixed in advance | Made after seeing data |
|---|---|---|
| The hypothesis | Valid inference | Circular — the data cannot test itself |
| The test | Valid | One of several tried, only the best reported |
| The outcome measure | Valid | Multiplicity, uncorrected |
| Sample size | Valid | Optional stopping inflates false positives |
| Exclusion rules | Valid | Exclusions chosen for their effect on the result |
It is worth separating two things that are routinely confused: the hypothesis and the research question. The research question is broad and may evolve — “does this intervention help?”. The hypothesis is the narrow, testable proposition committed to before the data arrive, tied to one outcome measured one way. A study can legitimately explore many questions while formally testing a single hypothesis, provided the write-up makes clear which is which.
What to write down before collecting data
This is the substance of a pre-registration, and it is increasingly expected in psychology, education and health research. Even where no formal registry is involved, a dated analysis plan in your supervisor's inbox serves the same function and is straightforward to produce.
None of this forbids looking at your data. It requires only that you label what you did. A finding that emerged from exploration is a hypothesis for the next study, not a confirmed result from this one — and saying so plainly is far stronger than presenting it as though it had been predicted all along.
Pitfalls
Six mistakes that cost marks
1. Writing hypotheses about sample statistics
Use population parameters — μ, ρ, π — not x̄ or r. Hypotheses are claims about populations.
2. Saying you accept the null
You fail to reject it. The test can never establish that the null is true.
3. Choosing one-tailed after seeing the data
This halves the p-value on the strength of a result you have already seen. Decide the direction in advance and justify it.
4. Writing hypotheses after the analysis
Fitting the hypothesis to the finding invalidates the p-value, which assumes the test was specified beforehand.
5. Confusing the null with a claim you believe
The null is a working assumption to be tested, not a position you are defending.
6. Treating a non-significant result as proof of no effect
Check the confidence interval. A wide one means the study could not tell, which is a different finding entirely.
Answers
Frequently asked questions
What is a null hypothesis in simple terms?
It is the assumption that nothing is going on — no difference between groups, no relationship between variables, no effect of a treatment. Statistical tests begin by assuming it is true and then measure how unlikely the observed data would be under that assumption.
What is the difference between the null and alternative hypothesis?
The null states there is no effect and always contains an equality; the alternative states there is one. They must be mutually exclusive and cover all possibilities. The null is what you test, and the alternative is usually what you actually expect to find.
Can you prove the null hypothesis?
No. Significance testing can only provide evidence against the null, never for it. A non-significant result means there was insufficient evidence to reject it, which is compatible both with no effect and with a real effect the study was too small to detect.
Why do we say 'fail to reject' instead of 'accept'?
Because the test only measures how surprising the data would be if the null were true. Unsurprising data are consistent with the null but equally consistent with many small effects. Saying you accept the null claims more than the evidence supports.
Should I use a one-tailed or two-tailed test?
Two-tailed in almost all cases. A one-tailed test is only defensible when a result in the opposite direction would be treated exactly as a null result — that is, you genuinely would not report it. The decision must be made and justified before you see the data.
What is the difference between Type I and Type II errors?
A Type I error rejects a true null — a false positive, occurring at rate α, conventionally .05. A Type II error fails to reject a false null — a false negative, at rate β. Lowering one raises the other unless you increase the sample size.
How do I write a null hypothesis for correlation?
State that the population correlation is zero: H0: ρ = 0, with H1: ρ ≠ 0. Use the population symbol ρ rather than the sample statistic r, because the hypothesis is a claim about the population you sampled from.
What is the null hypothesis for ANOVA?
That all group means are equal in the population: H0: μ1 = μ2 = μ3. The alternative is that at least one mean differs — not that all differ. This is why a significant ANOVA requires post-hoc tests to identify which groups actually separate.
Send the data. Get a fixed quote.
Attach your dataset or just describe the project. A named statistician replies with a price and a deadline, usually within one working day.