Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hypothesis tests for the difference between two proportions

Similar presentations


Presentation on theme: "Hypothesis tests for the difference between two proportions"— Presentation transcript:

1 Hypothesis tests for the difference between two proportions
Section 11.2

2 Objectives Perform a hypothesis test for the difference between two proportions using the P-value method Perform a hypothesis test for the difference between two proportions using the critical value method

3 Objective 1 Perform a hypothesis test for the difference between two proportions using the P-value method

4 Difference Between Two Population Proportions
The General Social Survey took a poll that asked 350 employed people aged 25–40 whether they used a computer at work, and 259 said they did. They also asked the same question of 500 employed people aged 41–65, and 384 of them said that they used a computer at work. We can compute the sample proportions of people who used a computer at work in each of these age groups. Among those 25–40, the sample proportion was = 0.740, and among those aged 41–65 the sample proportion was = So the sample proportion is larger among older workers. The question of interest, however, involves the population proportions. There are two populations involved; the population of all employed people aged 25–40, and the population of all employed people aged 41–65. The question is whether the population proportion of people aged 41–65 who use a computer at work is greater than the population proportion among those aged 25–40. This is an example of a situation in which we have two independent samples involving sample proportions.

5 Notation We begin by associating some notation for the population proportions, the sample proportions, the numbers of individuals in each category, and the sample sizes. 𝑝 1 and 𝑝 2 are the population proportions of the category of interest in the two populations. 𝑝 1 and 𝑝 2 are the proportions of the category of interest in the two samples. 𝑥 1 and 𝑥 2 are the numbers of individuals in the category of interest in the two samples. 𝑛 1 and 𝑛 2 are the two sample sizes.

6 Null and Alternate Hypothesis
In order to perform a hypothesis test in the previous situation, we need to examine the issue at hand, which is whether the population proportions 𝑝 1 and 𝑝 2 are equal. The null hypothesis says that they are equal: 𝐻 0 : 𝑝 1 = 𝑝 2 There are three possibilities for the alternate hypothesis: 𝐻 1 : 𝑝 1 < 𝑝 2 𝐻 1 : 𝑝 1 > 𝑝 2 𝐻 1 : 𝑝 1 ≠ 𝑝 2

7 Mean and Standard Deviation
The test statistic is based on the difference between the sample proportions, 𝑝 1 – 𝑝 When the sample size is large, this difference is approximately normally distributed. The mean and standard deviation of this distribution are Mean = 𝑝 1 − 𝑝 Standard Deviation = 𝑝 1 1− 𝑝 1 𝑛 𝑝 2 1− 𝑝 2 𝑛 2

8 Pooled Proportion 𝑝 = 𝑥 1 + 𝑥 2 𝑛 1 + 𝑛 2
To compute the test statistic, we must find values for the mean and standard deviation. The mean is straightforward: Under the assumption that 𝐻 0 is true, 𝑝 1 – 𝑝 2 = 0. The standard deviation is a bit more involved. The standard deviation depends on the population proportions 𝑝 1 and 𝑝 2 , which are unknown. We need to estimate 𝑝 1 and 𝑝 2 . Under 𝐻 0 , we assume that 𝑝 1 = 𝑝 2 . Therefore, we need to estimate 𝑝 1 and 𝑝 2 with the same value. The value to use is the pooled proportion, which we will denote by 𝑝 . The pooled proportion is found by treating the two samples as though they were one big sample. We divide the total number of individuals in the category of interest in the two samples by the sum of the two sample sizes. 𝑝 = 𝑥 1 + 𝑥 2 𝑛 1 + 𝑛 2

9 Standard Error/Test Statistic
The standard deviation is estimated with the standard error: Standard Error = 𝑝 1− 𝑝 𝑛 𝑝 1− 𝑝 𝑛 2 = 𝑝 1− 𝑝 𝑛 𝑛 2 The test statistic is the 𝑧-score of 𝑝 1 – 𝑝 2 : 𝑧= 𝑝 1 − 𝑝 2 − 𝑝 1 − 𝑝 𝑝 1− 𝑝 𝑛 𝑛 = 𝑝 1 − 𝑝 2 − 𝑝 1− 𝑝 𝑛 𝑛 = 𝑝 1 − 𝑝 𝑝 1− 𝑝 𝑛 𝑛 2

10 Assumptions The method just described for performing a hypothesis test for the difference of population proportions requires the following assumptions. Assumptions: We have two independent simple random samples. Each population is at least 20 times as large as the sample drawn from it. The individuals in each sample are divided into two categories. Both samples contain at least 10 individuals in each category.

11 Hypothesis Test for 𝑝 1 − 𝑝 2
Step 1: State the null and alternate hypotheses. Step 2: If making a decision, choose a significance level 𝛼. Step 3: Compute the test statistic 𝑧= 𝑝 1 − 𝑝 2 𝑝 1− 𝑝 1 𝑛 𝑛 2 where 𝑝 = 𝑥 1 + 𝑥 2 𝑛 1 + 𝑛 2 Step 4: Compute the P-value. Step 5: Interpret the P-value. If making a decision, reject 𝐻 0 if the P-value is less than or equal to the significance level 𝛼. Step 6: State a conclusion.

12 Example The General Social Survey took a poll that asked 350 employed people aged 25–40 whether they used a computer at work, and 259 said they did. They also asked the same question of 500 employed people aged 41–65, and 384 of them said that they used a computer at work. Can you conclude that the proportion of people who use a computer at work is greater among those aged 41–65 than among those aged 25–40? Use the 𝛼 = 0.05 level. Solution: We first check the assumptions. We have two independent random samples, and the populations are more than 20 times as large as the samples. The individuals in each sample are divided into two categories with more than 10 individuals in each category. The assumptions are satisfied. We summarize the relevant information: 25-40 41-65 Sample size 𝑛 1 =350 𝑛 2 =500 Number of individuals 𝑥 1 =259 𝑥 2 =384 Sample proportion 𝑝 1 = =0.740 𝑝 2 = =0.768 Population proportion 𝑝 1 (unknown) 𝑝 2 (unknown) The null and alternate hypotheses are: 𝐻 0 : 𝑝 1 = 𝑝 2 𝐻 1 : 𝑝 1 < 𝑝 2

13 Example – Perform a Hypothesis Test
Solution (continued): The pooled proportion 𝑝 is 𝑝 = 𝑥 1 + 𝑥 2 𝑛 1 + 𝑛 2 = = The test statistic is 𝑧= 𝑝 1 − 𝑝 2 𝑝 1− 𝑝 1 𝑛 𝑛 2 = 0.740− (1 − ) =−0.94. The alternate hypothesis, 𝑝 1 < 𝑝 2 , is left-tailed. Therefore, the P-value is the area to the left of 𝑧 = −0.94. We find this area to be Since P > 0.05, we do not reject 𝐻 0 at the 𝛼 = 0.05 level. We cannot conclude that the proportion of workers aged 41–65 who use a computer at work is greater than the proportion among those aged 25–40. Remember 𝐻 0 : 𝑝 1 = 𝑝 2 𝐻 1 : 𝑝 1 < 𝑝 2 𝑛 1 =350 𝑛 2 =500 𝑥 1 =259 𝑥 2 =384 𝑝 1 = 𝑝 2 =0.768

14 Hypothesis Testing on the TI-84 PLUS
The 2-PropZTest command will perform a hypothesis test for the difference between proportions. This command is accessed by pressing STAT and highlighting the TESTS menu. We enter the values of 𝑥 1 , 𝑛 1 , 𝑥 2 , and 𝑛 2 .

15 Example (TI-84 PLUS) The General Social Survey took a poll that asked 350 employed people aged 25–40 whether they used a computer at work, and 259 said they did. They also asked the same question of 500 employed people aged 41–65, and 384 of them said that they used a computer at work. Can you conclude that the proportion of people who use a computer at work is greater among those aged 41–65 than among those aged 25–40? Use the 𝛼 = 0.05 level. Solution: We first check the assumptions. We have two independent random samples, and the populations are more than 20 times as large as the samples. The individuals in each sample are divided into two categories with more than 10 individuals in each category. The assumptions are satisfied. We summarize the relevant information: The null and alternate hypotheses are: 𝐻 0 : 𝑝 1 = 𝑝 2 𝐻 1 : 𝑝 1 < 𝑝 2 25-40 41-65 Sample size 𝑛 1 =350 𝑛 2 =500 Number of individuals 𝑥 1 =259 𝑥 2 =384 Population proportion 𝑝 1 (unknown) 𝑝 2 (unknown)

16 Example (TI-84 PLUS) Press STAT and highlight the TESTS menu and select 2-PropZTest. We enter the following information: Since we have a left-tailed test, select the <𝒑𝟐 option. Select Calculate. The P-value is Since P > 0.05, we do not reject 𝐻 0 at the 𝛼 = 0.05 level. We cannot conclude that the proportion of workers aged 41–65 who use a computer at work is greater than the proportion among those aged 25–40. 25-40 41-65 Sample size 𝑛 1 =350 𝑛 2 =500 Number of individuals 𝑥 1 =259 𝑥 2 =384

17 Objective 2 Perform a hypothesis test for the difference between two proportions using the critical value method

18 Using the Critical Value Method
The critical value method can be used to perform a hypothesis test for the difference between two proportions. To use the critical value method, compute the test statistic as in the P-value method. Since the critical value is a 𝑧-score, critical values can be found in Table A.2 or with technology. The assumptions for the critical value method are the same as for the P-value method. Step 1: State the null and alternate hypotheses: Step 2: If making a decision, choose a significance level 𝛼 and find the critical value(s). Step 3: Compute the test statistic 𝑧= 𝑝 1 − 𝑝 2 𝑝 1− 𝑝 1 𝑛 𝑛 2 where 𝑝 = 𝑥 1 + 𝑥 2 𝑛 1 + 𝑛 2 .

19 Using the Critical Value Method
Step 4: Determine whether to reject 𝐻 0 , as follows: Step 5: State a conclusion.

20 Example Traffic engineers tabulated types of car accidents by drivers of various ages. Out of a total of 82,486 accidents involving drivers aged 15–24 years, 4243 of them, or 5.1%, occurred in a driveway. Out of a total of 219,170 accidents involving drivers aged 25–64 years, 10,701 of them, or 4.9%, occurred in a driveway. Can you conclude that accidents involving drivers aged 15–24 are more likely to occur in driveways than accidents involving drivers aged 25–64? Use 𝛼 = Solution: We have two independent samples, and the individuals in each sample fall into two categories with at least 10 individuals in each category. The assumptions are satisfied. We summarize the relevant information: The null and alternate hypotheses are: 𝐻 0 : 𝑝 1 = 𝑝 2 𝐻 1 : 𝑝 1 > 𝑝 2 Ages 15-24 Ages 25-64 Sample size 𝑛 1 =82,486 𝑛 2 =219,170 Number of individuals 𝑥 1 =4,243 𝑥 2 =10,701 Sample proportion 𝑝 1 = 4,243 82,486 = 𝑝 2 = 10, ,170 = Population proportion 𝑝 1 (unknown) 𝑝 2 (unknown)

21 Example – Perform a Hypothesis Test
Solution (continued): The pooled proportion is 𝑝 = 𝑥 1 + 𝑥 2 𝑛 1 + 𝑛 2 = = The test statistic is 𝑧= 𝑝 1 − 𝑝 2 𝑝 1− 𝑝 1 𝑛 𝑛 2 =2.95. Because this is a right-tailed test, the critical value is the value for which the area to the right is This value is 𝑧 𝛼 = We reject 𝐻 0 if 𝑧> 𝑧 𝛼 . Because 𝑧 = 2.95 and 𝑧 𝛼 = 1.645, we reject 𝐻 0 at the 𝛼 = 0.05 level. We conclude that accidents involving drivers aged 15–24 are more likely to occur in a driveway than accidents involving drivers aged 25–64. Remember 𝐻 0 : 𝑝 1 = 𝑝 2 𝐻 1 : 𝑝 1 > 𝑝 2 𝑛 1 =82,486 𝑛 2 =219,170 𝑥 1 =4,243 𝑥 2 =10,701 𝑝 1 = 𝑝 2 =

22 You Should Know… How to perform a hypothesis test for the difference between two proportions using the P-value method How to perform a hypothesis test for the difference between two proportions using the critical value method


Download ppt "Hypothesis tests for the difference between two proportions"

Similar presentations


Ads by Google