STA4173: Biostatistics
Spring 2025
In the last lecture, we reviewed statistical inference on two independent means.
Today, we will focus on drawing conclusions about two dependent means.
Independent data
An individual selected for one sample does not dictate which individual is to be in a second sample.
In the data, there is not a way to link the individuals in the sample.
Dependent data
An individual selected to be in one sample is used to determine the individual in the second sample.
In the data, there is a way to link the individuals in the sample.
We are now interested in comparing two dependent groups.
We assume that the two groups come from the same population and are going to examine the difference,
d = y_{i, 1} - y_{i, 2}
\mathbf{(1-\boldsymbol\alpha)100\%} confidence interval for \mathbf{\boldsymbol\mu_d}
\bar{d} \pm t_{\alpha/2} \frac{s_d}{\sqrt{n}}
R
syntax:Construct the 95% confidence interval for the average difference between the two garages.
Remember the R
syntax:
Paired t-test
data: garage$g1 and garage$g2
t = 6.0234, df = 14, p-value = 3.126e-05
alternative hypothesis: true mean difference is not equal to 0
95 percent confidence interval:
0.3949412 0.8317254
sample estimates:
mean difference
0.6133333
The 95% CI for \mu_d, where d = x_{\text{I}} - x_{\text{II}} is (0.39, 0.83).
From the problem statement:
Can we say that estimates from garage I are higher than those from garage II?
Hypotheses
Test Statistic & p-Value
Rejection Region
Conclusion/Interpretation
[Reject or fail to reject] H_0.
There [is or is not] sufficient evidence to suggest [alternative hypothesis in words].
t.test()
function.Let’s now formally determine if garage I’s estimates are higher than garage II’s. Test at the \alpha=0.05 level.
Recall the data,
R
syntax:
Paired t-test
data: garage$g1 and garage$g2
t = 6.0234, df = 14, p-value = 1.563e-05
alternative hypothesis: true mean difference is greater than 0
95 percent confidence interval:
0.4339886 Inf
sample estimates:
mean difference
0.6133333
Hypotheses
Test Statistic and p-Value
Rejection Region
Conclusion/Interpretation