P Value Calculator

Compute precise p‑values from z‑scores, t‑statistics, chi‑square, and F‑statistics. Visualize the sampling distribution, identify critical regions, and make evidence‑based decisions at your chosen significance level (α).

Enter the computed test statistic (z, t, χ², or F).
(df)
Required for t, χ², and F distributions.
Choose based on your alternative hypothesis (H₁).
? z‑test: z=1.96, α=0.05, two‑tailed
? t‑test: t=2.31, df=14, α=0.05, two‑tailed
? Chi‑Square: χ²=9.21, df=3, α=0.05, right‑tailed
? F‑test: F=3.89, df₁=4, df₂=20, α=0.05, right‑tailed
⬅ Left‑tailed: z=-1.64, α=0.05, left‑tailed
Privacy first: All calculations run locally in your browser. No data is sent to any server.

What is a P‑Value?

In statistical hypothesis testing, the p‑value (probability value) is the probability of obtaining a test statistic at least as extreme as the one observed, assuming that the null hypothesis (H₀) is true. It quantifies the strength of the evidence against H₀. A small p‑value (typically ≤ 0.05) indicates strong evidence against the null hypothesis, suggesting that the observed effect is unlikely to be due to random chance alone.

p‑value = P( T ≥ tobs | H₀ )   or   P( T ≤ tobs | H₀ )   or   2·P( T ≥ |tobs| | H₀ )

where T is the test statistic under the null distribution, and tobs is the observed value.

How to Interpret the P‑Value

  • p ≤ α : Reject the null hypothesis. The result is statistically significant. There is sufficient evidence to support the alternative hypothesis.
  • p > α : Fail to reject the null hypothesis. The result is not statistically significant. There is insufficient evidence to support the alternative hypothesis.
  • The p‑value is not the probability that H₀ is true, nor the probability that the effect is due to chance. It is a conditional probability under H₀.
  • Common significance levels: α = 0.10, 0.05, 0.01, 0.001. The choice depends on the field and the consequences of Type I error.
Case Study: Clinical Trial

A pharmaceutical company tests a new drug to reduce blood pressure. In a randomized controlled trial with 100 patients, the mean reduction in the treatment group is 8.2 mmHg, while the placebo group shows a mean reduction of 4.5 mmHg. The computed t‑statistic is 2.89 with 98 degrees of freedom, yielding a two‑tailed p‑value of 0.0047. At α = 0.05, the result is statistically significant (p = 0.0047 < 0.05), suggesting that the drug is effective. The 95% confidence interval for the mean difference is [2.4, 5.0] mmHg, further supporting the clinical significance of the effect.

Common Misconceptions About P‑Values

  • Misconception 1: "The p‑value is the probability that the null hypothesis is true."
    Correct: The p‑value is P(data | H₀), not P(H₀ | data). It assumes H₀ is true and asks how likely the observed data (or more extreme) would be.
  • Misconception 2: "A p‑value of 0.05 means there is a 5% chance of making a Type I error."
    Correct: The significance level α is the pre‑specified Type I error rate. The p‑value itself is not the error rate; it is a measure of evidence.
  • Misconception 3: "If p > 0.05, there is no effect."
    Correct: A non‑significant result does not prove the absence of an effect. It simply means the data do not provide strong evidence against H₀. The effect may be small or the sample size insufficient.
  • Misconception 4: "A smaller p‑value means a larger effect size."
    Correct: P‑value depends on both effect size and sample size. A very small p‑value can arise from a large sample with a tiny effect, or a small sample with a large effect.

Supported Distributions & Use Cases

Distribution Common Test Typical Use Parameters
Normal (z) z‑test Comparing means with known variance, large samples z‑score
Student's t t‑test Comparing means with unknown variance, small samples t‑statistic, degrees of freedom (df)
Chi‑Square χ² test Goodness‑of‑fit, independence, variance tests χ² statistic, df
F F‑test ANOVA, comparing variances, regression overall F‑statistic, df₁, df₂

Step‑by‑Step Computation

  1. Define hypotheses: State H₀ (null) and H₁ (alternative).
  2. Choose significance level α: Typically 0.05, but field‑dependent.
  3. Compute the test statistic: From your sample data (z, t, χ², or F).
  4. Determine the p‑value: Use the appropriate distribution and tail type.
  5. Compare p with α: If p ≤ α, reject H₀; otherwise, fail to reject.
  6. Interpret: Report the p‑value and its implications in context.

For a two‑tailed z‑test:   p = 2 · [1 − Φ(|z|)]
For a right‑tailed t‑test:   p = 1 − Ft(t | df)
For a chi‑square test:   p = 1 − Fχ²(χ² | df)
For an F‑test:   p = 1 − FF(F | df₁, df₂)

Practical Applications Across Disciplines

  • Medicine & Public Health: Clinical trials, epidemiological studies, drug efficacy testing.
  • Economics & Finance: Testing market efficiency, policy impact, asset pricing models.
  • Psychology & Social Sciences: Behavioral experiments, survey analysis, educational interventions.
  • Engineering & Quality Control: Process improvement, reliability testing, A/B testing in manufacturing.
  • Data Science & Machine Learning: Feature selection, model comparison, A/B testing in digital products.

Frequently Asked Questions

A one‑tailed (directional) test evaluates whether the effect is in a specific direction (e.g., greater than or less than). A two‑tailed (non‑directional) test evaluates whether the effect is different from zero in either direction. Two‑tailed tests are more conservative (larger p‑values for the same test statistic) and are used when the direction is not specified a priori.

The most common threshold is α = 0.05, meaning a 5% chance of a Type I error. However, thresholds vary by field: particle physics uses 0.0000003 (5σ), while social sciences often use 0.05 or 0.01. The threshold should be pre‑specified and justified based on the context and consequences of errors.

This calculator supports the four most common distributions: Normal (z), t, Chi‑Square, and F. Many tests (z‑test, t‑test, ANOVA, regression F‑test, chi‑square tests) can be evaluated here. For other distributions (e.g., binomial, Poisson), please see our other tools.

The calculations use double‑precision floating point and validated numerical methods (adaptive Simpson integration for t, χ², and F; error function for Normal). Accuracy is typically better than 1×10⁻⁶, which is more than sufficient for research and educational purposes.

For z‑tests and t‑tests, a negative test statistic indicates the effect is in the opposite direction. The calculator handles negative values appropriately: for two‑tailed tests, it uses the absolute value; for left‑tailed tests, it computes the cumulative probability from −∞ to the statistic; for right‑tailed, it uses the upper tail. Chi‑Square and F statistics are always non‑negative.

Start with authoritative resources: Khan Academy, Nature Methods, and textbooks like "Statistical Inference" by Casella & Berger, or "The Practice of Statistics" by Starnes & Yates.
References: The ASA Statement on P‑Values; Wikipedia: P‑value; Fisher, R.A. (1925) "Statistical Methods for Research Workers"; Wasserstein, R.L. & Lazar, N.A. (2016) "The ASA Statement on P‑Values: Context, Process, and Purpose".