You are on page 1of 9

Statistics 252 – Homework # 4 Solutions – Winter 2017

STAT 252 Homework 4 (38 marks) – Due Thursday, April 6 at 10 PM

1) (17 marks total) Persistent patent ductus arteriosus (PDA) is a medical condition that affects many very
low-birth weight infants. Infants with PDA have an increased risk of serious ailment such as severe heart
failure. The Apgar score is used to assess the health of an infant one minute after birth. The one-minute
Apgar score measures how well the newborn tolerated the birthing process. A score of seven to 10 is
normal and indicates the newborn is in good condition. Any score less than seven indicates that the baby
needs assistance such as helping the infant breathe. Airway pressure is a measure of respiratory status,
usually measured seven days after birth.

Some researchers determined that early ibuprofen administration might prevent PDA in preterm neonates.
A sample of 130 such infants was randomly divided into 4 groups. 32 were treated with one dose of
ibuprofen, 33 with two doses, 33 with three doses, and 32 with a saline solution. The following is the
description of variables under study.

Variable Description of Variables


Gender Male OR Female,
Dose Dose of ibuprofen (an integer from 0 to 3),
Weight Birth weight (in pounds),
Age Gestational age (in weeks),
Score One-minute Apgar score,
Pressure Air-way pressure (in cm H 2 O ) seven days after birth.

Define variables Gender and Dose using the following indicator variables:

male = 1 for a Male and male = 0 for a Female,

D1 = 1 if Dose of ibuprofen is 1 and D1 = 0 otherwise,

D2 = 1 if Dose of ibuprofen is 2 and D2 = 0 otherwise,

D3 = 1 if Dose of ibuprofen is 3 and D3 = 0 otherwise.

Note: No output is needed for questions (a) to (c).

Consider the following regression model with pressure as the response:

{ pressure | weight , GENDER, DOSE}   0  1weight   2 male  3 D1   4 D2  5 D3


  6 ( weight  male)   7 ( weight  D1)  8 ( weight  D2)  9 ( weight  D3)
 10 ( weight  male  D1)  11 ( weight  male  D 2)  12 ( weight  male  D3)

This model will be referred to as the ‘original’ model.

(a) (5 marks: 1 for the general effect, 0.5 for each individual one ) Referring to the original model, in terms
of the regression coefficients, what is the effect of weight on mean pressure, after accounting for
gender and dose? Define this effect in general, and then summarize it for each combination of gender
and dose of ibuprofen. Summarize your results in a chart like the one below.

This study source was downloaded by 100000873991846 from CourseHero.com on 11-29-2023 19:59:20 GMT -06:00
1

https://www.coursehero.com/file/27816965/252HW4Solnpdf/
Statistics 252 – Homework # 4 Solutions – Winter 2017
The effect of weight on mean pressure is:
{ pressure | weight  1, GENDER, DOSE}  { pressure | weight, GENDER, DOSE}
 1  6 male  7 D1  8 D2  9 D3  10 (male  D1)  11 (male  D2)  12 (male  D3)

Therefore, for each combination of gender and dose of ibuprofen, we have:

Gender Dose of ibuprofen Effect of weight on mean pressure


Male 0 1   6
Male 1 1   6   7  10
Male 2 1   6   8  11
Male 3 1   6   9  12
Female 0 1
Female 1 1   7
Female 2 1   8
Female 3 1   9

(b) (2 marks) Modify the original model to specify that the effect of weight on the mean of pressure is the
same for males and females with the same dose of ibuprofen; otherwise, the effect of weight on the
mean of pressure is possibly different for males and females without having the same dose of
ibuprofen. Just state the constraint(s) needed. You do not have to rewrite the model.

 Dose  0 : 1   6  1   6  0 
 Dose  1 :                 0 
 
   6  10  11  12  0
1 6 7 10 1 7 6 10

 Dose  2 : 1   6   8  11  1   8   6  11  0 
 Dose  3 : 1   6   9  12  1   9   6  12  0 

(c) (3 marks) Referring to the original model, write the null and alternative hypothesis, in terms of the
coefficients, to test whether the effect of weight is the same for all doses of ibuprofen for females.
What is the distribution of the test statistic under the null hypothesis?

The effect of weight on the mean of pressure is the same for all doses of ibuprofen for females if
β1 = β1 + β7 = β1 + β8 = β1 + β9. This implies that β7 = β8 = β9 = 0.

Therefore, H0: β7 = β8 = β9 = 0
HA: at least one βi ≠ 0, i = 7, 8, 9 (1.5 marks)

F0 ~ Fdfdf((fr))df ( f )  Fn3( p 1)  F130


3
13  F117
3
(1.5 marks)

This study source was downloaded by 100000873991846 from CourseHero.com on 11-29-2023 19:59:20 GMT -06:00
2

https://www.coursehero.com/file/27816965/252HW4Solnpdf/
Statistics 252 – Homework # 4 Solutions – Winter 2017
(d) (3 marks: 1 for the general effect, 0.5 for each individual one ) Referring to the original model, in terms
of the regression coefficients, what is the effect of gender on mean pressure, after accounting for
weight and dose? Define this effect in general, and then summarize it for each dose of ibuprofen.
Summarize your results in a chart like the one below.

The effect of gender on mean pressure is:


{ pressure | weight , GENDER  male, DOSE}  { pressure | weight , GENDER  female, DOSE}
{ pressure | weight , male  1, DOSE}  { pressure | weight, male  0, DOSE}
  2  6 weight  10 weight  D1  11 weight  D2  12 weight  D3

Therefore, for each level of dose of ibuprofen, we have:

Dose of ibuprofen Effect of gender on mean pressure


0  2   6 weight
1  2  (  6  10 )weight
2  2  (  6  11 )weight
3  2  (  6  12 )weight

(e) (2 marks) Rewrite the original model indicating that gender has no effect on mean pressure.

{ pressure | weight , DOSE}   0  1 weight  3 D1   4 D2  5 D3


  7 ( weight  D1)  8 ( weight  D 2)   9 ( weight  D3)

(f) (7 marks) Consider the following three models:

Model 1: { pressure | DOSE}   0  1 D1   2 D 2  3 D3

Model 2: {Pressure | Weight , Age, GENDER}   0   4Weight  5 Age   6 Male ,

{Pressure | DOSE, Weight , Age, GENDER}   0  1D1   2 D2  3 D3


Model 3: .
  4Weight  5 Age   6 Male

Carry out the most appropriate test to determine if there are any differences in the mean pressure for
the four different levels of dose, after accounting for weight, age, and gender. Use α = 0.01.

Using Model 3 as the full model, then test to see if β1 = β2 = β3 = 0.

H0: β1 = β2 = β3 = 0 (Model 2)
HA: at least one βi ≠ 0, i = 1, 2, 3 (Model 3)

Reduced model: SSR(Model 2) = 94.441, df(Model 2) = 126


Full model: SSR(Model 3) = 1.121, df(Model 3) = 123

This study source was downloaded by 100000873991846 from CourseHero.com on 11-29-2023 19:59:20 GMT -06:00
3

https://www.coursehero.com/file/27816965/252HW4Solnpdf/
Statistics 252 – Homework # 4 Solutions – Winter 2017
( SSR(r )  SSR( f )) / (df (r )  df ( f )) (94.441  1.121) / (126  123)
F0  
SSR( f ) / df ( f ) 1.121/ 123
93.320 / 3
  3413.131 ~ F123 3
 F100
3
(for F-table)
1.121/ 123

∞ > F0 = 3413.131 > 5.86


0 < p-value < 0.001
  
 p-value = P Fdfdf((fr))df ( f )  F0  P F123
3
 
 3413.131  P F100
3
 3413.131  (0,0.001) 
With a p-value < α = 0.01, we reject H0. The mean of pressure is, thus, different among the four different
levels of doses, after accounting for weight, age, and gender.

ANOVA table for model 1:

ANOVA table for model 2:

ANOVA table for model 3:

This study source was downloaded by 100000873991846 from CourseHero.com on 11-29-2023 19:59:20 GMT -06:00
4

https://www.coursehero.com/file/27816965/252HW4Solnpdf/
Statistics 252 – Homework # 4 Solutions – Winter 2017
2) (33 marks total) Suppose a study on Earth was done to investigate the IQ scores of particular organisms
(Humans, Dolphins, or Mice) while simultaneously measuring their gender (Male or Female) and level of
panic (based on a score out of 10, with 10 denoting the level with the most panic). Each organism group
consisted of a random sample of 20 observations. Level of panic is modeled as a continuous variable. To fit
a MLR model, the indicator variables dolphin, mouse, and female are used to indicate the level of their
respective categorical variables.

female = 1 for a Female and female = 0 for a Male,

dolphin = 1 for a Dolphin and dolphin = 0 otherwise,

mouse = 1 for a Mouse and mouse = 0 otherwise,

Use the following model to answer parts (a) and (b):


 ( IQ | panic, ORG , GEN )   0  1 panic   2 dolphin  3 mouse   4 female 
 5 ( panic dolphin)   6 ( panic mouse)   7 ( panic female)   8 (dolphin female) 
 9 (mouse  female)  10 ( panic dolphin female)  11 ( panic mouse  female)

(a) (3 marks) In terms of the regression coefficients, what is the effect of gender (female vs. male) on
mean IQ, after accounting for panic level and organism type? Define this effect in general, and then
summarize it for each type of organism. Summarize your results in a chart like the one below.

By definition, the effect of gender on mean IQ (male vs. female) in the model above is:
 ( IQ | panic, ORG, GEN  female)   ( IQ | panic, ORG, GEN  male)
  4   7 panic   8 dolphin  9 mouse  10 ( panic dolphin)  11 ( panic mouse)

Organism Effect of gender (female vs. male) on mean IQ


dolphin (β4 + β8) + (β7 + β10)panic
mouse (β4 + β9) + (β7 + β11)panic
human β4 + β7panic

Consider the following two models for parts (b) through (f):
 ( IQ | panic, ORG)  0  1 panic  2 dolphin  3mouse 
Model 1:
4 ( panic  dolphin)  5 ( panic  mouse)
Model 2:  ( IQ | panic, ORG )   0  1 panic   2 dolphin  3mouse

(b) (3 marks) Based on Model 1 and in terms of the regression coefficients, what is the effect of panic
level on mean IQ for each type of organism? Define this effect in general, and then summarize it for
each type of organism. Summarize your results in a chart like the one below.
By definition, the effect of panic on mean IQ in the model above is:

 ( IQ | panic  1, ORG )   ( IQ | panic, ORG) 


[  0  1 ( panic  1)   2 dolphin  3 mouse   4 (( panic  1)  dolphin)  5 (( panic  1)  mouse)]
[  0  1 panic   2 dolphin  3 mouse   4 ( panic  dolphin)  5 ( panic  mouse)]
 1   4 dolphin  5 mouse

This study source was downloaded by 100000873991846 from CourseHero.com on 11-29-2023 19:59:20 GMT -06:00
5

https://www.coursehero.com/file/27816965/252HW4Solnpdf/
Statistics 252 – Homework # 4 Solutions – Winter 2017
Organism Effect of panic level on mean IQ
dolphin β1 + β4
mouse β1 + β5
human β1
Does the effect of panic level on mean IQ depend on the type of organism? To answer this question, in
parts (c) – (e), you will compare the model where the effect of panic level depends on the type of
organism to the model where this effect does not depend on the type of organism.

(c) (3 marks) Calculate the percentage of variation in IQ explained by each of the regression models
(Models 1 and 2) in your comparison. What do you (informally) conclude?

 22642.199 
Model 1: R 2   100%  70.6%
 32071.291 
(1 mark for each; 1 mark for the comparison.)
 22101.844 
Model 2: R  
2
100%  68.9%
 32071.291 
The percentage of variation explained by Model 1 (the “more complicated” full model with interaction)
is slightly larger than the percentage of variation explained by Model 2 (the reduced model without
interaction). It does not appear that the interaction contributes that much. Model 2 seems to be
sufficient.

(d) (7 marks) Carry out the most appropriate test to determine if the effect of panic level on mean IQ
depends on the type of organism. Use α = 0.05.

If the effect of panic level doesn’t depend on organism type, then β4 = β5 = 0.

H0: β4 = β5 = 0
 ( IQ | panic, ORG )   0  1 panic   2 dolphin   3 mouse (Model 2)

HA: at least one βi ≠ 0 where i = 4, 5


 ( IQ | panic, ORG )   0  1 panic   2 dolphin  3 mouse 
(Model 1)
 4 ( panic  dolphin)  5 ( panic  mouse)

Reduced model: SSR(Model 2) = 9969.447, df(Model 2) = 56


Full model: SSR(Model 1) = 9429.092, df(Model 1) = 54

( SSR(r )  SSR( f )) / (df (r )  df ( f )) (9969.447  9429.092) / (56  54)


F0  
SSR( f ) / df ( f ) 9429.092 / 54
540.355 / 2
  1.547 ~ F542  F502 (for F-table)
9429.092 / 54

2.41 > F0 = 1.547 > 1.43


0.1 < p-value < 0.25   
 p-value = P Fdfdf((fr))df ( f )  F0  P F50
2

 1.547  (0.1, 0.25)

With a p-value > α = 0.05, we do not reject H0. There is insufficient evidence that the effect of panic
level on mean IQ depends on organism type.

This study source was downloaded by 100000873991846 from CourseHero.com on 11-29-2023 19:59:20 GMT -06:00
6

https://www.coursehero.com/file/27816965/252HW4Solnpdf/
Statistics 252 – Homework # 4 Solutions – Winter 2017
(e) (1 mark) Compare your results in (c) and (d).

In part (d), there is a very small increase in the explained variation by fitting Model 1 instead of Model 2.
This is an indication that Model 1 isn’t that much better than Model 2. This is confirmed in part (e). Both
results indicate that Model 2 appears to be sufficient.

(f) (5 marks) Using Model 2, carry out the most appropriate test to determine if panic level has a negative
effect on mean IQ, after accounting for organism type. Use α = 0.05.

Since Model 2 has no interaction terms, this is a one-tailed t-test for panic level’s regression coefficient.

H0: β1 = 0 HA: β1 < 0 (1 mark)

ˆi  0 1.841  0
t0    1.332 ~ t56 (1 mark for test statistic, 1 mark for null distribution)
ˆ
S .E.( i ) 1.381

0.188
p  value  P (tn  ( p 1)  t0 )  P (t56  1.332)   0.094 (1 mark for p-value)
2

With a p-value of 0.094, we fail to reject the null hypothesis at α = 0.05. Thus, there is insufficient
evidence that panic level has a negative effect on mean IQ, after accounting for organism type.
(1 mark for conclusion)

(g) (5 marks) For both models, estimate the IQ level for a dolphin, who after spending a lot of money on
lottery tickets, understandably has a panic level of 9.73. If the dolphin’s observed IQ level is 121, which
model produces the better estimate?

Model 1: Ŷ = 133.514 – 5.154(9.73) + 1.381(1) + 0.947(0) + 3.895(9.73×1) + 5.613(9.73×0) = 122.645


The residual for Model 1 is y – ŷ = 121 – 122.645 = -1.645.

Model 2: Ŷ = 107.710 – 1.841(9.73) + 29.032(1) + 35.340(0) = 118.829


The residual for Model 2 is y – ŷ = 121 – 118.829 = 2.171.

Since Model 1 produces the residual with the smaller magnitude, it produces the better estimate. Note,
however, that it is not that much better than Model 2.

(h) (7 marks) For both models, calculate a 99% approximate prediction interval for the dolphin in part (g).

For Model 1:
Yˆ  tn ( p 1), /2  ˆ t n( p1), / 2 = t54, 0.005 ≈ t50, 0.005 = 2.678
122.645 ± (2.678)(13.214) ˆ  174.613  13.214
122.645 ± 35.387
(87.258, 158.032)

With 99% confidence, the predicted IQ for a dolphin with a panic level of 9.73 using Model 1 is between
87.258 and 158.032.

This study source was downloaded by 100000873991846 from CourseHero.com on 11-29-2023 19:59:20 GMT -06:00
7

https://www.coursehero.com/file/27816965/252HW4Solnpdf/
Statistics 252 – Homework # 4 Solutions – Winter 2017
For Model 2:
Yˆ  tn ( p 1), /2  ˆ t n( p1), / 2 = t54, 0.005 ≈ t50, 0.005 = 2.678 (Same as Model 1)
118.829 ± (2.678)(13.343) ˆ  178.026  13.343
118.829 ± 35.491
(83.338, 154.320)

With 99% confidence, the predicted IQ for a dolphin with a panic level of 9.73 using Model 2 is between
83.338 and 154.320.

(i) (4 marks) Based on Model 2, calculate a 95% confidence interval for the difference in mean IQ for mice
vs. humans (this is the effect of being a mouse vs. being a human on mean IQ).

By definition, the effect of being a mouse vs. being a human (based on model 2) is:
 ( IQ | panic, ORG  mouse)   ( IQ | panic, ORG  human)   2

A 95% confidence interval for β2 is


̂ 2 ± tα/2, n – (p + 1) × S.E.(ˆ2 ) tα/2, n – (p + 1) = t0.025, 56 ≈ t0.025, 50 = 2.009
35.340 ± (2.009)(7.011)
35.340 ± 14.085
(21.255, 49.425)

It is estimated with 95% confidence that the effect of being a mouse vs. being a human on mean IQ is
between 21.255 and 49.425.

This study source was downloaded by 100000873991846 from CourseHero.com on 11-29-2023 19:59:20 GMT -06:00
8

https://www.coursehero.com/file/27816965/252HW4Solnpdf/
Statistics 252 – Homework # 4 Solutions – Winter 2017
Model 1:
b
ANOVA

Sum of
Model Squares df Mean Square F Sig.
a
1 Regression 22642.199 5 4528.440 25.934 .000
Residual 9429.092 54 174.613
Total 32071.291 59
a Predictors: (Constant), panic, dolphin, mouse, panicdolphin, panicmouse
b Dependent Variable: IQ
a
Coefficients

Unstandardized Coefficients Standardized

Model B Std. Error Coefficients


Beta t Sig.

1 (Constant) 133.514 18.890 7.068 .000

panic -5.154 2.396 -.536 -2.151 .036

dolphin 1.381 20.848 .028 .066 .947

mouse .947 20.754 .019 .046 .964

panicdolphin 3.895 3.548 .275 1.098 .277

panicmouse 5.613 3.226 .468 1.740 .088

a. Dependent Variable: IQ

Model 2:
b
ANOVA

Sum of
Model Squares df Mean Square F Sig.
a
1 Regression 22101.844 3 7367.281 41.383 .000
Residual 9969.447 56 178.026
Total 32071.291 59
a Predictors: (Constant), panic, dolphin, mouse
b Dependent Variable: IQ
a
Coefficients

Unstandardized Coefficients Standardized

Model B Std. Error Coefficients


Beta t Sig.

1 (Constant) 107.710 11.165 9.647 .000

panic -1.841 1.381 -.191 -1.332 .188

dolphin 29.032 7.643 .592 3.798 .000

mouse 35.340 7.011 .721 5.040 .000

a. Dependent Variable: IQ

This study source was downloaded by 100000873991846 from CourseHero.com on 11-29-2023 19:59:20 GMT -06:00
9

https://www.coursehero.com/file/27816965/252HW4Solnpdf/
Powered by TCPDF (www.tcpdf.org)

You might also like