A p-value is the probability of getting results at least as extreme as the ones you observed, calculated assuming the null hypothesis and the statistical model are true. A small p-value means the data would be unusual if the null were true; it does not give the probability that the null hypothesis is true.
| P-value | Reading | Common wording | Caution |
|---|---|---|---|
| 0.001 | Data would be very unusual if the null were true | Strong evidence against the null | Says nothing about effect size |
| 0.03 | Data would be unusual under the null | Significant at 0.05 | One more observation could change it |
| 0.20 | Data are not unusual under the null | Not significant | Not evidence that the null is true |
| 0.80 | Data fit the null well | No evidence against the null | Still not proof of no effect |
This guide explains what a p-value measures, how software calculates one, and how to read it without overstating it. Every number comes from code we re-ran, and the examples use illustrative data. It belongs to the Statistics guides.
P-Value Meaning: What It Is and What It Is Not
A p-value measures how surprising your data are under one specific assumption, the null hypothesis. It is a probability, so it falls between 0 and 1, and it comes from a statistical model fitted to your data.
The null hypothesis, written H0, is the default claim, such as "this coin is fair" or "the two groups have the same mean." The alternative hypothesis states what you suspect instead. A hypothesis test boils your sample down to one test statistic, T, which says how far the data sit from H0. The p-value, p, is the probability of a statistic at least as extreme as the one you observed, tobs, when H0 and the model hold.
An exact zero is never reported in practice. When software prints 0.000, the honest report is p < 0.001. Three corrections come up so often that they belong right here:
- A p-value is not the probability that the null hypothesis is true. It is computed by assuming the null is true, so it cannot also measure that assumption.
- A p-value is not the probability that your result happened by chance. It describes how rarely chance alone would produce data this extreme, which is a statement about the model.
- A p-value is not an effect size. A tiny one can accompany a negligible effect, and a large one can accompany a big effect measured on few observations.
How a P-Value Is Calculated
Every p-value comes from four moves: compute a test statistic, describe its null distribution, measure the tail area beyond the observed value, and decide how many tails count. Software does the arithmetic, but each step is a choice you can inspect.
Step 1: Compute the Test Statistic
The test statistic compresses the sample into one number. For a one-sample t-test it is the sample mean minus the hypothesized mean, divided by the standard error. A z-score works the same way and counts how many standard errors the estimate sits from the null value.
The how to do a t-test guide shows this step with real data. Below, n is the sample size and df the degrees of freedom, which set the exact shape of the t distribution.
Step 2: Describe the Null Distribution
The null distribution shows how the statistic would vary if H0 were true and you repeated the study many times. It is the standard normal curve for a z-statistic, a t distribution for a t-statistic, and a binomial distribution for counts such as heads in coin flips.
These choices carry assumptions, so look at the histogram shapes of your data before trusting a normal-based test.
Step 3: Find the P-Value as a Tail Area
The p-value is the area under the null distribution beyond the observed statistic. It is P(T ≥ tobs | H0) for a right-tailed test, P(T ≤ tobs | H0) for a left-tailed test, and P(|T| ≥ |tobs| | H0) for a two-sided test.
Step 4: Choose One-Tailed or Two-Tailed
A two-tailed test counts extreme results in both directions, and a one-tailed test counts only the direction you predicted. When the null distribution is symmetric and the effect lands in the predicted direction, the two-sided p-value is twice the one-sided value.
Pick the tails before you see the data, because switching to one tail after a two-tailed miss manufactures significance. For discrete tests such as the binomial, the definition of "two-sided" varies, so check your software.
Worked Example 1: An Exact P-Value from Coin Flips
Coin flips give the cleanest exact p-value because the null distribution is a binomial you can write down. The result also shows how fragile the 0.05 line is.
Question. A coin lands heads 60 times in 100 flips. Is that unusual for a fair coin? The data are illustrative.
Setup. H0: the coin is fair, so the chance of heads is 0.5. The test is two-sided, because a coin biased toward tails would also be interesting.
Calculation. Add the binomial probabilities of every outcome at least as far from 50 heads as 60 is. Software gives a two-sided p-value of 0.0569. The one-sided value, P(heads ≥ 60), is 0.0284, and doubling it gives the two-sided figure because this null distribution is symmetric.
| Heads | Two-sided p | One-sided p | At 0.05, two-sided |
|---|---|---|---|
| 58 | 0.1332 | 0.0666 | Fail to reject |
| 59 | 0.0886 | 0.0443 | Fail to reject |
| 60 | 0.0569 | 0.0284 | Fail to reject |
| 61 | 0.0352 | 0.0176 | Reject |
| 62 | 0.0210 | 0.0105 | Reject |
Interpretation. At 60 heads you fail to reject H0 at 0.05, and at 61 heads you reject it. The coin did not change, and the evidence barely moved. The 0.05 line is a convention, not a cliff, so report the exact p-value and let readers judge it.
Worked Example 2: P-Values from a z-Statistic and a t-Statistic
When you already have a test statistic, the p-value is a lookup in the matching distribution. The same statistic gives a larger p-value under a t distribution than under a normal one, because the t distribution has heavier tails.
Question. What p-value goes with z = 1.96, and with t = 2.50 on 14 degrees of freedom?
Calculation. For z = 1.96 the right tail is 0.025, so the two-sided p-value is 0.04999, or 0.050 to three decimals. A one-sided test with z = 1.645 gives 0.0500. For t = 2.50 with df = 14, the two-sided p-value is 0.02547 and the one-sided value is 0.01273.
The critical value is the statistic that sits exactly at your cutoff: 2.145 for a two-sided test at 0.05 with 14 degrees of freedom, where p = 0.0500. Older tables list critical values instead of p-values for that reason.
Interpretation. The statistic t = 2.50 sits past the critical value, so p = 0.0255 is below 0.05. For real data, the Welch t-statistic of −4.733 from the t-test article gives p = 0.000329, reported as p < 0.001 or p = 0.0003.
How to Interpret a P-Value
Read a p-value as a measure of how poorly your data fit the null hypothesis, on a sliding scale. Smaller values mean a worse fit, and no single number turns evidence into proof.
- Below 0.01: the data would be rare under the null. This is strong evidence against it, given the model.
- 0.01 to 0.05: the data would be unusual under the null. The evidence against it is moderate.
- 0.05 to 0.10: the data are borderline, and a follow-up study is worth considering.
- Above 0.10: little evidence against the null. The data fit no effect, and they fit a modest effect too.
These bands are a reading aid, and fields differ in how strict they are. The decision rule is separate: you reject H0 when p ≤ α, with α fixed before the study, and otherwise you fail to reject it. Never write "accept the null" or "proved," because a large p-value only says the data gave no strong evidence against it.
Pair the p-value with an effect size and a confidence interval. Check for extreme points too, since one outlier can swing a p-value; the guide on how to find outliers shows how. For correlation, the p-value tests whether the true correlation is zero, as the correlation coefficient article explains.
P-Value vs Significance Level (Alpha) vs Confidence Level
The p-value is a summary computed from your data, while the significance level and confidence level are rates you choose in advance. Mixing them up is behind many misreadings.
| Term | What it is | Set when | Example | Uses the data? |
|---|---|---|---|---|
| P-value | Probability of a result at least as extreme, assuming the null | After the data | 0.036 | Yes |
| Significance level (α) | Type I error rate you accept for the decision rule | Before the study | 0.05 | No |
| Confidence level | Long-run coverage of the interval method, 1 − α | Before the study | 95% | No |
A Type I error is rejecting a true null hypothesis, a false positive, and α is the long-run rate of those errors your decision procedure allows. A p-value of 0.03 does not mean a 3% chance of a false positive on this result.
The link to confidence intervals is exact for the standard t- and z-based cases: a two-sided 95% confidence interval excludes the null value if and only if the two-sided p-value for that test is below 0.05. The interval adds what the p-value lacks, the range of effect sizes the data support.
P-Value vs Effect Size: Why Small P Does Not Mean Big Effect
A p-value depends on both the size of the effect and the amount of data, so a tiny effect can produce a tiny p-value in a huge sample. Effect size says how large the difference is.
Question. Two groups of 100,000 differ by 0.02 standard deviations. Is that "highly significant"? The data are illustrative.
Calculation. The effect size d is the mean difference divided by the standard deviation, here 0.02. The standard error of the difference is the square root of 2/100,000, which is 0.004472. So z = 0.02 / 0.004472 = 4.47, and the two-sided normal-approximation p-value is 7.7 × 10−6.
Result. The p-value is tiny, yet 0.02 standard deviations is negligible. The standard deviation is the yardstick that makes this visible.
Flip the situation with a small sample. Take two groups of five, scoring 10, 12, 9, 15, 11 and 13, 16, 12, 19, 14. The mean difference is 3.4 points, a large effect of d = 1.33, yet a two-sample t-test gives t(8) = 2.11 and p = 0.068. Five observations per group cannot rule out chance.
A/B test dashboards hit the first case often. With millions of visitors, a lift of a hundredth of a percentage point can be "significant," so weigh the estimated lift against what it is worth in your KPI examples. Teams in marketing see this whenever test traffic grows.
What a P-Value Does Not Tell You: 6 Common Misconceptions
A p-value answers one narrow question, and most misreadings ask it to answer a different one. Here are six, each with its correction.
- "It is the probability that the null hypothesis is true." The p-value is computed given that the null is true. The probability of the null given your data also needs a prior, such as how plausible the null was beforehand.
- "It is the probability the result is due to chance." The calculation already assumes chance is the only process at work.
- "It is the Type I error rate." The error rate belongs to the decision rule, fixed in advance. The p-value belongs to your one dataset.
- "A large p-value shows there is no effect." It shows the data gave no strong evidence against the null. Small samples and noisy measurements give large p-values even when effects exist.
- "A small p-value means a large or important effect." Sample size drives the p-value as much as the effect does.
- "A significant result is real, causal and will replicate." A p-value cannot see bias, confounding or a broken design. For the causal question, read correlation vs causation.
The first misconception can be tested with arithmetic. Suppose 10% of the hypotheses a team tests are truly non-null, the tests have 80% statistical power, and α is 0.05. Of 1,000 hypotheses, the 900 true nulls produce 45 false positives, and the 100 real effects produce 80 detections.
That makes 125 significant results, and 45 of them, or 36%, are false positives: 0.045 / (0.045 + 0.08). If half the hypotheses were truly non-null, the share would drop to 5.9%. Treat 36% as a demonstration, because it depends entirely on the assumed prior and power.
Why P-Values Are Uniform Under the Null (and Why Multiple Tests Inflate Errors)
When the null is true and the test statistic is continuous, p-values are spread evenly between 0 and 1. That is why 5% of them land below 0.05, and why running many tests produces false alarms.
A simulation shows it. The script runs 10,000 two-sample t-tests with 30 observations per group, both groups drawn from the same standard normal distribution, so the null is true every time.
Python (NumPy 2.5.3, SciPy 1.18.1)
import numpy as np
from scipy import stats
rng = np.random.default_rng(42)
a = rng.normal(size=(10000, 30)); b = rng.normal(size=(10000, 30))
p = stats.ttest_ind(a, b, axis=1).pvalue
print((p < 0.05).mean(), (p < 0.5).mean(), p.mean())
# 0.0484 0.491 0.5043822767914031
In our run, 4.84% of p-values fell below 0.05, 49.1% fell below 0.5, and the mean was 0.504. A different seed or library version shifts the third decimal, and the flat pattern stays.
Now run many tests at once. With m independent tests at level α and every null true, the chance of at least one false positive is 1 − (1 − α)m: 22.6% for 5 tests at 0.05, and 64.2% for 20.
The Bonferroni correction divides α by the number of tests, so 20 tests use 0.05 / 20 = 0.0025 each. It controls the error rate but is conservative and can miss real effects. Searching through comparisons until one crosses 0.05, known as p-hacking, yields results that rarely survive replication.
How to Find a P-Value: Excel, R, Python and Amridata Tools
Every common tool computes a p-value in one line once you have the statistic or the raw counts. The outputs below match the examples above.
Excel
=T.DIST.2T(ABS(2.5), 14) → 0.02547
=2*(1-NORM.S.DIST(ABS(1.96), TRUE)) → 0.0500
The ABS() wrapper matters because T.DIST.2T returns an error for negative inputs.
R
2*pt(-abs(2.5), 14) # 0.02547
2*pnorm(-1.96) # 0.0500
binom.test(60, 100)$p.value # 0.0569
The binom.test help page documents the exact binomial test.
Python (SciPy 1.18.1)
from scipy import stats
stats.binomtest(60, 100, 0.5).pvalue # 0.0569
2 * stats.t.sf(2.5, 14) # 0.02547
2 * stats.norm.sf(1.96) # 0.04999579
The SciPy binomtest reference lists the test options.
To paste data instead of writing code, the t-test calculator reports a p-value for one-sample, Welch, Student's and paired tests, and the linear regression calculator labels its slope test "p-value (2-tail)". The correlation calculator shows a p-value for Pearson's r only, which the Pearson vs Spearman article helps you weigh. Any tool's p-value is only as valid as the assumptions behind its test, and interpreting regression results shows how to read one in a coefficient table.
How to Report P-Values
Report the exact p-value with the test, the effect size and a confidence interval. A bare "p < 0.05" hides most of what readers need.
- Give exact values. Write p = 0.036, and use p < 0.001 for very small ones. Never write p = 0.000.
- Name the test and the tails. Include degrees of freedom or sample sizes, and say whether the test was one- or two-sided.
- Fix α in advance. State whether your rule uses < or ≤ and keep it throughout.
- Skip rescue language. Phrases like "trending toward significance" invite readers to treat 0.068 as a near miss.
Model sentence, significant (illustrative): The coin landed heads 61 times in 100 flips (61%, 95% exact CI 50.7% to 70.6%); an exact two-sided binomial test gave p = 0.035.
Model sentence, not significant (illustrative): Group B scored 3.4 points higher (95% CI −0.3 to 7.1, d = 1.33); a two-sample t-test gave t(8) = 2.11, p = 0.068, with five participants per group.
The P-Value Debate and the ASA Statement
Statisticians agree on what a p-value is and disagree on how much weight it should carry. The American Statistical Association's 2016 statement cautions against bright-line thresholds and against treating a p-value as the only basis for a conclusion.
A 2019 editorial in the same journal urged moving beyond "p < 0.05" and dropping the label "statistically significant." A 2018 proposal by Benjamin and colleagues would instead set a stricter default of 0.005 for claims of new discoveries. A third position keeps p-values and reads them alongside confidence intervals, effect sizes and replication. The ASA statement is on its publisher page, and the wider workflow is covered in statistical analysis.
Frequently Asked Questions
What is a p-value in simple terms?
A p-value tells you how surprising your data would be if nothing were going on. It is the probability of a result at least as extreme as yours when the null hypothesis is true. Smaller values mean a worse fit with the null, never the probability that the null is true.
What is a good p-value?
No p-value is good or bad alone. Compare it with a significance level chosen before the study, commonly 0.05, and read smaller values as stronger evidence against the null hypothesis. Smaller is not "better," because it says nothing about whether the effect is large or useful.
What does p < 0.05 mean?
If the null hypothesis and model were true, results at least this extreme would occur less than 5% of the time. By convention you then reject the null at the 0.05 level. The threshold is a widely used habit that varies by field, and it is not a law of statistics.
Is a p-value the probability that the null hypothesis is true?
No. The p-value is calculated assuming the null is true, so it cannot measure that probability. Finding it needs extra information, such as how plausible the null was before the study. In our illustration, a significant result at 0.05 had a 36% chance of being a false positive.
What is the difference between a p-value and alpha?
Alpha is the false-positive rate you accept, fixed before collecting data, such as 0.05. The p-value is calculated from your data afterward. You compare them: reject the null when the p-value is at or below alpha. Alpha describes the decision rule, and the p-value summarizes one dataset.
Can a p-value be 0?
It can get arbitrarily close to zero, but a reported value of exactly 0 is not meaningful. Software prints 0.000 when the value is below its display precision. Report it as p < 0.001, or as the smallest value your software can represent, rather than writing p = 0.
What is the difference between a p-value and a confidence interval?
A p-value measures how compatible your data are with one null value, while a confidence interval gives a range of values the data support. For standard t- and z-based tests they agree: a 95% interval excludes the null value exactly when the two-sided p-value is below 0.05. The interval also shows effect size.
Does a small p-value mean the effect is important?
No. A p-value depends on sample size as well as effect size, so a negligible effect can give a tiny p-value in a large sample. In our example, a 0.02 standard deviation difference produced p = 7.7 × 10−6. Judge importance from the effect size, its confidence interval and the context.
Key Takeaways
- A p-value is the probability of a result at least as extreme as yours, calculated assuming the null hypothesis and the model are true.
- It is not the probability that the null is true, not the chance the result was luck, and not the Type I error rate.
- The 0.05 line is a convention: in our coin example, going from 60 to 61 heads moved p from 0.0569 to 0.0352.
- Sample size drives p as much as effect size does, so report an effect size and a confidence interval with it.
- Under a true null, p-values are uniform, and 20 tests at 0.05 give a 64.2% chance of at least one false positive.