DO YOU BELIEVE IN FAIRY TALES? 1. 2. Yes No 50% 50% Slide 1- 1 1 2 UPCOMING WORK Part 3 of Data Project due today Quiz #5 in class this Wednesday HW #10 due Sunday CHAPTER 20 Comparing Two Proportions COMPARING TWO PROPORTIONS Comparisons between two percentages are much more common than questions about isolated percentages. And they are more interesting. We often want to know how two groups differ, a treatment is better than a placebo control, this year’s results are better than last year’s. Team A is better than Team B OTHER EXAMPLES Compare the proportion of women who have an abortion that need mental health treatment to the proportion of women who have a small infant that need mental health treatment. http://www.huffingtonpost.com/2011/01/26/abortion-mentalhealth_n_814582.html THE HYPOTHESIS The typical hypothesis test for the difference in two proportions is the one of no difference. In symbols, H0: p1 – p2 = 0. The alternatives: Ha: p1 –p2 > 0 Ha: p1 –p2 < 0 Ha: p1 –p2 ≠ 0 Slide 1- 6 THE SAMPLING DISTRIBUTION THEORY Provided that the sampled values are independent, the samples are independent, and the samples sizes are large enough, the sampling distribution of pˆ1 pˆ 2 is modeled by a Normal model with p1 p2 Mean: Standard deviation: SD pˆ1 pˆ 2 p1q1 p2 q2 n1 n2 Slide 1- 7 SE FOR CONFIDENCE INTERVALS When the conditions are met, we are ready to find the confidence interval for the difference of two proportions: The confidence interval is pˆ1 pˆ 2 z SE pˆ1 pˆ 2 where SE pˆ1 pˆ 2 pˆ1qˆ1 pˆ 2 qˆ2 n1 n2 The critical value z* depends on the particular confidence level, C, that you specify. Slide 1- 8 PROBLEM Company X invents a new drug called NoZits that they believe cures acne problems. To see if NoZits works they run a test. They have 100 people (Group A) wash their face with NoZits, and 120 people (Group B) wash their face with the other leading brand. Group A – 45 people’s skin clears up the next day Group B – 52 people’s skin clears up the next day Create a 95% confidence interval for the difference between the two groups. Slide 1- 9 WHAT DOES PA REPRESENT? 1. 2. 3. The proportion of people with better skin. The proportion of people with better skin who used NoZits. The proportion of people with better skin who used the leading brand. 0% 0% 0% Slide 1- 10 1 2 3 COMPANY X HOPES TO SHOW THAT NOZITS IS A BETTER DRUG THAN THE LEADING BRAND. WHAT HYPOTHESES TEST SHOULD IT RUN? 1. 2. 3. Ho: pA = pB Ha: pA ≠ pB Ho: pA = pB Ha: pA < pB Ho: pA = pB Ha: pA > pB 0% 0% 0% Slide 1- 11 1 2 3 CRITICAL Z* AND SIGNIFICANCE LEVEL TWO-SIDED α= .20 CI = 80% z*=1.282 α= .10 CI = 90% z*=1.645 α= .05 CI = 95% z*=1.96 α= .02 CI = 98%z*=2.326 α= .01 CI = 99% z*=2.576 Slide 1- 12 INTERPRETATION OF A CONFIDENCE INTERVAL We are 95% confidence that the true difference between the two test groups falls within (-0.11172, 0.15172) Or (-11.17%, 15.17%) Our data fail to reject the null hypothesis. We do NOT have enough evidence to suggest a difference between success rates. We have no evidence that NoZits is better at getting Slide rid of acne. 1- 13 ESTIMATES FOR THE SD Confidence Intervals Use each groups individual success rate to calculate the SE P-value and Z* testing Use pooled proportion to calculate the SE Slide 1- 14 SE FOR P-VALUE AND Z* HYPOTHESIS TESTING We use the pooled value to estimate the standard error: pˆ pooled qˆ pooled pˆ pooled qˆ pooled SE pooled pˆ1 pˆ 2 n1 n2 Now we find the test statistic: pˆ1 pˆ 2 0 z SE pooled pˆ1 pˆ 2 When the conditions are met and the null hypothesis is true, this statistic follows the standard Normal model, so we can use that model to obtain a P-value. Slide 1- 15 CALCULATING THE POOLED PROPORTION The pooled proportion is pˆ pooled where Success1 Success2 n1 n2 Success1 n1 pˆ1 and Success2 n2 pˆ 2 If the numbers of successes are not whole numbers, round them first. (This is the only time you should round values in the middle of a calculation.) HOMEWORK PROBLEM A clinic reported the following statistics For women under the age of 38 For women over the age of 38 47 live births to 165 women 4 live births to 78 women Is there a difference in the effectiveness of the clinic’s methods for older women? Use a both a z* test and a 95% confidence interval to test your hypothesis Slide 1- 17 WHAT DOES P1 REPRESENT? 1. 2. 3. The proportion of live births The proportion of women over 38 with live births The proportion of women under 38 with live births 0% 0% 0% Slide 1- 18 1 2 3 IS THERE EVIDENCE OF A DIFFERENCE BETWEEN THE TWO GROUPS? 1. 2. 3. Ho: p1 = p2 Ha: p1 ≠ p2 Ho: p1 = p2 Ha: p1 < p2 Ho: p1 = p2 Ha: p1 > p2 0% 0% 0% Slide 1- 19 1 2 3 WHAT IS OUR TEST ‘RULE’ WE FOLLOW? 1. 2. 3. 4. If z > critical z* , then reject null hypothesis. If z > critical z* , then accept null hypothesis. If z < critical z* , then reject null hypothesis. If z < critical z* , then accept null hypothesis. 0% 0% 0% 0%Slide 1- 20 1 2 3 4 WHAT IS THE RESULT OF THIS HYPOTHESIS TEST AT A SIGNIFICANCE LEVEL OF 0.05? 1. 0% 2. 0% 3. 0% Do not reject the null hypothesis b/c there IS NOT sufficient evidence to make the claim of a difference Accept the alternative hypothesis b/c there IS sufficient evidence to support claim of a difference Reject the null hypothesis b/c there IS sufficient evidence to support the claim of a difference Slide 1- 21 WOULD WE GET A DIFFERENT RESULT WITH A CI? Let’s calculate the CI at 95% Slide 1- 22 OUR CI (14.9%, 31.7%). HOW WOULD WE INTERPRET THIS CI? 0% 0% 1. 2. 3. 0% There is 95% confidence the prop. of live births for clients of this clinic is greater for women under 38 There is 95% confidence the prop. of live births is greater for women under 38 There is 95% confidence the prop. of live births for a sample of clients of this clinic is greater for women under 38 Slide 1- 23 HOMEWORK PROBLEM A survey of older Americans reveals, 420 out of 1002 men suffer from arthritis 543 out of 1070 women suffer from arthritis Create a 95% CI to test the hypothesis that the proportion of adults suffering from arthritis is greater for women than for men. Slide 1- 24 DOES THIS SUGGEST THAT ARTHRITIS IS MORE LIKELY TO AFFLICT WOMEN THAN MEN? 1. 2. 3. 4. No. No conclusion can be made 25%based 25%on the 25% confidence interval. No. The interval is too close to 0. Yes. The entire interval lies above 0. Yes, we are 95% confident, based on these samples, that about 13.1% of senior women suffer from arthritis, while only 4.6% of senior men suffer from arthritis. 25% Slide 1- 25 1 2 3 4 HW - PROBLEM 8 One country reported 84 out of 3157 white women had multiple births 20 out of 625 black women had multiple births Does this indicate any racial difference of the likelihood of multiple births? Slide 1- 26 DEFINING THE PROPORTIONS AFFECTS THE HYPOTHESIS P1 = proportion of multiple births from white women P2 = proportion of multiple births from black women Slide 1- 27 DOES THIS INDICATE ANY RACIAL DIFFERENCE? 1. 2. 3. Ho: p1 – p2 =0 Ha: p1 – p2>0 Ho: p1 – p2 =0 Ha: p1 – p2<0 Ho: p1 – p2 =0 Ha: p1 – p2≠0 0% 0% 0% Slide 1- 28 1 2 3 DO WHITE WOMEN TYPICALLY HAVE MORE MULTIPLE BIRTHS? 1. 2. 3. Ho: p1 – p2 =0 Ha: p1 – p2>0 Ho: p1 – p2 =0 Ha: p1 – p2<0 Ho: p1 – p2 =0 Ha: p1 – p2≠0 0% 0% 0% Slide 1- 29 1 2 3 DO BLACK WOMEN TYPICALLY HAVE MORE MULTIPLE BIRTHS? 1. 2. 3. Ho: p1 – p2 =0 Ha: p1 – p2>0 Ho: p1 – p2 =0 Ha: p1 – p2<0 Ho: p1 – p2 =0 Ha: p1 – p2≠0 0% 0% 0% Slide 1- 30 1 2 3 SUPPOSE OUR QUESTION IS ‘IS THERE A DIFFERENCE BETWEEN BLACKS AND WHITE?’ WHAT IS OUR TEST ‘RULE’? 1. 2. 3. 4. If z > critical z* , then reject null hypothesis. If z > critical z* , then accept null hypothesis. If z < critical z* , then reject null hypothesis. If z > critical z* , then accept null hypothesis. 0% 0% 0% 0%Slide 1- 31 1 2 3 4 WHAT LEVEL OF SIGNIFICANCE DO YOU WANT TO CHOOSE ? 1. 2. 3. 4. 5. α= .20 z*=1.282 α= .10 z*=1.645 α= .05 z*=1.96 α= .02 z*=2.326 α= .01 z*=2.576 20% 20% 20% 20% 20% Slide 1- 32 1 2 3 4 5 WHAT IS THE RESULT OF THE HYPOTHESIS TEST? 1. 2. 3. Reject the null hypothesis b/c there is sufficient evidence to support the claim of a difference. Do not reject the null hypothesis b/c there is NOT sufficient evidence to support the claim of a difference Accept the null hypothesis b/c there is NOT sufficient evidence to support the claim of a difference Slide 1- 33 SUPPOSE OUR LAST TEST WAS INCORRECT, WHAT TYPE OF ERROR DID WE MAKE? 1. 2. 3. Type 1 – Rejecting when Null is True Type 2 - Failing to Reject when the Null is False This cannot be determined 0% 0% 0% Slide 1- 34 1 2 3 COMING UP… Quiz #5 on Wednesday