med study partner

Articles & Guides › Articles › Biostatistics & Public Health

Hypothesis testing, errors and power

What the null hypothesis and a p-value mean and what they don't, why statistical significance differs from clinical importance, how type I and type II errors arise and why multiple comparisons inflate false positives, and which factors set a study's power and sample size.

Biostatistics & Public Health · 6 min read · Reviewed 2026-11-17

Every study that compares groups has to decide whether the difference it found is real or could have happened by chance. Hypothesis testing is the framework for that decision, and it can go wrong in two opposite ways. This article covers the null hypothesis and what a p-value does and doesn't mean, type I and type II errors, and statistical power and what determines it.

Key points

  • The null hypothesis states there is no difference; a p-value is the probability of a result at least this extreme if the null hypothesis were true, not the probability that it is true.
  • A result is statistically significant when p is below the alpha chosen in advance, usually 0.05; statistical significance says nothing about clinical importance.
  • A type I error is a false positive, with probability alpha; a type II error is a false negative, with probability beta, usually from a study that is too small.
  • Testing many outcomes or subgroups inflates false positives; a prespecified primary outcome and corrections such as Bonferroni guard against it.
  • Power (1 − beta) rises with sample size, effect size and alpha and falls with variability; a nonsignificant result from an underpowered study is inconclusive.

Null hypothesis and p-values

The hypotheses

The null hypothesis (H₀) states that there is no difference or no association: the drug works no better than placebo, or the relative risk is 1. The alternative hypothesis (H₁) states that there is a difference. A study gathers evidence to see whether it can reject the null hypothesis.

What a p-value is

The p-value is the probability of getting a result at least as extreme as the one observed, if the null hypothesis were true[1]. A small p-value means the data would be surprising if there were really no difference.

Alpha (α), the significance level, is chosen before the study, usually 0.05. If p < α, the result is statistically significant and the null hypothesis is rejected. If p ≥ α, the study fails to reject the null hypothesis, which is not the same as showing there is no difference.

What a p-value isn't

  • It isn't the probability that the null hypothesis is true.
  • It isn't the probability that the result happened by chance alone.
  • It doesn't measure how large or important an effect is.
  • A p of 0.04 isn't meaningfully "more true" than a p of 0.06; the 0.05 line is a convention[1,2].

So "p = 0.03" doesn't mean a 3% chance that the drug doesn't work. It means that if the drug truly had no effect, a difference this large or larger would appear by chance 3% of the time.

Statistical versus clinical significance

With a very large sample, tiny differences become statistically significant. A cholesterol drug that lowers LDL by 2 mg/dL with p < 0.001 is statistically significant but unlikely to matter to patients. Always look at the size of the effect and its confidence interval, not just the p-value[2].

One-tailed and two-tailed tests

A two-tailed test looks for a difference in either direction and is the standard. A one-tailed test looks in only one direction; it has more power there but can't detect harm in the other direction.

Type I and type II errors

The four outcomes

Truth: a real difference existsTruth: no real difference
Study rejects H₀ ("significant")Correct: this probability is the power (1 − β)Type I error (α): a false positive
Study fails to reject H₀ ("not significant")Type II error (β): a false negativeCorrect
  • A type I error concludes there is a difference when there isn't: a false alarm. Its probability is set by α, usually 5%.
  • A type II error concludes there is no difference when there is: a miss. Its probability is β, often set at 20%, and it usually comes from a study that is too small.

There is a trade-off: for the same sample size, making α stricter reduces type I errors but increases type II errors.

A small trial of 40 patients that finds no significant difference between two treatments, followed by a trial of 4,000 that shows one is clearly better, illustrates a type II error. The small trial's result wasn't evidence of no difference; it was simply too small to see one. Absence of evidence isn't evidence of absence[3].

Multiple comparisons

Each test at α = 0.05 carries a 5% chance of a false positive. If 15 independent outcomes, subgroups or time points are tested and none has a real effect, the chance of at least one "significant" result is 1 − 0.95¹⁵, about 54%[4].

  • The Bonferroni correction divides α by the number of tests: 0.05 ÷ 15, about 0.0033 per test.
  • Prespecifying a single primary outcome protects against the problem in the first place.
  • Findings from many secondary or subgroup analyses should be treated as hypotheses to test in new studies, not as conclusions[4].

Statistical power and sample size

What power is

Power = 1 − β, the probability of correctly detecting a real difference of a given size. Trials usually aim for 80% or 90% power, calculated before enrollment[5].

What increases power

FactorChange that increases power
Sample sizeLarger: the factor investigators control most directly
Effect sizeLarger difference between groups, which is easier to detect
Variability of the outcomeSmaller, through more precise measurement or a more uniform population
AlphaLarger, such as 0.05 instead of 0.01, at the cost of more type I errors
One-tailed testMore power in one direction, though rarely appropriate
Event rateHigher, giving more events to compare

Sample size calculations

A sample size calculation works backward: given the smallest difference that would matter clinically, the expected variability, α and the desired power, how many participants are needed? Because the required sample rises steeply as the target difference shrinks, a trial designed to detect a 3 mm Hg difference in blood pressure needs many more participants than one designed to detect 6 mm Hg. Halving the target difference roughly quadruples the sample needed[5].

Underpowered studies

An underpowered study that finds "no significant difference" is inconclusive, not reassuring. Its confidence interval will be wide, stretching from no effect to an important one[3]. A larger sample doesn't make a true effect bigger; it makes the estimate more precise, so a real effect is more likely to reach significance.

Common confusions

  • The p-value isn't the probability the null hypothesis is true: it assumes the null is true and asks how surprising the data are.
  • Type I versus type II: a false positive controlled by α versus a false negative controlled by power and sample size.
  • Nonsignificant doesn't mean no difference: especially in small studies, check the confidence interval.
  • Significant doesn't mean important: a large enough study makes trivial differences significant.

References

  1. Wasserstein RL, Lazar NA. The ASA statement on p-values: context, process, and purpose. Am Stat. 2016;70(2):129-133. doi:10.1080/00031305.2016.1154108 Link ↩
  2. Sterne JA, Davey Smith G. Sifting the evidence—what's wrong with significance tests? BMJ. 2001;322(7280):226-231. doi:10.1136/bmj.322.7280.226 Link ↩
  3. Altman DG, Bland JM. Absence of evidence is not evidence of absence. BMJ. 1995;311(7003):485. doi:10.1136/bmj.311.7003.485 Link ↩
  4. Schulz KF, Grimes DA. Multiplicity in randomised trials II: subgroup and interim analyses. Lancet. 2005;365(9471):1657-1661. doi:10.1016/S0140-6736(05)66516-6 Link ↩
  5. Schulz KF, Grimes DA. Sample size calculations in randomised trials: mandatory and mystical. Lancet. 2005;365(9467):1348-1353. doi:10.1016/S0140-6736(05)61034-3 Link ↩

Test yourself in the Question Bank · Listen to the podcasts