It is conditional.
The calculation assumes H₀, the chosen test, sampling process and model assumptions.
Statistical foundations · optional calculation guide
See how software turns a medical comparison into a test statistic, compares it with results expected under H₀ and prints a p-value.
Use this when: you understand the plain-language idea and want to see the calculation.
You will follow: data → H₀ → test statistic → reference distribution → p-value.
Main guide: What a p-value means.
The calculation
Record the group values or model coefficient.
Specify H₀ and the value it predicts.
Standardise the observed departure from H₀.
Ask how that statistic behaves if H₀ and the model are correct.
Count results at least as extreme as the one observed.
Assuming H₀ and the statistical model are correct, the p-value is the probability of obtaining the observed test statistic, or one at least as incompatible with H₀ as the statistic actually observed.
Standalone worked example
| Appointment message | Did not attend | Attended | Observed total |
|---|---|---|---|
| Usual letter | 50 | 50 | 100 |
| Letter plus text reminder | 36 | 64 | 100 |
The reminder group’s attendance was 64%, compared with 50% for the letter-only group: a difference of 14 percentage points (approximate 95% CI 0.4 to 27.6). The p-value describes the null-model compatibility; it does not measure the size, importance or cause of the difference.
What it represents
The calculation assumes H₀, the chosen test, sampling process and model assumptions.
A frequentist p-value does not assign probabilities to H₀ or H₁.
Use the estimate and confidence interval for direction, magnitude and precision.
Compare the effect with a justified medical threshold, harms, benefits and context.
Design, confounding, selection, measurement and assumptions govern causal interpretation.
P-values from bivariate analyses do not determine which covariates enter an adjustment set.
Check your understanding
Answer: assuming independence, the null hypothesis and the chi-square model are correct, a χ² statistic at least as large as about 4.00 would occur in roughly 4.6% of repeated comparable samples. It is not a 4.6% probability that H₀ is true.