P-value Calculator
Calculate the exact p-value for a Z, t, Chi-Square, or F test statistic and check statistical significance at alpha = 0.05.
How It's Calculated
Formula
p = P(X \geq |x_{\text{obs}}|) \quad\text{where } X \sim \text{(Z, t, }\chi^2\text{, or F distribution)}A p-value is the probability of observing a test statistic at least as extreme as the one calculated, assuming the null hypothesis is true. This calculator evaluates that probability directly from the exact distribution for four common test types. For a Z test, it uses the standard normal cumulative distribution function. For a t test, it uses the Student's t-distribution via the regularized incomplete beta function, driven by the degrees of freedom. For a Chi-Square test, it uses the regularized incomplete gamma function, also driven by degrees of freedom. For an F test, it uses the incomplete beta function again, this time driven by both the numerator and denominator degrees of freedom. In every case a smaller p-value means the observed statistic is less likely under the null hypothesis — conventionally, p < 0.05 is treated as statistically significant, and that threshold is flagged automatically.
Worked Examples
Two-tailed Z test: z = 1.96
- Standard normal CDF at 1.96: Φ(1.96) ≈ 0.9750
- Two-tailed p-value: 2 × (1 − 0.9750) = 2 × 0.0250 = 0.0500
- 0.05 is right at the conventional significance threshold, so this is borderline significant.
Chi-Square test: chi2 = 11.07, df = 5
- Upper-tail p-value: Q(df/2, chi2/2) = Q(2.5, 5.535)
- Evaluating the regularized upper incomplete gamma function gives p ≈ 0.0500
- Since p ≈ 0.05, this matches the standard chi-square critical value table for df = 5 at the 5% level.
Frequently Asked Questions
What does a small p-value actually mean?
A small p-value means the observed test statistic would be unusual if the null hypothesis were true — the smaller the p-value, the stronger the evidence against the null hypothesis. It does NOT measure the probability the null hypothesis is true, nor the size or importance of an effect.
When should I use a one-tailed vs. two-tailed test?
A two-tailed test checks whether the statistic differs from the null hypothesis in either direction, and is the more conservative, more commonly used default. A one-tailed test only checks one specific direction and should only be chosen when that direction was decided before looking at the data. Chi-Square and F tests conventionally use only the upper tail, since both statistics are always non-negative and larger values always indicate a bigger deviation from the null hypothesis.
Why do Chi-Square and F tests not have a tail-type option?
Both the Chi-Square and F statistics are always zero or positive, and a larger value always represents a bigger departure from the null hypothesis in the same direction. Because of this, the p-value convention for these two tests is always the upper-tail probability — there is no meaningful equivalent to a lower-tail or two-tailed version.
Why does the t test need degrees of freedom but the Z test doesn't?
The standard normal distribution used by a Z test has a single fixed shape. The t-distribution's shape instead depends on its degrees of freedom (typically sample size minus one) — with few degrees of freedom it has heavier tails than the normal distribution, and it converges toward the normal distribution as degrees of freedom grows large.