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 calculates the range of values that is likely to include the difference between the population proportions.

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.

Pooled Z test of proportions formula

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
  • 1 and p̂2 are observed proportion of events in the two samples
  • n1 and n2 are sample sizes
  • X1 and X2 are number of trails

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.0416 = 4.16%
  • 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
  • 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.

Thank You for being a Member!

Here’s some of the bonus content that is only available to you as a paying member.

B:  The null hypothesis for both one tail and two tail test p1 always equal to p2 .

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.