Tutorials

P-values and confidence intervals, honestly

What a p-value does and does not measure, how to read a confidence interval, and how to report uncertainty without turning it into proof.

A p-value measures how surprising the data would be if a specified null hypothesis were true. A confidence interval gives a range of plausible values for the effect. The interval is usually more informative than the p-value because it shows both the direction and the uncertainty.

What a p-value is

A p-value is calculated under a null model, such as "the two groups have the same mean". It is the probability of observing a test statistic at least as extreme as the one obtained, assuming the null model and the other assumptions of the test are true.

It is not the probability that the null hypothesis is true. It is not the probability that the result is due to chance. It is not a measure of effect size. A tiny p-value can accompany a trivial difference if the sample is large, and a large p-value can accompany an important difference if the sample is small and noisy.

What a confidence interval is

A 95 percent confidence interval is constructed by a procedure that captures the true parameter in about 95 percent of repeated experiments, under the model. For a single interval, the practical interpretation is that values inside the interval are compatible with the data, and values outside are less compatible.

The interval shows the precision of the estimate. A narrow interval around a small effect is strong evidence that the effect is small. A wide interval around a large effect is weak evidence about the size, even if the p-value is small.

The relationship between them

For a simple two-sided test, a 95 percent confidence interval that excludes zero corresponds to a p-value below 0.05. The two are different ways of summarising the same model-based calculation.

They are not interchangeable in interpretation. The p-value answers "how surprising is this under the null?" The interval answers "what values are plausible?" A report that gives only p-values hides the size and precision of the effect.

Statistical versus biological significance

A result can be statistically detectable and biologically unimportant. With enough samples, a difference of a few percent can produce a small p-value. Whether that difference matters depends on the system, the measurement and the decision.

Conversely, a biologically important difference can fail to reach significance in a small, noisy experiment. Absence of evidence is not evidence of absence. The confidence interval shows how much uncertainty remains.

Multiplicity

When many hypotheses are tested, some small p-values are expected by chance. A study that tests thousands of genes, proteins or pathways needs a correction or a model that controls the false discovery rate.

A correction is not a punishment for doing many tests. It is an acknowledgement that the question has changed from "is this one comparison surprising?" to "which of these many comparisons are worth following up?" Report the correction and the adjusted values.

Small samples

Small samples produce uncertain estimates and wide intervals. A non-significant result from a small experiment may mean that the study could not detect an effect that is really there.

Do not interpret a p-value of 0.06 as proof of no effect, or a p-value of 0.04 as proof of a real effect. Look at the interval and the design. If the interval includes both trivial and important effects, the experiment is not informative enough to decide.

One-sided and two-sided tests

A two-sided test asks whether the effect differs in either direction. A one-sided test asks whether it differs in a specified direction. One-sided tests can be appropriate when a direction was pre-specified and the opposite direction is not of interest.

Choosing a one-sided test after seeing that the effect went in the expected direction is a form of data-dependent choice that invalidates the p-value. The direction and the test should be decided before the analysis.

Equivalence and non-inferiority

Sometimes the question is not "is there a difference?" but "is the difference small enough to be unimportant?" An equivalence test specifies a margin and asks whether the interval lies within it. This is a different design and needs a different sample size calculation.

A non-significant difference test is not an equivalence test. Failure to detect a difference does not show that the treatments are equivalent.

Reporting honestly

Report the estimate, the confidence interval, the sample size and the test. State the null hypothesis and whether the test was one- or two-sided. If multiple comparisons were made, report the correction.

Avoid language that turns a p-value into a certainty. "The treatment increased the marker" is stronger than the data support if the interval is wide. "The data are compatible with an increase of between X and Y" is more accurate.

A checklist for reading a result

  • What is the estimate, and what units is it in?
  • How wide is the confidence interval?
  • What was the null hypothesis?
  • How many comparisons were made?
  • Was the sample size adequate for the question?
  • Is the effect biologically meaningful?
  • Does the design support a causal claim?

Key points

  • A p-value is computed under a null model; it is not the probability of truth.
  • A confidence interval shows the size and precision of an effect.
  • Statistical significance is not biological importance.
  • Many tests need a multiplicity correction.
  • A non-significant result is not proof of no effect.

Common mistakes

  • Saying a p-value is the probability the result is due to chance.
  • Reporting p-values without effect sizes.
  • Treating p < 0.05 as a binary proof.
  • Switching to a one-sided test after seeing the direction.
  • Calling a non-significant difference equivalent.

When to ask for help

If the interval is wide, if the design has many outcomes, or if you need to plan an adequate sample size, ask for a review. You can order an analysis or read the effect size and power guide. The Biostatistics & Experimental Design course covers intervals and testing, and the free sample size calculator helps with planning.

Sources and further reading

When to ask for help. If your data or design do not fit a tutorial, order an analysis and we will reply with a fixed price.

Written by the Solagene team for research and education. Found an error? Tell us and we will correct it.