Key Facts
- Category
- Math, Date & Finance
- Input Types
- number, select
- Output Type
- json
- Sample Coverage
- 4
- API Ready
- Yes
Overview
The Two Proportion Z Test Calculator allows you to compare two independent proportions to determine if there is a statistically significant difference between them. By inputting the number of successes and trials for two groups, you can instantly calculate the Z-statistic, P-value, and evaluate your null hypothesis using a pooled variance approach.
When to Use
- •When evaluating the results of an A/B test to see if a new variation significantly outperforms the control group.
- •When comparing conversion rates, click-through rates, or success metrics between two independent demographic segments.
- •When determining if the difference between two observed sample proportions is due to random chance or a true underlying effect.
How It Works
- •Enter the number of successes and total trials for Group 1 and Group 2.
- •Set your hypothesized difference (usually 0), alternative hypothesis (two-sided, greater, or less), and alpha level.
- •The calculator computes the sample proportions, the pooled proportion, and the standard error.
- •Review the resulting JSON output, which includes the Z-statistic, P-value, and a boolean indicating whether to reject the null hypothesis.
Use Cases
Examples
1. A/B Testing Conversion Rates
Growth Marketer- Background
- A marketing team ran an A/B test on a landing page. The control group had 45 conversions out of 100 visitors, while the variant had 60 conversions out of 100 visitors.
- Problem
- Determine if the variant's higher conversion rate is statistically significant or just random noise.
- How to Use
- Input 60 successes and 100 trials for Group 1 (variant), and 45 successes and 100 trials for Group 2 (control). Keep the hypothesized difference at 0, use a two-sided alternative, and set alpha to 0.05.
- Example Config
-
Group 1 Successes: 60, Group 1 Trials: 100, Group 2 Successes: 45, Group 2 Trials: 100, Alternative: two-sided, Alpha: 0.05 - Outcome
- The calculator outputs a Z-statistic of 2.124 and a P-value of 0.0337. Since the P-value is less than 0.05, 'rejectNull' is true, confirming the variant performs significantly better.
2. Comparing Treatment Efficacy
Clinical Researcher- Background
- A study compares two medications. Medication A cured 150 out of 200 patients, while Medication B cured 130 out of 200 patients.
- Problem
- Test if Medication A has a strictly greater success rate than Medication B.
- How to Use
- Enter 150 successes and 200 trials for Group 1, and 130 successes and 200 trials for Group 2. Change the Alternative Hypothesis to 'Greater Than'.
- Example Config
-
Group 1 Successes: 150, Group 1 Trials: 200, Group 2 Successes: 130, Group 2 Trials: 200, Alternative: greater, Alpha: 0.05 - Outcome
- The tool calculates the proportions (0.75 vs 0.65) and returns a one-sided P-value, allowing the researcher to conclude if Medication A is statistically superior.
Try with Samples
math-&-numbersFAQ
What is a pooled two-proportion Z-test?
It is a statistical test used to determine if the difference between two independent sample proportions is significant, assuming the null hypothesis that the proportions are equal.
What does the alpha value represent?
The alpha value, or significance level, is the probability of rejecting the null hypothesis when it is actually true. A common default is 0.05 (5%).
Can I test for a specific difference other than zero?
Yes, you can adjust the 'Hypothesized Difference' input to test if the difference between the two proportions equals a specific non-zero value.
What does 'rejectNull: true' mean in the output?
It means the calculated P-value is less than your specified alpha level, indicating a statistically significant difference between the two groups.
What is the difference between a two-sided and one-sided test?
A two-sided test checks for any difference (greater or less) between the proportions, while a one-sided test checks for a difference in one specific direction.