Please be aware that the basic knowledge of R syntax is required for this question
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. - Toxemia is a condition characterized by high blood pressure and other potentitally serious 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 V170 (1 po)/ 11 Z: A 100x(1-a)% CI for p can be obtained with :3 iZa/zx/P'Tl 23V\" 4. Refer to the example that starts on page 13 of the 'Chl 1-14' notes. Let p 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 twosided. 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 -1.96. Power is P( reject H0 |p=0_25) = P( Z>1.96 or Z1.96 | p:0.25): P( 1.96 | p:0.25) : P( >0.305 lp:0.25). So far we have 19' on one side of the inequality. We also can claim that A P(33>0.305|p=0.25)=P( 19-025 0305025 o.2s(1a.2s) 025(1025) 56 56 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 ofp when standardizing 15'. | p=0.25). When p=0_25, % has an approximate standard Normal distribution. So, P( 13025 0305025 |p=0.25) = P(Z 0305025 = 0-95 |p=0.25) o.25(1o.25) c.25(1o.25) o.25(1o.25) 56 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 -1.96 we have that P( Z