The Two Sample Z Test of Proportions checks whether two population proportions differ, using one sample from each group. Find each sample proportion, take the difference, and divide it by its standard error to get z. When the null hypothesis says the two proportions are equal, pool the two samples to get the standard error. Then compare z with the critical value (1.96 for a two tail test at α = 0.05) or read the p-value. The test needs large samples: more than 5 successes and more than 5 failures in each group.

Two sample Z test of proportions is the test to determine whether the two populations differ significantly on specific characteristics. In other words, compare the proportion of two different populations that have some single characteristic. It checks whether the gap between the two sample proportions is too large to be chance. A confidence interval for p1 – p2 gives the range of likely values for that gap.

Two Sample Z Test of Proportions

For example, compare the proportion of men baseball players who are right-handed to the proportion of women baseball players who are right-handed.

When to use Two Sample Z Proportion test

The purpose of two sample Z test is to compare the random samples of two populations. Use two sample z test of proportion for large sample size and Fisher exact probability test is an excellent non-parametric test for small sample sizes.

Assumptions of the Two Sample Z Proportion Hypothesis Tests

  • The data are simple random values from both the populations
  • Both populations follow a binomial distribution
  • Samples are independent of each other
  • Test results are accurate when np and n(1-p) are greater than 5

Hypothesis of two sample Z proportion test

  • Null hypothesis: The difference between population proportions is equal to hypothesized difference
  • Alternative hypothesis: The difference between population proportions is not equal to hypothesized difference (two -tailed)
  • The difference between population proportions is greater than hypothesized difference (right-tailed)
  • The difference between population proportions is less than hypothesized difference (left -tailed)

Two Sample Z Test of Proportions Variations

There are 2 ways to compute the two sample Z test of proportions i.e pooled or unpooled. Use the pooled formula only when H0 says p1 = p2. For a nonzero hypothesized difference, use the unpooled standard error. Some courses, such as IASSC, use the unpooled form for p1 = p2 too.

Pooled Z test of proportions formula

Pooled Z test of proportions formula: Z = (p1_hat - p2_hat - 0) / sqrt(p0(1-p0)(1/n1 + 1/n2))
Pooled Calculation

Un-pooled Z test of proportions formula

Two Sample Z Test of Proportions
Unpooled Calculation

Procedure to execute Two Sample Proportion Hypothesis Test

  • State the null hypothesis and alternative hypothesis
  • State alpha, in other words determine the significance level
  • Compute the test statistic
  • Determine the critical value (from critical value table)
  • Define the rejection criteria
  • Finally, interpret the result. If the test statistic falls in critical region, reject the null hypothesis

Two Sample Z Test of Proportions Pooled (ASQ, Villanova)

Two Sample Z Test of Proportions

Where

The one and two sample proportion hypothesis
  • z is test statistic
  • p̂1 and p̂2 are observed proportion of events in the two samples
  • n1 and n2 are sample sizes
  • X1 and X2 are the number of events (successes) in each sample

Example of Two Sample Z Proportion Test (pooled)

Example: A car manufacturer aims to improve the quality of the products by reducing the defects and also increase the customer satisfaction. Therefore, he monitors the efficiency of two assembly lines in the shop floor. In line A there are 18 defects reported out of 200 samples. While the line B shows 25 defects out of 600 cars. At α 5%, is the differences between two assembly procedures are significant?

Define Null and Alternative hypothesis

  • Null Hypothesis: Two proportions are the same
  • Alternative Hypothesis: Two proportions are not the same

α=0.05

State decision rule

Example of  Two Sample Proportion  Test
Two Sample Z Test of Proportions

Critical value is ±1.96, hence reject the null hypothesis if the calculated value is less than -1.96 or greater than +1.96

Calculate Test Statistic

  • Line A= p̂1=18/200= 0.09 = 9%
  • Line B= p̂2 = 25/600 = 0.0417 = 4.17%
Formula for pooled proportion: p0 = (x1 + x2) / (n1 + n2)
  • First compute p0 = (18+25)/(200+600) = 43/800 = 0.0537 =5.37%
  • Now p̂1 – p̂2 = 0.09 – 0.0416 = 0.0484
  • p0 * (1 – p0 ) = 0.0537 * (1-0.0537) = 0.0537 * 0.9463 = 0.0508
  • And (1/n1) + (1/n2) = 0.006667
Formula for two-sample Z test of proportions, with values substituted to calculate the Z-score.
  • So, Z = (0.0484)/ SQRT ( (0.0508) * (0.006667))
  • Z = (0.0484)/ SQRT ( 0.000339)) = (0.0484)/ (0.018406) = 2.62
Two Sample Z Test of Proportions

Interpret the results: Compare Zcalc to Zcritical . In hypothesis testing, a critical value is a point on the test distribution compares to the test statistic to determine whether to reject the null hypothesis. Calculated test statistic value 2.62 and it is in critical region, hence reject the null hypothesis, so, there is a significant difference in two line assembly procedures.

Pooled Z test of proportions formula template

Unlock Additional Members-only Content!

To unlock additional content, please upgrade now to a full membership.
Upgrade to a Full Membership
If you are a member, you can log in here.

Two Sample Z Test of Proportions Pooled (ASQ, Villanova) Helpful Videos

https://www.youtube.com/watch?v=_58qBy9Uxks

Two Sample Z Test of Proportions Un-Pooled (IASSC)

Formula for the unpooled two-sample Z test of proportions, used to calculate the test statistic.
  • z is test statistic
  • p̂1 and p̂2 are observed proportion of events in the two samples
  • n1 and n2 are sample sizes

Example of Two Sample Z Proportion Test (Unpooled)

Example: Researchers want to test the side effects of a new COVID vaccine. In clinical trail 62 out of 300 individuals taking X1 vaccine report side effects. While 48 individuals out of 300 taking X2 vaccine report side effects. At 95% confidence level, is the X1 vaccine working any differently than the X2?

Define Null and Alternative hypothesis

  • Null Hypothesis: Two proportions are the same
  • Alternative Hypothesis: Two proportions are not the same

α=0.05

State decision rule

Z-table highlighting row 1.9 and column 0.06 to find the critical Z-value of 1.96 for a 95% confidence level.
Two-tailed Z-test curve showing critical values of ±1.96; reject H0 if z is outside this range.

Critical value is ±1.96, hence reject the null hypothesis if the calculated value is less than -1.96 or greater than +1.96

Calculate Test Statistic

  • Vaccine X1= p̂1 = 62/300 = 0.2067
  • Vaccine X2 =p̂2= 48/300 = 0.16
  • n1 and n2=300
Formula for the two-sample Z-test statistic of proportions, used to calculate the test value.
  • Now p̂1 – p̂2 = 0.2067 – 0.16 = 0.0467
  • p̂1 (1- p̂1)/n1 = (0.2067*(1-0.2067)) /300 = 0.000547
  • And p̂2 (1- p̂2)/n2 = (0.16*(1-0.16)) /300 = 0.000448
  • Sqrt( (p̂1 (1- p̂1)/n1)+ (p̂2 (1- p̂2)/n2)))= 0.0315
  •  So Z = 0.0467/0.0315 = 1.48
Z-distribution curve showing Z = 1.48 falls inside the 95% non-rejection region between -1.96 and 1.96.

Interpret the results: Compare Zcalc to Zcritical . In hypothesis testing, a critical value is a point on the test distribution compares to the test statistic to determine whether to reject the null hypothesis. Calculated test statistic value 1.48 and it is not in critical region, hence we failed to reject the null hypothesis. There is not enough evidence that the two vaccines differ in their side effect rate.

Unpooled Z test of proportions formula template

Unlock Additional Members-only Content!

To unlock additional content, please upgrade now to a full membership.
Upgrade to a Full Membership
If you are a member, you can log in here.

Two Sample Z Test of Proportions Worked Example: Pooled and Unpooled Side by Side

This is a made-up example. A support team rewrites a help article and wants to know if fewer tickets get reopened. Before the change, 90 of 400 tickets were reopened (22.5%). After the change, 60 of 400 were reopened (15%). Test at α = 0.05, two tail. H0: p1 = p2. Ha: p1 ≠ p2.

  1. Difference in the sample proportions: 0.225 − 0.150 = 0.075.
  2. Pooled proportion: (90 + 60) / (400 + 400) = 150 / 800 = 0.1875.
  3. Pooled standard error: √(0.1875 x 0.8125 x (1/400 + 1/400)) = 0.0276. So z = 0.075 / 0.0276 = 2.72.
  4. Unpooled standard error: √(0.225 x 0.775 / 400 + 0.15 x 0.85 / 400) = 0.0275. So z = 0.075 / 0.0275 = 2.73.
  5. Both values are above the critical value of 1.96, and the two tail p-value is below 0.01. Reject H0. The reopen rate changed.

With equal sample sizes, as here, the pooled and unpooled answers are very close. They drift apart when the sample sizes or the proportions are far apart, so use the form your exam body teaches. A 95% confidence interval for the drop is 0.075 ± 1.96 x 0.0275, or about 0.021 to 0.129. In plain words: the new article cut the reopen rate by somewhere between 2 and 13 percentage points.

To see how many tickets you need to pin down one rate within a set margin of error, use the free sample size calculator. For the one sample version, see one and two sample proportion tests. If you are not sure this is the right test, see which test when and the hypothesis tests study guide. To watch a rate over time instead of comparing two snapshots, use a p chart.

Six Sigma Black Belt Certification Two Sample Proportion Z Test Questions:

Question: What could be the null hypothesis for a two sample proportion test, if the alternative hypothesis is p1 <p2?

(A) Null hypothesis : p1 > p2
(B) Null hypothesis : p1 = p2
(C) Null hypothesis : p1 < p2
(D) Null hypothesis : p1 ≠ p2

Answer:

Unlock Additional Members-only Content!

To unlock additional content, please upgrade now to a full membership.
Upgrade to a Full Membership
If you are a member, you can log in here.

When you’re ready, there are a few ways I can help:

First, join 12,000+ other Six Sigma professionals by subscribing to my email newsletter. A short read every Monday to start your work week off correctly. Always free.

* * *

If you’re looking to pass your Six Sigma Yellow Belt, Green Belt or Black Belt exam, I’d recommend starting with my affordable study guide:

1)→ 🟡Pass Your Six Sigma Yellow Belt: built for ASQ, IASSC and ILSSI, 1,700+ practice questions with explanations, and six full-length mock exams for your exam

2)→ 🟢Pass Your Six Sigma Green Belt: a study guide organized by the exam Body of Knowledge, 1,300+ practice questions with detailed answer explanations, and 20 full-length mock exams

3)→ ⚫Pass Your Six Sigma Black Belt: the full Black Belt Body of Knowledge, 2,200+ practice questions with detailed answer explanations, and 20 full-length mock exams

You’ve spent so much effort learning Lean Six Sigma. Why leave passing your certification exam up to chance? This comprehensive study guide offers 1,700+ exam-like questions for Yellow Belts, 1,300+ for Green Belts and 2,200+ for Black Belts with full answer walkthroughs, access to instructors, detailed study material, and more.

​ Thousands have used this system to prepare. Join them here. 

Author

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.