What is p-value?
Formally, the p-value is the probability that the test statistic will produce values at least as extreme as the value it produced for your sample, calculated under the assumption that the null hypothesis H₀ is true.
More intuitively, the p-value answers the question: "Assuming that I live in a world where the null hypothesis holds, how probable is it that, for another sample, the test I'm performing will generate a value at least as extreme as the one I observed?"
How do I calculate p-value from test statistic?
The p-value depends on the alternative hypothesis (left-tailed, right-tailed, or two-tailed) and the distribution of the test statistic under H₀. Using the cumulative distribution function (CDF):
- Left-tailed test: p-value = CDF(x)
- Right-tailed test: p-value = 1 − CDF(x)
- Two-tailed test: p-value = 2 × min{CDF(x), 1 − CDF(x)}
How to interpret p-value
The p-value is the smallest significance level (α) at which the null hypothesis would be rejected:
- If p-value ≤ α → reject H₀ and accept the alternative hypothesis
- If p-value > α → insufficient evidence to reject H₀
A significance level of α = 0.05 is the most common threshold, but 0.01 and 0.10 are also frequently used. Always report the exact p-value so readers can draw their own conclusions.
How do I find p-value from z-score?
For a standard normal (Z) distribution:
- Left-tailed: p = Φ(z)
- Right-tailed: p = 1 − Φ(z)
- Two-tailed: p = 2 × Φ(−|z|)
Example: z = 1.96, two-tailed → p ≈ 2 × Φ(−1.96) ≈ 0.0500. This is the boundary for the 5% significance level.
P-value from z-score: an example
Suppose you conduct a one-sample z-test and get z = 2.5. For a two-tailed test:
- Φ(2.5) ≈ 0.9938
- p = 2 × (1 − 0.9938) = 2 × 0.0062 = 0.0124
- Since 0.0124 < 0.05, you reject H₀ at the 5% significance level.
How do I find p-value from t?
Use the t-Student distribution with df degrees of freedom. For a one-sample t-test: df = n − 1. Enter your t statistic and degrees of freedom into the calculator above.
p-value from chi-square score (χ² score)
The chi-square distribution is right-skewed and only takes non-negative values. Enter your χ² statistic and degrees of freedom. A right-tailed test is most common (testing whether the observed value is surprisingly large).
p-value from F-score
The F-distribution requires two degrees of freedom parameters: df₁ (numerator) and df₂ (denominator). Used in ANOVA, regression F-tests, and variance ratio tests. A right-tailed test is most common for F statistics.
Frequently Asked Questions
- What does a p-value of 0.05 mean?
- It means that if the null hypothesis is true, there is a 5% chance of observing a test statistic at least as extreme as the one you got.
- Is a smaller p-value always better?
- A smaller p-value provides stronger evidence against H₀, but it doesn't measure effect size or practical significance. Always consider the context.
- What is the difference between one-tailed and two-tailed tests?
- A two-tailed test checks for deviations in both directions (H₁: μ ≠ μ₀), while one-tailed tests check only one direction (H₁: μ > μ₀ or H₁: μ < μ₀).
- What p-value is statistically significant?
- Conventionally, p < 0.05 is considered statistically significant, p < 0.01 is highly significant, and p < 0.001 is very highly significant. However, these thresholds are arbitrary — always report the exact p-value.