Calculator inputs
Example data table
| Scenario | Successes | Sample size | Proportion | Use case |
|---|---|---|---|---|
| Email campaign A | 62 | 150 | 41.33% | First group in a two-sample test |
| Email campaign B | 45 | 140 | 32.14% | Second group in a two-sample test |
| Support resolution target | 56 | 120 | 46.67% | One-sample test against a 40% benchmark |
Formula used
One-sample proportion z test
Sample proportion: p̂ = x / n
Standard error under H0: SE = √[p0(1 − p0) / n]
Test statistic: z = (p̂ − p0) / SE
Two-sample proportion z test
Group proportions: p̂1 = x1 / n1 and p̂2 = x2 / n2
Pooled proportion: p̂ = (x1 + x2) / (n1 + n2)
Test standard error: SE = √[p̂(1 − p̂)(1/n1 + 1/n2)]
Test statistic: z = (p̂1 − p̂2) / SE
Confidence interval and effect size
Interval form: estimate ± z* × standard error
Cohen’s h: h = 2asin(√p1) − 2asin(√p2), or compare p̂ with p0 in one-sample mode.
How to use this calculator
- Choose one-sample mode for a benchmark test, or two-sample mode for comparing independent groups.
- Enter success counts and total sample sizes as whole numbers.
- Set the alternative hypothesis, alpha level, and preferred confidence level.
- Click Calculate to place the result panel directly below the header and above the form.
- Review the z statistic, p value, interval, effect size, and assumption checks before drawing conclusions.
- Use the CSV or PDF buttons to export the generated result summary.
FAQs
1. When should I use a one-sample proportion z test?
Use it when one sample is compared with a known or claimed population proportion, such as a quality target, historical rate, or published benchmark.
2. When is the two-sample version appropriate?
Use the two-sample test when you want to compare proportions from two independent groups, such as version A versus version B or treatment versus control.
3. What does the p value tell me?
The p value measures how unusual your observed result would be if the null hypothesis were true. Smaller values indicate stronger evidence against the null.
4. Why are assumption checks included?
The normal approximation behind a z test works best when expected successes and failures are sufficiently large and observations are reasonably independent.
5. What is Cohen’s h?
Cohen’s h is a standardized effect size for proportions. It helps judge practical magnitude, not only statistical significance, across one-sample or two-sample settings.
6. Can I use percentages instead of counts?
Enter raw counts for successes and sample sizes. The calculator converts them into sample proportions automatically and then computes the z test outputs.
7. Why can significance and practical importance differ?
Large samples can make tiny differences statistically significant. Effect size and interval width help you judge whether the difference is also meaningful.
8. Does this replace full statistical analysis?
No. It is a fast decision-support tool. Study design, sampling quality, independence, and domain context still matter before reporting final conclusions.