p statistics calculator

One-Proportion p-Statistic Calculator

Use this calculator to compute the z test statistic, p-value, and confidence interval for a one-proportion hypothesis test.

Educational use: this tool applies the normal approximation for a one-proportion z test.

What is a p statistic?

In everyday conversation, people often say “p statistic” when they actually mean one of two things: the test statistic (such as a z-score) or the p-value. This calculator gives you both for a one-proportion test.

  • Test statistic (z): measures how far your sample result is from the hypothesized value.
  • p-value: probability of seeing a result at least this extreme if the null hypothesis were true.

Formula used by this calculator

Step 1: Sample proportion

p̂ = x / n

Step 2: Standard error under H₀

SE₀ = sqrt( p₀(1 − p₀) / n )

Step 3: z test statistic

z = (p̂ − p₀) / SE₀

Step 4: p-value by tail type

  • Two-sided: p-value = 2 × (1 − Φ(|z|))
  • Right-tailed: p-value = 1 − Φ(z)
  • Left-tailed: p-value = Φ(z)

Here, Φ is the standard normal cumulative distribution function.

How to use the calculator

  1. Enter the number of successes x.
  2. Enter sample size n.
  3. Enter your null hypothesis proportion p₀ (between 0 and 1).
  4. Select the alternative hypothesis (two-sided, right-tailed, or left-tailed).
  5. Choose a confidence level (used for CI and alpha decision).
  6. Click Calculate.

Interpreting the output

The results panel includes:

  • Sample proportion (p̂): your observed proportion.
  • z statistic: how many standard errors away p̂ is from p₀.
  • p-value: strength of evidence against the null hypothesis.
  • Confidence interval: plausible range for the true population proportion.
  • Decision: reject or fail to reject H₀ at your selected alpha level.

Quick example

Suppose 56 out of 100 survey respondents prefer a product, and you want to test whether the true preference rate differs from 50%.

  • x = 56, n = 100, p₀ = 0.50
  • Alternative: two-sided
  • Confidence: 95% (alpha = 0.05)

The calculator will produce a positive z-score, a p-value, and a decision rule based on alpha. If p-value < 0.05, reject H₀. Otherwise, fail to reject H₀.

Assumptions and limitations

  • Data should come from a random or representative sample.
  • Observations should be independent.
  • Normal approximation works best when n·p₀ and n·(1−p₀) are both reasonably large (often at least 10).
  • For very small samples or extreme proportions, exact methods may be better.

Common mistakes to avoid

1) Confusing p-value with probability the null is true

A p-value is not “the probability that H₀ is true.” It is a conditional probability assuming H₀ is true.

2) Picking one-tailed after seeing data

Choose one-tailed vs. two-tailed before looking at results to avoid bias.

3) Ignoring practical significance

A tiny p-value can happen with huge samples even for small effects. Always consider real-world impact.

When should you use a different test?

If your outcome is not binary (success/failure), this is not the right tool. Consider:

  • t-tests for means
  • chi-square tests for categorical association
  • two-proportion z tests for comparing two groups

Tip: Save your assumptions and hypothesis statements alongside your calculations to make your statistical reporting clear and reproducible.

🔗 Related Calculators