HW 3 Solution
HW 3 Solution
HW 3 Solution
(a) (3 marks) At the 0.05 level of significance, test the null hypothesis that
there is no association between physician specialty and recommended treatment.
Solution:
We find a chi-square statistic of 28.986 on 8 df, giving a p-value of less
than 0.001 (3 marks). We reject the null hypothesis at the 0.05 level.
For part marks, you should have presented a table of expected values (1
mark):
R
Internal 5.25
Surgery 15.82
Radio. 4.42
Oncology 4.20
Gynec. 3.30
CR
17.50
52.75
14.75
14.00
11.00
C
47.25
142.43
39.83
37.80
29.70
Internal
Surgery
Radio.
Oncology
Gynec.
R
0.11
3.25
1.33
2.44
1.60
CR
1.16
1.29
9.36
0.29
0.09
C
0.58
1.67
5.05
0.72
0.06
Number of
pregnancies
33164
9099
3069
1527
287
Spontaneous
abortions
6793
2068
776
456
98
(a) (1 mark) For each level of alcohol consumption, estimate the probability
that a woman who becomes pregnant will undergo a spontaneous abortion.
Solution:
The estimates are obtained by the dividing the number of spontaneous
abortions by the total number of pregnancies for each alcohol use category.
To three decimal places, the estimated probabilities for the five levels of
alcohol use are 0.205, 0.227, 0.253, 0.299, ad 0.341, respectively.
(b) (1 mark) For each category of alcohol use, estimate the relative odds of
experiencing a spontaneous abortion for women who consume some amount
of alcohol versus those who do not consume any.
Solution:
2
Sp. Abb.
2068
6793
No Sp. Abb.
9099-2068
33164-6793
Full marks for the following CIs for the ORs (1 mark):
(1.080,1.207),
(1.206,1.431),
(1.477,1.850), and
(1.575,2.573).
Part marks for getting the right SEs (1 mark) 0.0285, 0.0437, 0.0575,
0.1252, and the right CIs for the log-ORs (1 mark):
(0.077,0.188),
(0.187,0.359),
(0.390,0.615), and
(0.454,0.945).
(d) (1 mark) What do you conclude?
Solution:
The book seems to be leading you to conclude that each of these intervals
does not cover one. You could also have said something like: We conclude
that alcohol use increases the odds of spontaneous abortion. Or, you cold
have mentioned a dose-response relationship between alcohol use and the
odds of spontaneous abortion.
3. (14 marks) A study compared the cucceess rates of two different procedures
for removing kidney stones: open surgery and percutaneous nephrolithotomy
(PCNL), a minimally invasive technique.
The number of procedures that were successful or not at getting rid of patients
kidney stones for each type of procedure is shown in the tables below. A separate
table is given for patients with small kidney stones and for patients with large
stones.
(a) (1 mark) Calculate the sample odds ratio of a successful kidney stone
removal for each of the tables (Table 2 and Table 3).
3
Procedure
Open surgery PCNL
Success
81
234
Failure
6
36
Table 2: Small stones.
Procedure
Open surgery PCNL
Success
192
55
Failure
71
25
Table 3: Large stones.
Solution:
d = 81 36/(6 234) = 2.077.
For small stones, OR
d = 192 25/(55 71) = 1.229.
For large stones, OR
(b) (1 mark) Obtain a 95% CI for the odds ratio of a successful kidney stone
removal when the stones are large.
Solution:
A 95% CI for the odds ratio is
d
exp(ln(1.229) 1.96 se[ln(OR)])
with
s
d =
se[ln(OR)
1
1
1
1
+
+
+
= 0.278.
192 55 71 25
(d) (1 mark) Calculate the sample odds ratio for your table in part c).
Solution:
d = 273 61/(77 289) = 0.748.
OR
(e) (1 mark) Compare the sample odds ratio that you calculated in part d)
with the ones you had calculated in part a). Did anything unexpected
4
happen with the sample odds ratio once you combined the two separate
tables into one? What is the name of this phenomenon?
Solution:
The OR for the combined table is smaller than the OR for any of the
separate tables. This is known as Simpsons paradox.
(f) (3 marks) Test the homogeneity of odds ratios of a successful kidney stone
removal over the two different procedures of removal at the significance
level 0.05. Show all steps.
Solution:
i. H0 : OR1 = OR2 ; Ha : OR1 6= OR2 (1 mark)
ii. X 2 = 0.955. (1 mark)
Details: w1 = 1/(1/81 + 1/234 + 1/6 + 1/36) = 4.738.
w2 = 1/(1/192 + 1/55 + 1/71 + 1/25) = 12.907.
y1 = ln(2.077) = 0.731
y2 = ln(1.229) = 0.206
Y = (w1 y1 + w2 y2 )/(w1 + w2 ) = 0.347
X 2 = w1 (y1 Y )2 + w2 (y2 Y )2 = 0.955.
iii. df = 1; critical value is 3.84 (significance level 0.05). Fail to reject H0
since 0.955<3.84 (or use p-value =0.328>0.05). Homogeneity of odds
ratios seems true. (1 mark)
(g) (1 mark) Calculate the common odds ratio of a successful kidney stone
removal adjusted by stone size.
Solution:
The total for the first table is 357 and the total for the second table is 343,
d = 8136/357+19225/343 = 1.447
so OR
6234/357+7155/343
(h) (2 marks) Construct a 95% CI for the common odds ratio of a successful
kidney stone removal adjusted by stone size.
Solution:
w1 = 1/(1/81 + 1/234 + 1/6 + 1/36) = 4.738.
w2 = 1/(1/192 + 1/55 + 1/71 + 1/25) = 12.907.
Y = (ln(2.007) w1 + ln(1.229) w2 )/(w1 + w2 ) = (0.731 4.738 + 0.206
12.907)/(4.738 + 12.907) = 0.347
i. H0 : OR = 1, Ha : OR = 1
ii. The expected count for the first cell in the small stones case is (81 +
234)(81+6)/357 = 76.76. For the large stone case it is (192+55)(192+
71)/343 = 189.39.
The total for the first table is T1 =357 and the total for the second
table is T2 =343.
SD12 = (81 + 6)(234 + 36)(81 + 234)(6 + 36)/(3572 (357 1)) = 6.849.
SD22 = (192+71)(55+25)(192+55)(71+25)/(3432 (3431)) = 12.399.
2
So X 2 = [(81+192)(76.76+189.39)]
= 2.438.
6.849+12.399
iii. df = 1; critical value is 3.84. Fail to reject H0 because 2.438<3.84 (or
use p-value = 0.118>0.05). There doesnt seem to be an association
between success of kidney stone removal and procedure.