### Beyond AP Statistics

#### Probability Basics

#### Small Samples

#### Distributions

#### Power

### Beyond AP Statistics

#### Probability Basics

#### Small Samples

#### Distributions

#### Power

# Hypothesis Test: Difference Between Proportions

This lesson explains how to conduct a hypothesis test to determine whether the difference between two proportions is significant.

The test procedure, called the
**two-proportion z-test**, is
appropriate when the following conditions are met:

- The sampling method for each population is simple random sampling.
- The samples are independent.
- Each sample includes at least 10 successes and 10 failures.
- Each population is at least 20 times as big as its sample.

This approach consists of four steps: (1) state the hypotheses, (2) formulate an analysis plan, (3) analyze sample data, and (4) interpret results.

## State the Hypotheses

Every hypothesis test requires the analyst
to state a
null hypothesis
and an
alternative hypothesis.
The table below shows three sets of hypotheses. Each makes a
statement about the difference *d* between
two population proportions, P_{1} and P_{2}.
(In the table, the symbol ≠ means " not equal to ".)

Set | Null hypothesis | Alternative hypothesis | Number of tails |
---|---|---|---|

1 | P_{1} - P_{2} = 0 |
P_{1} - P_{2} ≠ 0 |
2 |

2 | P_{1} - P_{2} > 0 |
P_{1} - P_{2} < 0 |
1 |

3 | P_{1} - P_{2} < 0 |
P_{1} - P_{2} > 0 |
1 |

The first set of hypotheses (Set 1) is an example of a two-tailed test, since an extreme value on either side of the sampling distribution would cause a researcher to reject the null hypothesis. The other two sets of hypotheses (Sets 2 and 3) are one-tailed tests, since an extreme value on only one side of the sampling distribution would cause a researcher to reject the null hypothesis.

When the null hypothesis states that there is no difference between the
two population proportions (i.e., d = P_{1} - P_{2} = 0), the null and alternative
hypothesis for a two-tailed test are often stated in the
following form.

H_{0}: P_{1} = P_{2}

H_{a}: P_{1} ≠ P_{2}

## Formulate an Analysis Plan

The analysis plan describes how to use sample data to accept or reject the null hypothesis. It should specify the following elements.

- Significance level. Often, researchers choose significance levels equal to 0.01, 0.05, or 0.10; but any value between 0 and 1 can be used.
- Test method. Use the two-proportion z-test (described in the next section) to determine whether the hypothesized difference between population proportions differs significantly from the observed sample difference.

## Analyze Sample Data

Using sample data, complete the following computations to find the test statistic and its associated P-Value.

**Pooled sample proportion.**Since the null hypothesis states that P_{1}=P_{2}, we use a pooled sample proportion (p) to compute the standard error of the sampling distribution.p = (p

where p_{1}* n_{1}+ p_{2}* n_{2}) / (n_{1}+ n_{2})_{1}is the sample proportion from population 1, p_{2}is the sample proportion from population 2, n_{1}is the size of sample 1, and n_{2}is the size of sample 2.**Standard error.**Compute the standard error (SE) of the sampling distribution difference between two proportions.SE = sqrt{ p * ( 1 - p ) * [ (1/n

where p is the pooled sample proportion, n_{1}) + (1/n_{2}) ] }_{1}is the size of sample 1, and n_{2}is the size of sample 2.**Test statistic.**The test statistic is a z-score (z) defined by the following equation.z = (p

where p_{1}- p_{2}) / SE_{1}is the proportion from sample 1, p_{2}is the proportion from sample 2, and SE is the standard error of the sampling distribution.**P-value.**The P-value is the probability of observing a sample statistic as extreme as the test statistic. Since the test statistic is a z-score, use the Normal Distribution Calculator to assess the probability associated with the z-score. (See sample problems at the end of this lesson for examples of how this is done.)

The analysis described above is a two-proportion z-test.

## Interpret Results

If the sample findings are unlikely, given the null hypothesis, the researcher rejects the null hypothesis. Typically, this involves comparing the P-value to the significance level, and rejecting the null hypothesis when the P-value is less than the significance level.

## Test Your Understanding

In this section, two sample problems illustrate how to conduct a hypothesis test for the difference between two proportions. The first problem involves a a two-tailed test; the second problem, a one-tailed test.

**Problem 1: Two-Tailed Test**

Suppose the Acme Drug Company develops a new drug, designed to prevent colds. The company states that the drug is equally effective for men and women. To test this claim, they choose a a simple random sample of 100 women and 200 men from a population of 100,000 volunteers.

At the end of the study, 38% of the women caught a cold; and 51% of the men caught a cold. Based on these findings, can we reject the company's claim that the drug is equally effective for men and women? Use a 0.05 level of significance.

*Solution:* The solution to this problem takes four steps:
(1) state the hypotheses, (2) formulate an analysis plan,
(3) analyze sample data, and (4) interpret results.
We work through those steps below:

**State the hypotheses.**The first step is to state the null hypothesis and an alternative hypothesis.Null hypothesis: P

_{1}= P_{2}Alternative hypothesis: P

Note that these hypotheses constitute a two-tailed test. The null hypothesis will be rejected if the proportion from population 1 is too big or if it is too small._{1}≠ P_{2}**Formulate an analysis plan**. For this analysis, the significance level is 0.05. The test method is a two-proportion z-test.**Analyze sample data**. Using sample data, we calculate the pooled sample proportion (p) and the standard error (SE). Using those measures, we compute the z-score test statistic (z).p = (p

_{1}* n_{1}+ p_{2}* n_{2}) / (n_{1}+ n_{2})p = [(0.38 * 100) + (0.51 * 200)] / (100 + 200)

p = 140/300 = 0.467

SE = sqrt{ p * ( 1 - p ) * [ (1/n

_{1}) + (1/n_{2}) ] }SE = sqrt [ 0.467 * 0.533 * ( 1/100 + 1/200 ) ]

SE = sqrt [0.003733] = 0.061

z = (p

_{1}- p_{2}) / SE = (0.38 - 0.51)/0.061 = -2.13where p

_{1}is the sample proportion in sample 1, where p_{2}is the sample proportion in sample 2, n_{1}is the size of sample 1, and n_{2}is the size of sample 2.Since we have a two-tailed test, the P-value is the probability that the z-score is less than -2.13 or greater than 2.13.

We use the Normal Distribution Calculator to find P(z < -2.13) = 0.017, and P(z > 2.13) = 0.017. Thus, the P-value = 0.017 + 0.017 = 0.034.**Interpret results**. Since the P-value (0.034) is less than the significance level (0.05), we cannot accept the null hypothesis.

**Note:** If you use this approach on an exam, you may also want to mention
why this approach is appropriate.
Specifically, the approach is appropriate because
the sampling method was simple random sampling, the
samples were independent, each population was at least 10 times
larger than its sample, and
each sample included at least 10 successes and 10 failures.

# Teach Yourself to Shoot

- A scientific approach to marksmanship training.
- For hand-gunners who want to be marksmen.

**Problem 2: One-Tailed Test**

Suppose the previous example is stated a little bit differently. Suppose the Acme Drug Company develops a new drug, designed to prevent colds. The company states that the drug is more effective for women than for men. To test this claim, they choose a a simple random sample of 100 women and 200 men from a population of 100,000 volunteers.

At the end of the study, 38% of the women caught a cold; and 51% of the men caught a cold. Based on these findings, can we conclude that the drug is more effective for women than for men? Use a 0.01 level of significance.

*Solution:* The solution to this problem takes four steps:
(1) state the hypotheses, (2) formulate an analysis plan,
(3) analyze sample data, and (4) interpret results.
We work through those steps below:

**State the hypotheses.**The first step is to state the null hypothesis and an alternative hypothesis.Null hypothesis: P

_{1}>= P_{2}Alternative hypothesis: P

Note that these hypotheses constitute a one-tailed test. The null hypothesis will be rejected if the proportion of women catching cold (p_{1}< P_{2}_{1}) is sufficiently smaller than the proportion of men catching cold (p_{2}).**Formulate an analysis plan**. For this analysis, the significance level is 0.01. The test method is a two-proportion z-test.**Analyze sample data**. Using sample data, we calculate the pooled sample proportion (p) and the standard error (SE). Using those measures, we compute the z-score test statistic (z).p = (p

_{1}* n_{1}+ p_{2}* n_{2}) / (n_{1}+ n_{2})p = [(0.38 * 100) + (0.51 * 200)] / (100 + 200)

p = 140/300 = 0.467

SE = sqrt{ p * ( 1 - p ) * [ (1/n

_{1}) + (1/n_{2}) ] }SE = sqrt [ 0.467 * 0.533 * ( 1/100 + 1/200 ) ]

SE = sqrt [0.003733] = 0.061

z = (p

_{1}- p_{2}) / SE = (0.38 - 0.51)/0.061 = -2.13where p

Since we have a one-tailed test, the P-value is the probability that the z-score is less than -2.13. We use the Normal Distribution Calculator to find P(z < -2.13) = 0.017. Thus, the P-value = 0.017._{1}is the sample proportion in sample 1, where p_{2}is the sample proportion in sample 2, n_{1}is the size of sample 1, and n_{2}is the size of sample 2.**Interpret results**. Since the P-value (0.017) is greater than the significance level (0.01), we cannot reject the null hypothesis.

**Note:** If you use this approach on an exam, you may also want to mention
why this approach is appropriate.
Specifically, the approach is appropriate because
the sampling method was simple random sampling, the
samples were independent, each population was at least 10 times
larger than its sample, and
each sample included at least 10 successes and 10 failures.

Bestsellers Advanced Placement Statistics Updated daily | ||

1. Barron's AP Statistics, 9th Edition $18.99 $12.91 | ||

2. Barron's AP Statistics, 8th Edition $18.99 $8.00 | ||

3. Cracking the AP Statistics Exam, 2017 Edition: Proven Techniques to Help You Score a 5 (College Test Preparation) $19.99 $19.99 | ||

4. Barron's AP Statistics, 7th Edition $18.99 $10.00 |

Texas Instruments TI-83 Plus Graphing Calculator $149.99 $99.89 33% off | |

See more Graphing Calculators ... |

Bestsellers Handheld Calculators Updated daily | ||

1. Texas Instruments TI-84 Plus CE Lightning Graphing Calculator $150.00 $158.87 | ||

2. Texas Instruments Ti-84 plus Graphing calculator - Black $108.99 $108.99 | ||

3. Texas Instruments TI-84 Plus CE Graphing Calculator, Black $150.00 $123.99 | ||

4. Texas Instruments VOY200/PWB Graphing Calculator $200.00 $399.99 |

Barron's AP Statistics with CD-ROM (Barron's: The Leader in Test Preparation) $29.99 $7.76 74% off | |

See more AP Statistics study guides |

Bestsellers Statistics and Probability Updated daily | ||

1. Statistics for People Who (Think They) Hate Statistics $82.00 $68.33 | ||

2. Naked Statistics: Stripping the Dread from the Data $16.95 $13.70 | ||

3. Barron's AP Statistics, 9th Edition $18.99 $12.91 | ||

4. Statistics, 4th Edition $110.95 $121.43 |