Null and Alternative Hypotheses for People New to Research
Learn how to write a null and an alternative hypothesis, what a p-value measures, and why failing to reject the null does not prove it true.
Key takeaways
- The null hypothesis gives a precise baseline, such as zero difference, from which the behavior of chance can be calculated.
- The alternative hypothesis states what departure from that baseline you are looking for, and should be chosen before seeing the data.
- A p-value is the probability, assuming the null and the test's other assumptions, of a result at least as extreme as the one observed.
- Failing to reject the null means the evidence was not strong enough, which is different from showing there is no effect.
- Statistical significance says nothing by itself about whether an effect is large or important.
The null hypothesis is a specific, usually skeptical statement that nothing of interest is going on: no difference, no association, or no departure from a stated value. The alternative hypothesis is the claim you would entertain if the data turned out to be hard to reconcile with the null. A statistical test asks how surprising your observations would be if the null were true.
The setup can feel backward at first, because you often care about the alternative and still do your calculations with the null. The reason is practical. "No difference" gives you a definite model that can be used to work out what chance alone would produce. "Some difference of some size" does not pin down enough to calculate with.
Writing the pair
Statisticians label the null H₀ and the alternative H₁ (or Hₐ). Both are statements about the wider process or population, not about the particular numbers you happened to collect. You already know whether your two sample averages differ. The question is what that difference suggests beyond the sample.
| Research question | Null hypothesis | Alternative hypothesis |
|---|---|---|
| Does a coin favor one side? | The probability of heads is 0.5 | The probability of heads is not 0.5 |
| Does a fertilizer change seedling height? | Mean height is the same with and without it | Mean heights differ |
| Is study time related to quiz score? | There is no association between them | There is an association |
Each null is exact enough to be checked against data. Each alternative names the kind of departure that would interest you. A vague idea has to be made measurable before either line can be written, which is the work of an operational definition.
One-sided and two-sided alternatives
A two-sided alternative allows a departure in either direction: the fertilizer could make seedlings taller or shorter. A one-sided alternative looks in only one direction, for instance that the fertilizer makes them taller.
A one-sided test makes it easier to reach a conventional threshold in the chosen direction, so it is tempting to pick it after noticing which way the data lean. That is not legitimate. Use a one-sided alternative only when a departure in the other direction would genuinely lead you to the same conclusion as no effect, and decide this in advance. When in doubt, two-sided is the usual choice.
A worked example with a coin
Suppose you flip a coin 20 times and get 15 heads. The null says the probability of heads is 0.5 and the flips are independent. The alternative says the probability is something else.
If the null is true, there are 2²⁰ = 1,048,576 equally likely sequences. Count the ones with 15 or more heads.
sequences with 15 heads 15,504
sequences with 16 heads 4,845
sequences with 17 heads 1,140
sequences with 18 heads 190
sequences with 19 heads 20
sequences with 20 heads 1
total 21,700
one tail: 21,700 ÷ 1,048,576 ≈ 0.021
two tails: 2 × 0.021 ≈ 0.041 (5 or fewer heads is equally extreme) So a fair coin would give a result at least this lopsided, in either direction, about 4 times in 100 sets of 20 flips. Had you seen 14 heads, the same method gives a two-sided value of about 0.12, which a fair coin produces quite often.
What the p-value does and does not mean
The number you just computed is a p-value. It is calculated by assuming the null is true, so it cannot also tell you the probability that the null is true. A p-value of 0.041 does not mean there is a 4.1 percent chance the coin is fair, or a 95.9 percent chance it is biased.
To judge the probability that the coin is biased, you would also need to know something about how plausible bias was beforehand. A coin from your pocket and a coin from a magic shop deserve different degrees of suspicion after the same 15 heads.
A p-value also depends on the assumptions. If the flips were not independent, or if you kept flipping until the result looked interesting and then stopped, the calculation above no longer describes what you did.
Thresholds and the two kinds of error
Before testing, researchers often choose a significance level, written α. If the p-value is at or below α, they reject the null. The common value 0.05 is a convention that became widespread through habit, and some fields use much stricter ones, such as the five sigma standard in particle physics.
Two mistakes are possible. A Type I error is rejecting a null that is true, a false alarm. A Type II error is failing to reject a null that is false, a miss. The chance of a Type II error is written β, and the quantity 1 − β is called power: the probability that your test detects an effect of a given size when it exists.
Lowering α reduces false alarms and, with everything else fixed, increases misses. Collecting more informative data is the main way to improve both at once. A small study of a modest effect often has low power, so a null result from it says little.
Why you never "accept" the null casually
Imagine three flips that give two heads. This cannot come close to rejecting fairness, yet it hardly shows the coin is fair. A coin that lands heads 70 percent of the time would produce the same thing easily.
That is why careful writers say the study "did not find sufficient evidence of a difference." To argue that an effect is absent or negligible, you need data precise enough to rule out effects large enough to matter. Reporting a confidence interval, a range of effect sizes reasonably compatible with the data, helps readers see this. A narrow interval around zero is informative. A wide one that includes zero and large effects alike is inconclusive. The same distinction appears in absence of evidence and evidence of absence.
When you test many things at once
The meaning of a threshold changes if you run many tests. With α = 0.05, each test of a true null has about a 5 percent chance of a false alarm. Suppose you run 20 independent tests and every null is in fact true.
chance one test gives no false alarm 1 − 0.05 = 0.95
chance all 20 give none 0.95²⁰ ≈ 0.36
chance of at least one false alarm 1 − 0.36 = 0.64 So finding at least one "significant" result among 20 empty comparisons is more likely than not. If you then report only that one, a reader has no way to judge it.
Several remedies exist. You can name one primary comparison in advance and treat the rest as leads to follow up. You can apply a stricter threshold, for example by dividing α by the number of tests, which is called the Bonferroni correction and here gives 0.05 ÷ 20 = 0.0025. Other methods control the expected share of false findings instead. Whatever you choose, report how many tests you ran. Counting only the tests that worked hides the very information needed to weigh them.
Common mix-ups
Treating the null as the opposite of your hope. The null is a specific model. It is often "zero effect," but it can be any stated value, such as a manufacturer's claimed mean of 500 g.
Writing hypotheses about the sample. "My treated group will average more" describes data you can simply inspect. The hypotheses concern what is true beyond those cases.
Reading a large p-value as strong support. A p-value of 0.80 shows that the data are unsurprising under the null. They may be equally unsurprising under many alternatives.
Where the idea came from
Ronald Fisher used the term "null hypothesis" in his 1935 book on experimental design. His famous illustration concerned a person who claimed to tell by taste whether milk or tea had been poured first. With eight cups, four of each kind, and the taster knowing that, there are 70 ways to choose which four had milk first. Pure guessing identifies the right set with probability 1/70.
Jerzy Neyman and Egon Pearson developed a related framework that made alternative hypotheses, error rates and power explicit. Modern textbooks often blend the two approaches, which accounts for some of the confusion beginners feel.
A checklist before you test
- Write H₀ and H₁ in words, about the population or process you care about.
- Decide on one or two sides, and on α, before seeing results.
- Estimate whether your sample is large enough to detect an effect worth detecting.
- Check the assumptions of your chosen test, especially independence.
- Report the size of the effect and its uncertainty along with the p-value.
A tiny difference can be statistically significant in an enormous sample, and a large one can miss the threshold in a small sample. Asking about how big the difference is keeps a yes-or-no verdict from standing in for the finding.