7.4 - Comparing Two Independent Proportions

Printer-friendly versionPrinter-friendly version

Example 3

In the same survey used for example 2, students were asked whether they think same sex marriage should be legal. We’ll compare the proportions saying yes for males and females. Notice that the response is categorical (yes or no). Recall from the previous page that when comparing two proportions – For proportions there consideration to using "pooled" or "unpooled" is based on the hypothesis: if testing "no difference" between the two proportions then we will pool the variance, however, if testing for a specific difference (e.g. the difference between two proportions is 0.1, 0.02, etc --- i.e. the value in Ho is a number other than 0) then unpooled will be used.  In this example with Ho being "no difference" (i.e. 0 is the null value) we will use the pooled estimate method.

Step 1: null is H0 : p1 - p2 = 0 and alternative is Ha : p1 - p2 ≠ 0, where groups 1 and 2 are females and males, respectively.

Minitab output

Minitab Output that can be used for Steps 2-5

Step 2: test statistic is given in last line of output as z = 4.40.

Step 3: p-value is give as 0.000. It is the area to the right of 4.40 + area to left of -4.40 in a standard normal distribution.

Steps 4 and 5: The p-value is less than 0.05 so we decide in favor of the alternative hypothesis. Thus we decide that the proportions thinking same-sex marriage should be legal differ for males and females. From the sample proportions we females are more in favor (.737 or 73.7% for females versus .538 or 53.8% for males).

Details for the "two-sample z-test" for comparing two proportions

The test statistic used by Minitab is

\(z=\frac{\hat{p}_1-\hat{p}_2}{\sqrt{\frac{\hat{p}_1 (1-\hat{p}_1)}{n_1}+\frac{\hat{p}_2 (1-\hat{p}_2)}{n_2}}}\)

For Example 3,

\(z=\frac{0.737-0.538}{\sqrt{\frac{0.737(1-0.737)}{251}+\frac{0.538(1-0.538)}{199}}}=4.43\)

denominator

The book uses a "pooled version" in which the two samples are combined to get a pooled proportion p. That value is used in place of both \(\hat{p}_1\) and \(\hat{p}_2\) in the part that’s under the square root sign. This pooled method is used when the hypothesized value involves 0 (i.e. the null hypothesis is that the two proportions are equal).

Just to illustrate the book method, in example 3, the pooled p-hat = (185+107)/(251+199) = 292/450 = .649. The pooled version of z works out to be z = 4.40 (and p-value is still 0.000).