Two Means
(Paired Samples)
Type of Plot:
Histogram
qplot(x = differences,
data = dataframe,
geom = "histogram",
color = I("white"))
Parameter: μdiff
Point Estimate: ˉXdiff
Hypothesis Test
Hypotheses:
\( H_0: \mu_{diff} = \mu_0 = 0 \)
1) \( H_a: \mu_{diff} < 0 \)
2) \( H_a: \mu_{diff} \ne 0 \)
3) \( H_a: \mu_{diff} > 0 \)
Test Statistic Random Variable (Assuming \(H_0\) is true):
\( T =\dfrac{ \bar{X}_{diff} - \mu_0}{ S_{diff} \big/ \sqrt{n} } \sim t (df = n - 1) \)
Observed Test Statistic:
\( t_{obs} = \dfrac{\bar{x}_{diff, obs} - \mu_0}{s_{diff, obs} \, \big/ \, \sqrt{n} } \)
\( \mathbf{\textit{P}}\)-value:
1) \( \mathbb{P}(\bar{X}_{diff} \le \bar{x}_{diff, obs}) = \mathbb{P}(T \le t_{obs}) \)
2) \( 2 \cdot \mathbb{P}(\bar{X}_{diff} \ge \bar{x}_{diff, obs}) = \mathbb{P}\left(\big| T \big| \ge \big| t_{obs} \big| \right) \)
3) \( \mathbb{P}(\bar{X}_{diff} \ge \bar{x}_{diff, obs}) = \mathbb{P}(T \ge t_{obs}) \)
Conditions for Distributional Approximation (To \( T\)):
- Independent observations among pairs
- Nearly normal population of differences
OR
large number of pairs ( \( n \ge 30 \) )
Confidence Interval
Formula for CI:
\( \bar{x}_{diff, obs} \pm t^*_{df} \cdot \dfrac{s_{diff, obs}}{\sqrt{n} } \)
Conditions for Distributional Approximation (To \( T\)):
- Independent observations among pairs
- Nearly normal population of differences
OR
large number of pairs ( \( n \ge 30 \) )