You are on page 1of 5

 

BIOS576A  Biostatistics  in  Public  Health  

Week  6  Homework  Answer  Key  

1.   The drug erythromycin has been proposed to possibly lower the risk of premature delivery. A related area of interest is its association
with the incidence of side effects during pregnancy. Assume 30% of all pregnant women complain of nausea between weeks 24 and
28 of pregnancy. Furthermore, suppose that of 200 women who are taking erythromycin regularly during the period, 110 complain of
nausea. Test the hypothesis that the incidence rate of nausea for the erythromycin group is the same for a typical pregnant woman.
Answer key:
H0: p=0.30 vs. H1: p≠0.30
p.hat=110/200=0.55
200*0.3*0.7=42>5 so use normal approximation
Z=(0.55-0.3)/sqrt(0.3*0.7/200)=7.72>1.96èp-value<0.001
So reject the null hypothesis and conclude the incidence rate of nausea for the erythromycin group is significantly higher than 30% at
a significance level of 5%.

2.   The mean serum-creatinine level measured in 12 patients 24 hours after they received a newly proposed antibiotic was 1.2 mg/dL.
a.   If the mean and standard deviation of serum creatinine in the general population are 1.0 and 0.4 mg/dL, respectively, then,
using a significance level of .05, test whether the mean serum-creatinine level in this group is different from that of the general
population.
Answer Key:
Assume the serum-creatinine level follows a normal distribution. The population standard deviation is known so use a z test.
Z=(1.2-1.0)/(0.4/sqrt(12))=1.73<1.96 so fail to reject the null.
Conclude: At a significance level of 5%, there is no evidence indicating the mean serum-creatinine level in this group is
different from that of the general population.
b.   What is the p-value for the test?
Answer Key:
p-value=8.4%>5%.

  Page  1  of  5  
 
c.   Suppose the sample standard deviation of serum creatinine in (a) is 0.6 mg/dL. Assume that the standard deviation of serum
creatinine is not known, and perform the hypothesis test (a). Report a p-value.
Answer Key:
The population standard deviation is unknown so use a t test with a df of 11.
t=(1.2-1.0)/(0.6/sqrt(12))=1.15
p-value=0.27>5% so fail to reject the null.
Conclude: At a significance level of 5%, there is no evidence indicating the mean serum-creatinine level in this group is
different from that of the general population.
d.   Compute a two-sided 95% CI for the true mean serum-creatinine level in Problem (c).
Answer Key:
t(0.975,11)=2.20
95% CI: 1.2±2.20*0.6/sqrt(12)è(0.82, 1.58)
e.   How does your answer to (d) relate to your answer to (c)?
Answer Key:
The 95% CI in (d) doesn’t cover 1.0 so reject the null and reach the same conclusion as (c).

3.   Iron-deficiency anemia is an important nutritional health problem in the United States. A dietary assessment was performed on 51
boys 9 to 11 years of age whose families were below the poverty level. The mean daily iron intake among these boys was found to be
12.50 mg with standard deviation 4.75 mg. Suppose the mean daily iron intake among a large population of 9- to 11-year-old boys
from all income strata is 14.44 mg. We want to test whether the mean iron intake among the low-income group is different from that
of the general population.
a.   State the hypotheses that we can use to consider this question.
Answer key:
H0: µ=14.44 vs. H1: µ≠14.44

b.   Carry out the hypothesis test in (a) using the critical-value method with a significance level of .05, and summarize your
findings.
Answer key:
use t distribution with a degree of freedom 50 (=51-1) since the population variance is unknown.
t50,0.025=-2.009
t=(12.50-14.44)/[4.75/sqrt(51)]=-2.92<-2.009 è so reject the null and conclude at a significance level of 5%, the mean iron
intake among the low-income group is significantly different from that of the general population.

  Page  2  of  5  
 

c.   What is the p-value for the test conducted in (b)?


Answer key:
p-value=0.0052

d.   The standard deviation of daily iron intake in the larger population of 9- to 11-year-old boys was 5.56 mg. We want to test
whether the standard deviation from the low-income group is comparable to that of the general population. State the
hypotheses that we can use to answer this question.
Answer key:
H0: σ2 =5.562 vs. H1: σ2≠5.562

e.   Carry out the test in (d) and report the p-value with an α level of .05, and summarize your findings.
Answer key:
use χ2 test with df=50
(51-1)*4.752/5.562=36.49
p-value=0.16>5% so fail to reject the null hypothesis and conclude at a significance level of 5% the standard deviation from
the low-income group is comparable to that of the general population.

4.   Use the Data Set BONEDEN.DAT on the Companion Website to perform a hypothesis test to assess whether there are significant
differences in mean BMD for the femoral neck between the heavier- and lighter-smoking twins by Stata.
Answer Key:
Need to derive the difference in BMD for the femoral neck between the heavier and lighter smoking twins first.
One-sample t test
------------------------------------------------------------------------------
Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------+--------------------------------------------------------------------
diffn | 41 .0007317 .0145434 .0931233 -.0286616 .0301251
------------------------------------------------------------------------------
mean = mean(diffn) t = 0.0503
Ho: mean = 0 degrees of freedom = 40

Ha: mean < 0 Ha: mean != 0 Ha: mean > 0


Pr(T < t) = 0.5199 Pr(|T| > |t|) = 0.9601 Pr(T > t) = 0.4801

  Page  3  of  5  
 
The two sided p-value is >5% so fail to reject the null and indicates at a significance level of 5%, there is no evidence indicating there
are significant differences in mean BMD for the femoral neck between the heavier- and lighter-smoking twins.

Stata Code:
gen diffn=fn1-fn2
ttest diffn=0

5.   Use Stata to perform hypothesis-testing methods to assess whether either treatment affects blood pressure or heart rate in patients with
severe angina based on NIFED.DAT dataset.
Hint: need to first calculate the difference in blood pressure and heart rate between baseline and “Lv1” and then perform hypothesis
testing.
Answer key:
Interest is to test the effect of each treatment on heart beat rates. To do that we need to generate variables that can hold the values of
difference in heart rate and blood pressure before and after each treatment (the active treatment and the placebo).

Stata output
. ttest HDif=0 if trtgrp=="N"
One-sample t test
Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
HDif 18 6.111111 2.513869 10.66544 .807312 11.41491

mean = mean(HDif) t = 2.4310


Ho: mean = 0 degrees of freedom = 17

Ha: mean < 0 Ha: mean != 0 Ha: mean > 0


Pr(T < t) = 0.9868 Pr(T > t) = 0.0264 Pr(T > t) = 0.0132

. ttest HDif=0 if trtgrp=="P"


One-sample t test
Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
HDif 16 2.875 2.36445 9.457801 -2.164706 7.914706

mean = mean(HDif) t = 1.2159


Ho: mean = 0 degrees of freedom = 15

Ha: mean < 0 Ha: mean != 0 Ha: mean > 0


Pr(T < t) = 0.8786 Pr(T > t) = 0.2428 Pr(T > t) = 0.1214

  Page  4  of  5  
 
. ttest SDif=0 if trtgrp=="N"
One-sample t test
Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
SDif 18 -7.944444 4.406229 18.69405 -17.24077 1.351885

mean = mean(SDif) t = -1.8030


Ho: mean = 0 degrees of freedom = 17

Ha: mean < 0 Ha: mean != 0 Ha: mean > 0


Pr(T < t) = 0.0446 Pr(T > t) = 0.0891 Pr(T > t) = 0.9554

. ttest SDif=0 if trtgrp=="P"


One-sample t test
Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]

SDif 15 -8.933333 6.869856 26.60684 -23.66771 5.801042

mean = mean(SDif) t = -1.3004


Ho: mean = 0 degrees of freedom = 14

Ha: mean < 0 Ha: mean != 0 Ha: mean > 0


Pr(T < t) = 0.1072 Pr(T > t) = 0.2145 Pr(T > t) = 0.8928

Only 1 of the four 95% CIs doesn’t cover 0 so we conclude the treatment has some effect in raising heart rate at a significance level of
5%.

Stata code:
generate HDif = lv1hrtrt -bashrtrt if bashrtrt ~= 999 & lv1hrtrt != 999
generate SDif = lv1sys -bassys if bassys ~= 999 & lv1hrtrt != 999
ttest HDif=0 if trtgrp=="N"
ttest HDif=0 if trtgrp=="P"
ttest SDif=0 if trtgrp=="N"
ttest SDif=0 if trtgrp=="P"
 

  Page  5  of  5  

You might also like