Please be aware that the knowledge of R is required
Inference for a proportion (example) ' We will be using a data set that contains information for a sample of 100 low birth weight infants. We will take a look at variable tox, which indicates whether toxemia was diagnosed for the mother while pregnant. 0 Toxemia is a condition characterized by high blood pressure and other potentitally serlous complications. From 56 cases where the mother gave birth to a girl, in 11 of them the mother was diagnosed with toxemia. - Obtain a 95% confidence interval for p1, the proportion of mothers (who gave birth to a girl) with toxemia . Formulas In order to test H0: p = p0, we use the test statistic A PPo V1900 POW\" Z: A 100x(1-0L)% CI for p can be obtained with 15 iZa/2J(1 - I'D 4. Refer to the example that starts on page 13 of the 'Ch11-14' notes. Let 1) represent the true proportion of mothers diagnosed with toxemia. a) For those mothers who gave birth to low weight girls, test whether the true proportion diagnosed with toxemia is 0.2 or not. Use a = 0.05. Show and label all steps. [4 marks] b) Calculate the power of the test in part a) when p = 0.25. solution: In this case there will be 2 critical values since the test is two-sided. The critical values are -1.96 and 1.96 since between them we nd 95% of probability on a standard Normal distribution. We reject Ho if the test statistic is greater than 1.96 or less than -l.96. Power is P( reject Ho |p=0.25) = P( Z>l.96 or Z1.95 | p=0.25) = P( % 1.96 l p=0.25) = P( 3590305 | p=0.25). 56 So far we have :3 on one side of the inequality. We also can claim that A P( >0305 |p=025) = P( 33025 0.305025 o.25(1-o.25) o.25(1-o.25} I 55 55 At this moment it looks like we got back to the initial point. However, since we are assuming p=0.25, we must use this value of p when standardizing p\". p=0.25). 13 0.25 0250025) 56 When p=0.25, has an approximate standard Normal distribution. So, ifs0.25 0305025 _ _ uses0.25 _ _ P( 02590252 02590252 lpOQS) P( Z ,0-259'0-352 O'95 lp0.25) 56 56 Yey, almost done. We can calculate this probability using R with pnorm(0.95, lower.tail=F). The answer is 0.171 (with only 3 decimals but R gives you many more decimals). Now working with -l .96 we have that P( Z