Sol Testing 2
Sol Testing 2
SOLUTIONS
1. Halcion is a sleeping pill that is relatively rapidly metabolized by the body and therefore
having fewer hangover effects the next morning, compared to other sleeping pills. Opponents of
Halcion argue that, because this agent is so rapidly metabolized by the body, patients do not sleep
as long with this drug as with Dalmane. Data on 10 insomniacs, each of whom took Dalmane on
one occasion and Halcion on a second, is collected. The variable measured is number of hours of
sleep:
Do these data suggest that Halcion is not as effective as Dalmane with respect to number of
hours of sleep? Carry out an appropriate statistical test and interpret your findings. You may
assume that the measurements of sleep are continuous, distributed normal.
ANSWER
These data are paired measurements of an outcome measured on a continuum in a single sample.
It is of interest to compare the responses of the paired measurements. The
correct test is therefore a paired t-test.
For these data, a paired t-test suggests that the average difference in hours slept (Dalmane –
Halcion) = 0.32 is statistically significant (one sided p-value = .018).
sol_testing_2.docx
BIOSTATS 540 – Fall 2015 Introductory Biostatistics Page 2 of 5
SOLUTION
This question is asking for a hypothesis test of the equality of two means in the setting of paired data. The
data are paired because each participant was measured on two occasions, once on Dalmane and once on
Halcion.
Assumptions.
d is distributed Normal (µd , σd2/10)
Differences are calculated as (Dalmane – Halcion)
HO and HA.
HO : µd = 0
HA : µd > 0 (“Dalmane is better than Halcion”) – one sided
⎡ (d)-E[d)|HO true] ⎤
t score = ⎢ ⎥
ˆ
⎣ SE[(d)|HO true] ⎦
10
∑d i
⎡ 0.61+ 0.31+ ...+ 0.71 ⎤
d = i=1
= ⎢ ⎥ = 0.32
10 ⎣ 10 ⎦
sol_testing_2.docx
BIOSTATS 540 – Fall 2015 Introductory Biostatistics Page 3 of 5
10 10
∑( ) ∑ (d − 0.32 )
2 2
di − d i
(0.61− 0.32)2 + ...+ (0.71− 0.32)2
Sd2 = i=1
= i=1
= = 0.1688889
(n-1) 9 9
ˆ [ d | H true]
Obtain the estimated standard error, SE O
Sd2 0.1688889
SEˆ [ d | H O true] = = = 0.1299573
n 10
Putting these all together, the solution for the test statistic is
“Evaluation” rule.
Calculations.
p-value = Pr [ t score ≥ 2.46] where degrees of freedom = 9
=.018
sol_testing_2.docx
BIOSTATS 540 – Fall 2015 Introductory Biostatistics Page 4 of 5
Enter the following, being sure to click on the radio dial for a RIGHT TAIL
After pressing the RIGHT ARROW, you should obtain 0.0181 in the probability box.
“Evaluate”.
The assumption of the null hypothesis HO (duration of sleep is the same with both drugs) has led to
an unlikely result. Under the null hypothesis the chance that the difference in average hours slept is
as great or greater than 0.32 hours is about 2 in 100. “2 chances in 100” is “unlikely” enough that I
warrants rejecting the null hypothesis. Put another way, in this sample, the average difference of
0.32 hours is statistically significant.
sol_testing_2.docx
BIOSTATS 540 – Fall 2015 Introductory Biostatistics Page 5 of 5
2. For the Halcion versus Dalmane data in Exercise 1, construct a 99% confidence interval
estimate of discrepancy in the efficacies of the two drugs. Compare this to the acceptance region
that would have been obtained had you constructed a statistical test with type I error pre-specified
at 0.01.
SOLUTION
ˆ Sd
d = 0.32 SE(d)= = 0.1299573
n
df=(n-1)=9 t1-α /2;df = t .995;9 = 3.25 from the calculator on the web above.
ˆ
99% CI for µ d = d ± (t .995;DF=9 ) SE(d)
Solution for the acceptance region of a one sided test with alpha = .01 is obtained by reasoning as follows
Rejection occurs for t-score > the 99th percentile of a student’s t on df=9 à
d-0
Acceptance occurs for < t .99;df=9 By plugging in numbers for the SE and the percentile à
ˆ
SE(d)
d
Acceptance occurs for < 2.821 where I used the calculator on the web as before à
0.1299573
Comparison
These two regions overlap but are not identical. They are not identical because the confidence interval is two
sided whereas the acceptance region is one sided.
sol_testing_2.docx