You are on page 1of 3

Problem 1

We want to test if fatality of accidents depends on its size, i.e., is size of a car and fatality of
accident independent. Since we have small sample, we can use Fisher’s exact test

H0: no difference
H1: large automobiles are more likely to have fatal accidents

Under H0, it is a randomization model. That is, we consider the 9 fatal and 9 non-fatal
accidents are randomly divided into groups of 8 and 10.

Probability of the current configuration:


9 9
( )( )
𝑃(𝑛12 = 7) = 7 3 = 0.311
18
( )
10
More extreme configuration that favour H1 is n12 = 8, 9

9 9 9 9
( )( ) ( )( )
8 2 9 1
𝑃(𝑛12 = 8) = 18 = 0.067 ; 𝑃(𝑛12 = 9) = 18 = 0.0019
( ) ( )
10 10

Significant probability is 0.3799. So we do not reject H0 at a = 0.05.


We conclude that size of car does not affect fatality of accident

Problem 2

a)
Since the data are both ordinal, we can use gamma measure of association.
C = 187*(684+442+225+252) + 138*(442+252) + 507*(225+252) + 684*252 = 809740
D = 180*(507+684+183+225) + 138*(507+183) + 442*(183+225) + 684*183 = 688548
𝐶−𝐷
𝛾̂ = 𝐶+𝐷 = 0.081, it shows that there is very weak tendency of fundamentalism of subjects’
religious beliefs by their highest degree of education.

b)
We will test for correlation using Pearson’s p
H0: Degree and fundamentalism of belief are independent
H1: p != 0
𝑢̅ = 2.055, 𝑣̅ = 2, 𝑟 = 0.054, 𝑀2 = 8.013 and p-value = 0.005 < 0.05. We reject null
hypothesis of independence.

c)
There is no obvious advantage here since counts are not extreme in the data and total
sample size also appropriate to use X2 and G2 tests. Indeed, when we calculate we find
X2 = 54.84 and G2 = 55.45, while p-value < 0.00001. It means we reject null hypothesis of
independence in all three tests.
Problem 3

We find X2 = 80.81 for which p-value < 0.00001. Our test was that taking aspirin have same
effect on heart attack as taking placebo, which we reject.

Problem 4

a)
𝑛 𝑛 1598 520
MLE for 𝛿 𝑖𝑠 𝛿̂ = 𝑛 11 − 𝑛 21 = 164250 − 421826 = 0.0085
1+ 2+

̂ = 𝑛11𝑛2+ = 1598∗421826 = 7.892


MLE for 𝑅𝑅 𝑖𝑠 𝑅𝑅 𝑛 𝑛 520∗164250
21 1+
Sample proportion of fatal cases are almost 7 times higher for the drivers not using seat belt
𝑛 𝑛 1598∗421306
MLE for 𝜃 𝑖𝑠 𝜃̂ = 𝑛11𝑛22 = 520∗162652 = 7.96
12 21
Estimated odds of a fatal injuries are almost 7 times higher for the drivers not using seat
belt.
It is approximately same because values in the first column are very small compared to
values in the second column.

b)
We have CI for 𝛿
𝛿̂ = 0.0085

1598∗162652 520∗421306
=√ − = 0.00024
1642503 4218263

95% CI is 0.0085 ± 1.96 ∗ 0.00024 = [0.0008, 0.0009]. Since interval contain only positive
values, we conclude that taking seat belt associated with less fatal injuries.
We have CI for log(RR)
̂ ) = log(7.892) = 2.066
log(𝑅𝑅

1 1 1 1
= √1598 − 164250 + 520 − 421826 = 0.05

95% CI for log(RR) is 2.066 ± 1.96 ∗ 0.05 = [1.968, 2.164].


Thus, 95% CI for RR is [7.156, 8.706]. This indicates that fatal injuries is at least 615.6%
higher for the drivers without seatbelt

We have CI for log(𝜃)

, log(𝜃̂) = log(7.96) = 2.074

1 1 1 1
= + + + = 0.0026
1598 162652 520 421306

95% CI for log(𝜃) is 2.074 ± 1.96 ∗ 0.051 = [1.974, 2.174].


Thus, 95% CI for 𝜃 is [7.2, 8.8]. This indicates that odds of fatal injuries is at least 620%
higher for the drivers without seatbelt

Problem 5

Clinic data we saw in the lecture can be given as an example for this. Given the clinic,
response and treatment is conditionally independent. But marginal table give us
odds ratio = 2, thus treatment and response are marginally associated.
Here X: Treatment, Y: Response, Z: Clinic

Problem 6

13∗104
𝜃̂𝑋𝑌(1) = 35∗22 = 1.756, Estimated odds of wife with abnormal heart rate is 75.6% higher
for husband with abnormal heart rate for Z = 1
21∗109
𝜃̂𝑋𝑌(2) = 10∗18 = 12.715, Large odds ratio means, association between wife’s and
husband’s heart ratio is strong, If wife have normal heart ratio, husband also tend to have
normal heart ratio and vice versa.
34∗213
𝜃̂𝑋𝑌 = 32∗53 = 4.27, Here marginal odds ratio also confirms our intuition, so there is no
Simpson’s paradox in the data. One thing to note, as we saw odds ratio for Z=1 and Z=2 have
large difference, it might suggest that years of marriage increase the tendency of having
same (normal or abnormal) heart ratio, i.e. more years pass, tendency increase.

You might also like