AMS572.01 Quiz 8 Fall, 2011

advertisement
AMS572.01
Quiz 8
Fall, 2011
Name: __________________________ ID: ___________________ Signature: _____________
Instruction: This is a close book exam. Anyone who cheats in the exam shall receive a grade of F.
Please provide complete solutions for full credit. The exam goes from 1:00-1:30pm. Good luck!
1. The following data set from a study by the well-known chemist and Nobel Laureate
Linus Pauling gives the incidence of cold among 279 French skiers who were
randomized to the Vitamin C and Placebo groups.
Group
Cold
Yes No
Vitamin C 17 122
Placebo
31 109
(a) Construct a 95% confidence interval for the difference between the two incidence
rates;
(b) Please test whether the incidence rates for the Placebo group is significantly higher
than that of the Vitamin C group at the 5% level of significance. Please report the pvalue of your test.
(c) Please write up the entire SAS program necessary to answer question raised in (b),
including the data step.
Answer of quiz 8
(a) Denote the incidence rates in VC group and Placebo group as 𝑝1 and
𝑝2 respectively, then from CLT, we have
𝑝̂1 ~̇𝑁(𝑝1 ,
𝑝̂1 =
17
139
𝑝1 (1−𝑝1 )
𝑚
) and 𝑝̂ 2 ~̇𝑁(𝑝2 ,
, and 𝑝̂ 2 =
31
140
𝑝2 (1−𝑝2 )
𝑚
), where m=139, n=140,
.
From Slutsky’s Theorem,
𝑝̂1 −𝑝̂2 −(𝑝1 −𝑝2 )
̂ (1−𝑝
̂ 1) 𝑝
̂ (1−𝑝
̂2)
𝑝
√ 1
+ 2
𝑚
~̇𝑁(0,1).
𝑚
Therefore, the 95% CI for 𝑝1 − 𝑝2 is 𝑝̂1 − 𝑝̂ 2 ±
𝑝̂1 (1−𝑝̂1 )
𝑧𝛼 √
𝑚
2
+
𝑝̂2 (1−𝑝̂2 )
𝑚
, that is (-0.187, -0.011).
(b) 𝐻0 : 𝑝1 = 𝑝2 𝑣𝑠 𝐻1 : 𝑝1 < 𝑝2 .
𝑝̂ =
𝑚𝑝̂1 +𝑛𝑝̂2
𝑍0 =
=
16
𝑚+𝑛
93
𝑝̂1 −𝑝̂2
1 1
𝑚 𝑛
.
= −2.215.
√𝑝̂(1−𝑝̂)( + )
𝑝−value=𝑃(𝑍 < 𝑍0 ) = 0.0136 < 0.05, so we reject 𝐻0 .
(c) SAS CODE:
DATA EXAMPLE;
INPUT GROUP $ STATUS $ COUNT;
DATALINES;
VC YES 17
VC NO 122
PL YES 31
PL NO 109
;
RUN;
PROC FREQ DATA=EXAMPLE ORDER=DATA;
TABLES GROUP * STATUS / CHISQ;
WEIGHT COUNT;
RUN;
Download