This is “Comparison of Two Population Proportions”, section 9.4 from the book Beginning Statistics (v. 1.0). For details on it (including licensing), click here.
For more information on the source of this book, or why it is available for free, please see the project's home page. You can browse or download additional books there.
Suppose we wish to compare the proportions of two populations that have a specific characteristic, such as the proportion of men who are left-handed compared to the proportion of women who are left-handed. Figure 9.7 "Independent Sampling from Two Populations In Order to Compare Proportions" illustrates the conceptual framework of our investigation. Each population is divided into two groups, the group of elements that have the characteristic of interest (for example, being left-handed) and the group of elements that do not. We arbitrarily label one population as Population 1 and the other as Population 2, and subscript the proportion of each population that possesses the characteristic with the number 1 or 2 to tell them apart. We draw a random sample from Population 1 and label the sample statistic it yields with the subscript 1. Without reference to the first sample we draw a sample from Population 2 and label its sample statistic with the subscript 2.
Figure 9.7 Independent Sampling from Two Populations In Order to Compare Proportions
Our goal is to use the information in the samples to estimate the difference in the two population proportions and to make statistically valid inferences about it.
Since the sample proportion computed using the sample drawn from Population 1 is a good estimator of population proportion p1 of Population 1 and the sample proportion computed using the sample drawn from Population 2 is a good estimator of population proportion p2 of Population 2, a reasonable point estimate of the difference is In order to widen this point estimate into a confidence interval we suppose that both samples are large, as described in Section 7.3 "Large Sample Estimation of a Population Proportion" in Chapter 7 "Estimation" and repeated below. If so, then the following formula for a confidence interval for is valid.
The samples must be independent, and each sample must be large: each of the intervals
and
must lie wholly within the interval
The department of code enforcement of a county government issues permits to general contractors to work on residential projects. For each permit issued, the department inspects the result of the project and gives a “pass” or “fail” rating. A failed project must be re-inspected until it receives a pass rating. The department had been frustrated by the high cost of re-inspection and decided to publish the inspection records of all contractors on the web. It was hoped that public access to the records would lower the re-inspection rate. A year after the web access was made public, two samples of records were randomly selected. One sample was selected from the pool of records before the web publication and one after. The proportion of projects that passed on the first inspection was noted for each sample. The results are summarized below. Construct a point estimate and a 90% confidence interval for the difference in the passing rate on first inspection between the two time periods.
Solution:
The point estimate of is
Because the “No public web access” population was labeled as Population 1 and the “Public web access” population was labeled as Population 2, in words this means that we estimate that the proportion of projects that passed on the first inspection increased by 13 percentage points after records were posted on the web.
The sample sizes are sufficiently large for constructing a confidence interval since for sample 1:
so that
and for sample 2:
so that
To apply the formula for the confidence interval, we first observe that the 90% confidence level means that so that From Figure 12.3 "Critical Values of " we read directly that Thus the desired confidence interval is
The 90% confidence interval is We are 90% confident that the difference in the population proportions lies in the interval , in the sense that in repeated sampling 90% of all intervals constructed from the sample data in this manner will contain Taking into account the labeling of the two populations, this means that we are 90% confident that the proportion of projects that pass on the first inspection is between 6 and 20 percentage points higher after public access to the records than before.
In hypothesis tests concerning the relative sizes of the proportions p1 and p2 of two populations that possess a particular characteristic, the null and alternative hypotheses will always be expressed in terms of the difference of the two population proportions. Hence the null hypothesis is always written
The three forms of the alternative hypothesis, with the terminology for each case, are:
Form of | Terminology |
---|---|
Left-tailed | |
Right-tailed | |
Two-tailed |
As long as the samples are independent and both are large the following formula for the standardized test statistic is valid, and it has the standard normal distribution.
The test statistic has the standard normal distribution.
The samples must be independent, and each sample must be large: each of the intervals
and
must lie wholly within the interval
Using the data of Note 9.25 "Example 10", test whether there is sufficient evidence to conclude that public web access to the inspection records has increased the proportion of projects that passed on the first inspection by more than 5 percentage points. Use the critical value approach at the 10% level of significance.
Solution:
Step 1. Taking into account the labeling of the populations an increase in passing rate at the first inspection by more than 5 percentage points after public access on the web may be expressed as , which by algebra is the same as This is the alternative hypothesis. Since the null hypothesis is always expressed as an equality, with the same number on the right as is in the alternative hypothesis, the test is
Step 2. Since the test is with respect to a difference in population proportions the test statistic is
Step 3. Inserting the values given in Note 9.25 "Example 10" and the value into the formula for the test statistic gives
Step 5. As shown in Figure 9.8 "Rejection Region and Test Statistic for " the test statistic falls in the rejection region. The decision is to reject H0. In the context of the problem our conclusion is:
The data provide sufficient evidence, at the 10% level of significance, to conclude that the rate of passing on the first inspection has increased by more than 5 percentage points since records were publicly posted on the web.
Figure 9.8 Rejection Region and Test Statistic for Note 9.27 "Example 11"
Perform the test of Note 9.27 "Example 11" using the p-value approach.
Solution:
The first three steps are identical to those in Note 9.27 "Example 11".
Finally a common misuse of the formulas given in this section must be mentioned. Suppose a large pre-election survey of potential voters is conducted. Each person surveyed is asked to express a preference between, say, Candidate A and Candidate B. (Perhaps “no preference” or “other” are also choices, but that is not important.) In such a survey, estimators and of pA and pB can be calculated. It is important to realize, however, that these two estimators were not calculated from two independent samples. While may be a reasonable estimator of , the formulas for confidence intervals and for the standardized test statistic given in this section are not valid for data obtained in this manner.
Construct the confidence interval for for the level of confidence and the data given. (The samples are sufficiently large.)
90% confidence,
,
,
95% confidence,
,
,
Construct the confidence interval for for the level of confidence and the data given. (The samples are sufficiently large.)
98% confidence,
,
,
99.5% confidence,
,
,
Construct the confidence interval for for the level of confidence and the data given. (The samples are sufficiently large.)
80% confidence,
,
,
95% confidence,
,
,
Construct the confidence interval for for the level of confidence and the data given. (The samples are sufficiently large.)
99% confidence,
,
,
95% confidence,
,
,
Perform the test of hypotheses indicated, using the data given. Use the critical value approach. Compute the p-value of the test as well. (The samples are sufficiently large.)
Test vs. @ ,
,
,
Test vs. @ ,
,
,
Perform the test of hypotheses indicated, using the data given. Use the critical value approach. Compute the p-value of the test as well. (The samples are sufficiently large.)
Test vs. @ ,
,
,
Test vs. @ ,
,
,
Perform the test of hypotheses indicated, using the data given. Use the critical value approach. Compute the p-value of the test as well. (The samples are sufficiently large.)
Test vs. @ ,
,
,
Test vs. @ ,
,
,
Perform the test of hypotheses indicated, using the data given. Use the critical value approach. Compute the p-value of the test as well. (The samples are sufficiently large.)
Test vs. @ ,
,
,
Test vs. @ ,
,
,
Perform the test of hypotheses indicated, using the data given. Use the p-value approach. (The samples are sufficiently large.)
Test vs. @ ,
,
,
Test vs. @ ,
,
,
Perform the test of hypotheses indicated, using the data given. Use the p-value approach. (The samples are sufficiently large.)
Test vs. @ ,
,
,
Test vs. @ ,
,
,
Perform the test of hypotheses indicated, using the data given. Use the p-value approach. (The samples are sufficiently large.)
Test vs. @ ,
,
,
Test vs. @ ,
,
,
Perform the test of hypotheses indicated, using the data given. Use the p-value approach. (The samples are sufficiently large.)
Test vs. @ ,
,
,
Test vs. @ ,
,
,
In all the remaining exercsises the samples are sufficiently large (so this need not be checked).
Voters in a particular city who identify themselves with one or the other of two political parties were randomly selected and asked if they favor a proposal to allow citizens with proper license to carry a concealed handgun in city parks. The results are:
Party A | Party B | |
---|---|---|
Sample size, n | 150 | 200 |
Number in favor, x | 90 | 140 |
To investigate a possible relation between gender and handedness, a random sample of 320 adults was taken, with the following results:
Men | Women | |
---|---|---|
Sample size, n | 168 | 152 |
Number of left-handed, x | 24 | 9 |
A local school board member randomly sampled private and public high school teachers in his district to compare the proportions of National Board Certified (NBC) teachers in the faculty. The results were:
Private Schools | Public Schools | |
---|---|---|
Sample size, n | 80 | 520 |
Proportion of NBC teachers, | 0.175 | 0.150 |
In professional basketball games, the fans of the home team always try to distract free throw shooters on the visiting team. To investigate whether this tactic is actually effective, the free throw statistics of a professional basketball player with a high free throw percentage were examined. During the entire last season, this player had 656 free throws, 420 in home games and 236 in away games. The results are summarized below.
Home | Away | |
---|---|---|
Sample size, n | 420 | 236 |
Free throw percent, | 81.5% | 78.8% |
Randomly selected middle-aged people in both China and the United States were asked if they believed that adults have an obligation to financially support their aged parents. The results are summarized below.
China | USA | |
---|---|---|
Sample size, n | 1300 | 150 |
Number of yes, x | 1170 | 110 |
Test, at the 1% level of significance, whether the data provide sufficient evidence to conclude that there exists a cultural difference in attitude regarding this question.
A manufacturer of walk-behind push mowers receives refurbished small engines from two new suppliers, A and B. It is not uncommon that some of the refurbished engines need to be lightly serviced before they can be fitted into mowers. The mower manufacturer recently received 100 engines from each supplier. In the shipment from A, 13 needed further service. In the shipment from B, 10 needed further service. Test, at the 10% level of significance, whether the data provide sufficient evidence to conclude that there exists a difference in the proportions of engines from the two suppliers needing service.
Large Data Sets 6A and 6B record results of a random survey of 200 voters in each of two regions, in which they were asked to express whether they prefer Candidate A for a U.S. Senate seat or prefer some other candidate. Let the population of all voters in region 1 be denoted Population 1 and the population of all voters in region 2 be denoted Population 2. Let p1 be the proportion of voters in Population 1 who prefer Candidate A, and p2 the proportion in Population 2 who do.
http://www.flatworldknowledge.com/sites/all/files/data6A.xls
http://www.flatworldknowledge.com/sites/all/files/data6B.xls
Large Data Set 11 records the results of samples of real estate sales in a certain region in the year 2008 (lines 2 through 536) and in the year 2010 (lines 537 through 1106). Foreclosure sales are identified with a 1 in the second column. Let all real estate sales in the region in 2008 be Population 1 and all real estate sales in the region in 2010 be Population 2.
http://www.flatworldknowledge.com/sites/all/files/data11.xls
Z = 4.498, , reject H0 (different)