Convert a test statistic into a p-value for z, t and chi-square tests.
The p-value is the probability of observing a test statistic as extreme as the one computed — or more extreme — if the null hypothesis is true. A small p-value (typically < 0.05) is evidence against H₀, not proof that H₁ is true. For a z-test the p-value is derived from the standard normal CDF. For a t-test it uses the t-distribution with n−1 degrees of freedom. For a chi-square test (goodness of fit, independence) it uses the upper tail of the chi-square distribution.
Two-tailed z p-value
p = 2 × (1 − Φ(|z|))
One-tailed z (right)
p = 1 − Φ(z)
Chi-square p-value
p = upper-tail area of the chi-square distribution
A two-tailed test asks 'is the parameter different from the null value in either direction?' and splits α equally between both tails. A one-tailed test asks 'is it specifically larger (or smaller)?' and puts all of α in one tail. One-tailed tests have more power for detecting an effect in the predicted direction but miss effects in the opposite direction.
No, this is a common misconception. The p-value is the probability of data this extreme given H₀ is true, not the probability that H₀ is true. It tells you about the data given the hypothesis, not about the hypothesis given the data.
For a goodness-of-fit test with k categories: df = k − 1. For a contingency table with r rows and c columns: df = (r−1)(c−1). For testing a single variance: df = n − 1.
The 0.05 threshold was proposed by Ronald Fisher in the 1920s as a convenient cut-off, not a universal law. Modern practice increasingly reports exact p-values rather than simply 'significant/not significant'. The threshold should depend on the cost of false positives in your application — medical trials often require p < 0.001.