What is a p-value?
Last updated: 2026-11-23
A p-value is the probability of getting a result at least as extreme as the one you saw, if the null hypothesis were true. The null hypothesis is the "nothing is going on" assumption, such as a coin being fair. A small p-value says your data would be surprising under that assumption. It does not say how likely the assumption is.
Start learning No account needed
1. A p-value in plain words
A p-value starts from an assumption and asks about the data. You assume the null hypothesis is true, you work out how the results would be spread out under that assumption, and then you ask what share of that spread is as extreme as your result or more so. That share is the p-value, and it runs from 0 to 1.
The phrase "at least as extreme" matters. The probability of seeing exactly your result is usually tiny, even for a result that is not unusual, so the p-value counts the whole tail: your result and the results further out. Which tail or tails count depends on the question you asked before you looked at the data.
2. A worked example: 16 heads in 20 flips
You flip a coin 20 times and get 16 heads. The null hypothesis is that the coin is fair, so each flip is heads with probability 0.5. Under that assumption, the 20 flips can come out in 220 = 1,048,576 equally likely sequences of heads and tails, and the number of those with exactly k heads is "20 choose k".
| Heads | 16 | 17 | 18 | 19 | 20 |
|---|---|---|---|---|---|
| Sequences | 4,845 | 1,140 | 190 | 20 | 1 |
| Probability | 0.004621 | 0.001087 | 0.000181 | 0.000019 | 0.000001 |
Getting 16 or more heads can happen in 4,845 + 1,140 + 190 + 20 + 1 = 6,196 of the 1,048,576 sequences. So the one-sided p-value is 6,196 / 1,048,576 = 0.0059, or about 0.6 percent.
If you had been just as interested in 16 or more tails, which means 4 or fewer heads, you would count that tail too. By symmetry it holds another 6,196 sequences, so the two-sided p-value is 12,392 / 1,048,576 = 0.0118, or about 1.2 percent. For comparison, 15 or more heads would have given 21,700 / 1,048,576 = 0.0207 one-sided, so a result a little less extreme gives a noticeably larger p-value.
Read the 0.0118 this way: if the coin were fair, about 1.2 percent of runs of 20 flips would land 6 or more flips away from 10 heads, in either direction. Whether that is surprising enough to doubt the coin is your call, and many fields use 0.05 as a cutoff set before looking at the data. The script givesone-sided p-value = 6196 / 1048576 = 0.0059 and two-sided p-value = 12392 / 1048576 = 0.0118. They come from a short script, p-value-example.mjs, that does the same arithmetic.
3. A common misconception: p = 0.012 means a 1.2 percent chance the coin is fair
This is the most common misreading. The calculation above assumed the coin is fair and counted how often a fair coin gives a result like yours. It did not assign a probability to the coin being fair. The p-value is the probability of data like yours given the null hypothesis, and the misreading swaps that around into the probability of the null hypothesis given your data.
Here is a case where the two come apart. Suppose the coin came out of a bag of 1,000 coins, where 999 are fair and 1 lands heads 80 percent of the time. A fair coin gives exactly 16 heads with probability 0.004621, so about 4.62 of the 999 fair coins would show 16 heads. The biased coin gives exactly 16 heads with probability 0.2182. Among the coins that show 16 heads, the share that are fair is 4.616 / (4.616 + 0.2182) = 0.955. The p-value is small, yet the chance this coin is fair is about 95 percent, because fair coins were so common to begin with. Going from the p-value to the chance the null is true needs that starting information, which the p-value does not contain.
A related mistake is reading a large p-value as proof of the null. With only 20 flips, a result near 10 heads gives a large p-value, and 20 flips cannot separate a fair coin from one that is slightly off. It says the data did not surprise the null, not that the null is true.
4. Test yourself
Close this page and explain, to someone else or to an empty room, what the 0.0118 in the coin example is the probability of, and why it is not the probability that the coin is fair. Then reopen the page and compare. The first place your explanation drifted is the part to study again.
If you are working through a statistics course, how to learn statistics on your own covers where p-values fit. For the general method, see how to test yourself.
What the sources found, and their limits
American Statistical Association, statement on p-values, 2016. Its six principles say a p-value can indicate how incompatible the data are with a specified statistical model, that it does not measure the probability that the studied hypothesis is true, that conclusions should not rest only on whether it passes a threshold, and that it does not measure the size of an effect or the importance of a result. Those are the four points this page rests on. Source: the ASA's release of the statement, read on 2026-11-23.
NIST/SEMATECH e-Handbook of Statistical Methods, section 7.1.3.1. It defines the p-value as the probability of the test statistic being at least as extreme as the one observed, given that the null hypothesis is true, and advises deciding in advance how small a p-value is needed to reject. Source: Critical values and p values, read on 2026-11-23. Limits: the page we read for the ASA is the association's summary of the six principles, not the full statement with its elaborating paragraphs. The coin, the bag of 1,000 coins and the figures on this page are ours, made up to show the arithmetic.
How Professor Turing helps
Professor Turing is a tutor for adults learning any subject, in college or on their own. It asks you questions instead of giving the final answer, does not grade a bare guess, and remembers what you got wrong. No account is needed to start.
Bring a topic you are studying, such as what a p-value is the probability of. Its first reply asks what you already know before it teaches anything. If you answer with a bare guess, such as a term, it asks how you got there instead of saying right or wrong, and when you stay stuck it changes its approach and makes the next step smaller instead of giving the final answer. Later in a session it can offer a short test without help, scored apart from the tutoring, so you can tell what you can do alone from what the tutor carried you through.
It does not read or mark a written answer, and it does not write your explanation for you, so the explanation has to be yours. You must be 18 or older, and conversations are deleted after 7 days.
FAQ
Is p < 0.05 a rule? No. The 0.05 line is a convention that many fields use, and the p-value itself is a number you can report as it is. A cutoff is meant to be chosen before looking at the data, and a result just above or below it is not a different kind of result.
Does a small p-value mean the effect is large? No. A p-value says how surprising the data would be under the null, and with a lot of data a tiny difference can give a small p-value. In our example, 16 heads in 20 flips is a large difference from 10, and it still gave 0.0118, so the size of the effect and the p-value are different questions.
Start with what you're working on
Tell the tutor which topic you are studying and let it ask you the questions.
Start learning No account needed
See also: all study guides