Question 1

In a population of interest, a sample of 9 men yielded a sample average brain volume of 1,100cc and a standard deviation of 30cc.
What is a 95% Student’s T confidence interval for the mean brain volume in this new population?

n <- 9  
mean <- 1100  
S <- 30  
q <-0.975  # with 2.5% on both sides of the range  
CI = mean +c(-1, 1)* qt(q, df = n-1)* S/sqrt(n)

Confidence Interval(CI) is 1076.94, 1123.06

Question 2

A diet pill is given to 9 subjects over six weeks. The average difference in weight (follow up - baseline) is -2 pounds.
What would the standard deviation of the difference in weight have to be for the upper endpoint of the 95% T confidence interval to touch 0?

Answer

Upper Confidence Interval is \(CI_{up} = \bar X + t_{n-1} S / \sqrt{n}\),
where \(t_{n-1}\) is the relevant quantile (=0.975).

Rewritten the above to get standard deviation: \(S = \frac{CI_{up} - \bar X * \sqrt{n}}{t_{n-1}}\)

n = 9  
X = -2
q = 0.975
CI_up = 0
S = (CI_up - X * sqrt(n))/qt(q, df = n-1) 

The standard deviation (S) when the upper interval touch 0 is 2.602.

Question 3

In an effort to improve running performance, 5 runners were either given a protein supplement or placebo. Then, after a suitable washout period, they were given the opposite treatment. Their mile times were recorded under both the treatment and placebo, yielding 10 measurements with 2 per subject. The researchers intend to use a T test and interval to investigate the treatment.
Should they use a paired or independent group T test and interval?

A. A paired interval
B. You could use either
C. It’s necessary to use both
D. Independent groups, since all subjects were seen under both systems

Question 4

In a study of emergency room waiting times, investigators consider a new and the standard triage systems. To test the systems, administrators selected 20 nights and randomly assigned the new triage system to be used on 10 nights and the standard system on the remaining 10 nights. They calculated the nightly median waiting time (MWT) to see a physician. The average MWT for the new system was 3 hours with a variance of 0.60 while the average MWT for the old system was 5 hours with a variance of 0.68. Consider the 95% confidence interval estimate for the differences of the mean MWT associated with the new system.
Assume a constant variance.
What is the interval? Subtract in this order (New System - Old System).

Answer

Independent group T intervals

A \((1 - a) \times 100%\) confidence interval for \(μ_y - μ_x\) is \[ \bar Y - \bar X \pm t_{n_x + n_y - 2, 1 - α/2} S_p\left(\frac{1}{n_x} + \frac{1}{n_y}\right)^{1/2} \]
The code is given as follows:

old_n <- 10
new_n <- 10
old_Avg <- 5
new_Avg <- 3
old_Var <- 0.68
new_Var <- 0.60
alpha <- (1 - .95)
t <- qt(1 - alpha / 2, old_n + new_n - 2)
sp <- sqrt(((old_n - 1) * old_Var + (new_n - 1) * new_Var) / (old_n + new_n - 2))
CI = (new_Avg - old_Avg) + c(-1, 1) * t * sp * sqrt(1 / old_n + 1 / new_n)

The confidence interval (CI) is -2.752, -1.248

Question 5

Suppose that you create a 95% T confidence interval. You then create a 90% interval using the same data.
What can be said about the 90% interval with respect to the 95% interval?

A. The interval will be the same width, but shifted.
B. The interval will be narrower.
C. The interval will be wider
D. It is impossible to tell.

Question 6

To further test the hospital triage system, administrators selected 200 nights and randomly assigned a new triage system to be used on 100 nights and a standard system on the remaining 100 nights. They calculated the nightly median waiting time (MWT) to see a physician. The average MWT for the new system was 4 hours with a standard deviation of 0.5 hours while the average MWT for the old system was 6 hours with a standard deviation of 2 hours. Consider the hypothesis of a decrease in the mean MWT associated with the new treatment.
What does the 95% independent group confidence interval with unequal variances suggest vis a vis this hypothesis?(Because there’s so many observations per group, just use the Z quantile instead of the T.)
A. When subtracting (old - new) the interval is entirely above zero. The new system does not appear to be effective.
B. When subtracting (old - new) the interval contains 0. There is not evidence suggesting that the new system is effective.
C. When subtracting (old - new) the interval is entirely above zero. The new system appears to be effective.
D. When subtracting (old - new) the interval contains 0. The new system appears to be effective.

Answer
old_Avg <- 6
new_Avg <- 4

old_sd <- 2
new_sd <- 0.5

old_n <- 100
new_n <- 100

q = 0.975

pooled_sd <- sqrt(((old_n - 1) * old_sd^2 + (new_n - 1) * new_sd^2)/(old_n + new_n - 2))
CI = old_Avg - new_Avg + c(-1, 1) * qnorm(q) * pooled_sd * sqrt(1 / old_n + 1 / new_n)

The value of confidence interval is 1.596, 2.404. Its interval is entirely above 0. Hence,the new system appears to be effective.

Question 7

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 over the four week period appear to differ between the treated and placebo groups?
Assuming normality of the underlying data and a common population variance, calculate the relevant 90% t confidence interval.
Subtract in the order of (Treated - Placebo) with the smaller (more negative) number first.

Answer
q = 0.9
treat_n = 9
treat_Avg = -3
treat_sd = 1.5

placebo_n = 9
placebo_Avg = 1
placebo_sd = 1.8

alpha = 1 - q 

t = qt(1 - alpha / 2, treat_n + placebo_n - 2)
P_Var = ((treat_n - 1) * treat_sd^2 + (placebo_n - 1) * placebo_sd^2) / (treat_n + placebo_n - 2)
sp = sqrt(P_Var)
CI = (treat_Avg - placebo_Avg) + c(-1, 1) * t * sp * sqrt(1 / treat_n + 1 / placebo_n)

The t confidence interval is -5.36, -2.64.

\[ ==============================Asse================================ \]