Convert any test statistic (Z, t, χ², or F) into a precise p‑value using the appropriate probability distribution. Visualize the distribution, tail areas, and significance level on an interactive canvas.
The p‑value is the probability of obtaining a test statistic at least as extreme as the one observed, assuming the null hypothesis is true. It quantifies the strength of evidence against the null hypothesis. A small p‑value (typically ≤ 0.05) indicates strong evidence against the null hypothesis, suggesting that the observed effect is statistically significant.
P‑value = P( T ≥ tobs | H₀ ) (for right‑tailed tests)
P‑value = 2 · P( T ≥ |tobs| | H₀ ) (for two‑tailed tests)
The interpretation of the p‑value depends on the chosen significance level (α). If p ≤ α, we reject the null hypothesis in favor of the alternative. Common thresholds are α = 0.05, 0.01, and 0.001, corresponding to 95%, 99%, and 99.9% confidence levels, respectively.
| Distribution | Test Statistic | Typical Application | Parameters |
|---|---|---|---|
| Z (Normal) | Z‑score | Large‑sample means, proportions; known population variance | — |
| t (Student) | t‑statistic | Small‑sample means; unknown population variance; regression coefficients | ν (degrees of freedom) |
| χ² (Chi‑Square) | χ²‑statistic | Goodness‑of‑fit, independence tests, variance estimation | ν (degrees of freedom) |
| F (Fisher‑Snedecor) | F‑statistic | ANOVA, comparison of variances, regression model fit | ν₁ (numerator), ν₂ (denominator) |
The calculator uses numerical integration and special function approximations to compute cumulative distribution functions (CDFs) for each supported distribution. For the normal distribution, we use a high‑accuracy error function (erf) approximation. For the t distribution, we employ the incomplete beta function via continued fractions. The chi‑square distribution uses the incomplete gamma function, and the F distribution uses the incomplete beta function. All implementations follow standard numerical recipes and are validated against known quantiles from statistical tables.
Once the CDF is computed, the p‑value is derived based on the selected tail type:
The interactive canvas plots the probability density function (PDF) of the selected distribution, marks the observed test statistic, and shades the p‑value region as well as the critical region defined by α.
A pharmaceutical company conducts a randomized controlled trial to test whether a new drug lowers blood pressure more effectively than a placebo. The researchers calculate a t‑statistic of 2.045 with 30 degrees of freedom, using a two‑tailed test at α = 0.05.
Using this calculator, the p‑value is 0.0498, which is just below 0.05. The verdict is statistically significant, indicating that the observed difference is unlikely to be due to chance. The 95% confidence interval for the treatment effect would not include zero, supporting the drug's efficacy. The interactive graph shows the t‑distribution with the critical regions shaded in green and the p‑value area in gray.
Key insight: The p‑value alone does not measure the magnitude or practical importance of the effect. Always consider effect sizes and clinical relevance alongside statistical significance.
A p‑value from a two‑tailed test is directly related to the confidence interval. If a 95% confidence interval (CI) does not contain the null value (e.g., 0 for a mean difference, 1 for a risk ratio), then the p‑value will be ≤ 0.05. The p‑value provides a continuous measure of evidence, while the CI provides a range of plausible values for the parameter of interest. Together, they offer a more complete picture of the statistical evidence and practical significance.