How this calculator works
- Step 1Statisticz or tHow far the sample is from the null value.
- Step 2Tail areaP(as extreme)Area beyond it under the curve.
- Step 3Decidep < α ?Reject the null if p is below α.
The p-value is the chance of getting a test statistic at least as extreme as yours if the null hypothesis were true. Small p-values are evidence against the null.
For a left-tailed test the area is below the statistic, for a right-tailed test above it, and for a two-tailed test it is twice the smaller tail.
Worked example: OpenStax Example 9.16
- p
P(T₉ > 1.9781)
- Sample size10
- Degrees of freedom10 − 19
- Tailright (>)
- p-value0.0397
OpenStax prints p = 0.0396; the unrounded value is 0.03965, which shows here as 0.0397. Either way it is below 0.05, so the null is rejected at the 5% level.
Read the result
- z = 1.96, two-tailedp = 0.0500The familiar 5% cut-off for a normal test.
- t = 1.96, 5 dfp = 0.1073Small samples have heavier tails, so p is larger.
OpenStax Example 9.14: z = −2.08, left-tailed, gives p = 0.0188. Example 9.17: z = 0.6, two-tailed, gives p = 0.5485.
Assumptions and limits
- Under the nullIt assumes the null hypothesis is true.
- Not P(null)It is not the chance the null is true.
- Not effect sizeA tiny effect can have a tiny p with a big sample.
- Assumptionsz and t tests assume random samples and roughly normal data.
Related statistics tools
A p-value comes from a test statistic. The tests and distributions behind it have their own tools.
To compare two means, use the t-test calculator, or for counts in categories, the chi-square calculator. The z-score calculator finds a statistic from raw values.
Common mistakes
Mistake: Choosing the tail after seeing the data.
Instead: Set the alternative hypothesis first.
Mistake: Using z for a small sample with unknown σ.
Instead: Use t with n − 1 degrees of freedom.
Mistake: Reading p = 0.06 as “no effect”.
Instead: It means the evidence is not strong enough at 5%.
Checking the method
A separate script re-works every golden value with the error function and by integrating the t curve numerically, and reproduces six OpenStax examples.
Read how we test our calculators, or browse more maths calculators.