Question 1

A pharmaceutical company is interested in testing a potential blood pressure lowering medication. Their first examination considers only subjects that received the medication at baseline then two weeks later. The data are as follows (SBP in mmHg)

Subject Baseline Week_2
1 140 132
2 138 135
3 150 151
4 148 146
5 135 130

Consider testing the hypothesis that there was a mean reduction in blood pressure? Give the P-value for the associated two sided T test.
(Hint,consider that the observations arre paired.)
A. 0.10
B. 0.087
C. 0.043
D. 0.05

Answer

Subject<- c(1, 2, 3, 4, 5)
Baseline<- c(140, 138, 150, 148, 135)
Week_2 <- c(132, 135, 151, 146, 130)
SBP_Data<- data.frame(Subject,Baseline, Week_2)

t_test<- t.test(SBP_Data$Baseline, SBP_Data$Week_2, alternative = "two.sided", paired = TRUE)
p_value<- t_test$p.value

The p-value is 0.087

Question 2

A sample of 9 men yielded a sample average brain volume of 1,100cc and a standard deviation of 30cc. What is the complete set of values of \(\mu_0\) that a test of \(H_0: \mu = \mu_0\) would fail to reject the null hypothesis in a two sided 5% Students t-test?
A. 1077 to 1123
B. 1081 to 1119
C. 1031 to 1169
D. 1080 to 1120

Answer

n <- 9
mean<- 1100
sd <- 30
q = 0.975 
CI = mean + c(-1, 1) * qt(q, df=n-1) * sd / sqrt(n)  

The t confidence interval (CI) is 1077, 1123

Question 3

Researchers conducted a blind taste test of Coke versus Pepsi. Each of four people was asked which of two blinded drinks given in random order that they preferred. The data was such that 3 of the 4 people chose Coke. Assuming that this sample is representative, report a P-value for a test of the hypothesis that Coke is preferred to Pepsi using a one sided exact test.
A. 0.005
B. 0.62
C. 0.10
D. 0.31

Answer

n = 4  
n_coke = 3  
test = binom.test(n_coke, n, alternative = "greater")

The p-value for a test of the hypothesis that Coke is preferred to Pepsi using a one-sided exact test is 0.31.

Question 4

Infection rates at a hospital above 1 infection per 100 person days at risk are believed to be too high and are used as a benchmark. A hospital that had previously been above the benchmark recently had 10 infections over the last 1,787 person days at risk. About what is the one sided P-value for the relevant test of whether the hospital is below the standard?
A. 0.03
B. 0.52
C. 0.22
D. 0.11

Answer

n = 10 # infections over the last 1,787 person days
lambda = 0.01 # 1 infection per 100 person days
t = 1787
pvalue<- ppois(n,lambda*t)

The one-sided P-value for the relevant test of whether the hospital is “below” the standard is 0.03.

Question 5

Suppose that 18 obese subjects were randomized, 9 each, to a new diet pill and a placebo. Subjects’ body mass indices (BMIs) were measured at a baseline and again after having received the treatment or placebo for four weeks. The average difference from follow-up to the baseline (followup - baseline) was −3 kg/m2 for the treated group and 1 kg/m2 for the placebo group. The corresponding standard deviations of the differences was 1.5 kg/m2 for the treatment group and 1.8 kg/m2 for the placebo group. Does the change in BMI appear to differ between the treated and placebo groups? Assuming normality of the underlying data and a common population variance, give a pvalue for a two sided t test.
A. Less than 0.10 but larger than 0.05
B. Larger than 0.10
C. Less than 0.01
D. Less than 0.05, but larger than 0.01

Answer

t_n = 9 # number of subjects for treated group
p_n = 9 # number of subjects for placebo group
t_sd = 1.5 # standard deviation for the treated group
p_sd = 1.8 # standard deviation for the placebo group
t_mean = -3 # the average difference from follow-up to the baseline for the treated group
p_mean = 1 #  the average difference from follow-up to the baseline for the placebo  group
df =t_n+p_n-2 
diff_mean = t_mean - p_mean
pooled.var = ((t_n-1)*t_sd^2 +(p_n-1)*p_sd^2)/df
pooled.sd = sqrt(pooled.var)
t = diff_mean/(pooled.sd*sqrt(1/t_n + 1/p_n))
p_value = 2*pt(t, df = df) # its two tailed

The p-value is 1.02510^{-4}, which is less than 0.01

Question 6

Brain volumes for 9 men yielded a 90% confidence interval of 1,077 cc to 1,123 cc. Would you reject in a two sided 5% hypothesis test of \(H_0 : \mu = 1,078\)?
A. No you wouldn’t reject.
B. Yes you would reject.
C. It’s impossible to tell.
D. Where does Brian come up with these questions?

Answer
The 95% confidence interval contains 90% confidence interval. \(\mu = 1,078\) falls within 90% confidence interval and hence we don’t reject \(H_0\).

Question 7

Researchers would like to conduct a study of \(100\) healthy adults to detect a four year mean brain volume loss of \(.01~mm^3\). Assume that the standard deviation of four year volume loss in this population is \(.04~mm^3\). About what would be the power of the study for a \(5\%\) one sided test versus a null hypothesis of no volume loss?
A. 0.50
B. 0.60
C. 0.70
D. 0.80

Answer

n = 100
mu = .01
sd = .04
power<- power.t.test(n, delta = mu, sd = sd, type = "one.sample", alt = "one.sided")$power

The power of the study for a \(5\%\) one sided test versus a null hypothesis of no volume loss is 0.799.

Question 8

Researchers would like to conduct a study of \(n\) healthy adults to detect a four year mean brain volume loss of \(.01~mm^3\). Assume that the standard deviation of four year volume loss in this population is \(.04~mm^3\). About what would be the value of \(n\) needed for \(90\%\) power of type one error rate of \(5\%\) one sided test versus a null hypothesis of no volume loss?
A. 160
B. 120
C. 180
D. 140

Answer

mu = .01
sd = .04
power = .9
n<- power.t.test(power = power, delta = mu, sd = sd, type = "one.sample", alt = "one.sided")$n  

Hence, the value of n = 140.

Question 9

As you increase the type one error rate, \(\alpha\), what happens to power?
A. No, for real, where does Brian come up with these problems?
B. You will get larger power.
C. You will get smaller power.
D. It’s impossible to tell given the information in the problem.

\[=====================Assefa=================================\]