**Unformatted text preview:**

STA2023Chapter 20 Part 1: Comparing Two Proportions (two proportion z test)Confidence Intervals for Comparing Two Independent ProportionsParameter was want to estimate is Since we don’t know the population parameters, we use their estimators: *Calculator Option: STAT TEST Option B: 2-PropZInterval. Fill in X1( ), N1( ), X2( ), N2 ( ), C-Level (Confidence)*z* = invnorm(confidence+right tail)ex. invnorm(0.975) if confidence was 95%z* = 1.64 90% confidencez* = 1.96 95% confidencez* = 2.58 99% confidenceInterpreting Confidence Intervals for Comparing Two Proportions(-,+) – zero in intervalIf the confidence interval includes zero therefore = 0 is plausible. There is no statistical evidence of a significant difference between the 2 proportions(+,+) – If the confidence interval does not include zero and the values in the interval are both positive, say (a, b) then is between a and b more than .(-,-) – If the confidence interval does not include zero and the values in the interval are both negative, say (-a, -b) then is between a and b more than .Assumptions/Conditions for Comparing Two Proportions- Independent- 10 successes and 10 failures in each group- 10% condition to make sure we sampled less than 10% of the populationHypothesis:Null Hypothesis – states that there is no difference between the parametersAlternative Hypothesis – Test Statistic (z test because it is categorical data):But if we only had a and a , where did the with no underscore come from?Where # of successes/sample size*Calculator Option: STAT TEST Option 6: 2-PropZTest. Fill in X1( ), N1( ),X2( ), N2 ( ), P1: (≠P2, <P2, >P2)*P-value – the probability that the test statistic equals the observed value or a value more extreme if the null hypothesis is true.Conclusion – small p-values support , so reject ; large p-values suggest failing to reject .Examples:1. Among randomly sampled teens aged 15-17, 57% of the 48 boys had social media profiles, compared to 70% of the 256 girls. Is there a significant difference between the proportion of boys and girls that had social media profiles?a. Are the assumptions and conditions met to create a confidence interval?Independent/random samples – random –one group does not affect another.10 successes/10 failures – 179/77 and 141/10710% condition – 504 < 10% of teen in worldb. Create a 95% confidence interval and interpret.(0.7-0.57) 1.96 √0.0018086190.13 0.0834 (0.05, 0.21)We are 95% confident that the proportion of 15-17 year old girls who use social media is between 0.05 and 0.21 more than the proportion of 15-17 year old boys who use social media.c. Conduct a two proportion z test to determine if there is a significant difference in the proportion of boys and girls who have social media profiles. = (179+141)÷(256+248) = 0.63 = 0.13 ÷ √0.00185 = 3.02P-value – P(z > 3.02) × 2 = 0.0025The probability of observing a sample with a 13% or more difference between boys or girls using social media if there is no difference between boys and girls social media usage.α = 1 – confidence interval = 1- 0.95 = 0.050.0025 > 0.05 YESWe Reject . We have sufficient evidence at 95% confidence level to conclude that there is a difference between the proportion of boys and girlswith social media profiles.2. A new vaccine was tested to see if it could prevent the ear infections that many infants suffer from. Babies about a year old were randomly divided into two groups. One group received vaccinations, and the other did not. The following year, 414 of 2459 vaccinated children had ear infections, compared to 496 of 2451 unvaccinated children.a. Check the assumption and conditions and create/interpret a 99% confidence interval for the difference in the rates of ear infections.Independent/random sample – ear infection independent, children randomly divided10 successes/10 failures – 414/2459 and 496/245110% condition – less than 10% of all babies in the worldSTAT TEST B: 2-PropZIntervalX1: 414N1: 2459X2: 496N2: 2451C – Level: 0.99 Calculate (-0.0625, -0.0055)We are 99% confident that the proportion of unvaccinated babies who got ear infections in between 0.0055 and 0.0625 more than the proportion of vaccinated babies.b. Conduct a hypothesis test to determine if the vaccine helped prevent ear infections. Test at the 99% level of confidence. = (414+496)÷(2459+2451) = 0.1853 ORSTAT TEST 6: 2-PropZTestX1: 414N1: 2459X2: 496N2: 2451P1: < P2 Calculate z = -3.07p-value: P(z < -3.07) = .0011 The probability of observing a 3% difference between vaccinated and unvaccinated babies who get ear infections if the proportions are the same.α = 1 – 0.99 = 0.010.0011 < 0.01 YESWe Reject . At 99% confidence we have sufficient evidence to concludethat the vaccine worked – because less vaccinated children got ear infections than the unvaccinated

View Full Document