Interference of Two Means
Introduction
Comparative Analysis
Treatment Comparisons
Before and After Study
\(\bar{X_1}-\bar{X_2}\) as Estimator

Sampling Distribution of the Difference in Sample Means
If we are sampling from independent populations, then \[ X_1-X_2 \sim \text { Normal }\left(\mu_1-\mu_2, S E=\sqrt{\frac{\sigma_1^2}{n_1}+\frac{\sigma_2^2}{n_2}}\right) \]
This will be exact when we are sampling from a normal population (even for small sample sizes). This will be approximate for large ( \(n \geq 30\) ) samples from non-normal populations thanks to CLT.
Two-sample Z statistic
If we are sampling from independent populations, and doing inference on \(\mu_1-\mu_2=\delta\) then the two sample \(Z\)-statistic is given by: \[ Z=\frac{\bar{X}_1-\bar{X}_2-\delta}{\sqrt{\frac{\sigma_1^2}{n_1}+\frac{\sigma_2^2}{n_2}}} \] follows a standard normal distribution. This will be exact when we are sampling from a normal population (even for small sample sizes). This will be approximate for large ( \(n\) \(\geq 30)\) samples from non-normal populations thanks to CLT.
PROPOSITION
The expected value of \(\bar{X}-\bar{Y}\) is \(\mu_1-\mu_2\), so \(\bar{X}-\bar{Y}\) is an unbiased estimator of \(\mu_1-\mu_2\). The standard deviation of \(\bar{X}-\bar{Y}\) is \[ \sigma_{\bar{X}-\bar{Y}}=\sqrt{\frac{\sigma_1^2}{m}+\frac{\sigma_2^2}{n}} \]
Proof: Based on independents, easy to think of \(V(X-Y) = V(X)+V(Y)\)
Welch THEOREM
When the population distributions are both normal, the standardized variable \[ T=\frac{\bar{X}-\bar{Y}-\left(\mu_1-\mu_2\right)}{\sqrt{\frac{S_1^2}{m}+\frac{S_2^2}{n}}} \] has approximately a \(t\) distribution with df \(v\) estimated from the data by \[ v=\frac{\left(\frac{s_1^2}{m}+\frac{s_2^2}{n}\right)^2}{\frac{\left(s_1^2 / m\right)^2}{m-1}+\frac{\left(s_2^2 / n\right)^2}{n-1}}=\frac{\left[\left(s e_1\right)^2+\left(s e_2\right)^2\right]^2}{\frac{\left(s e_1\right)^4}{m-1}+\frac{\left(s e_2\right)^4}{n-1}} \] where \[ s e_1=\frac{s_1}{\sqrt{m}} \quad s e_2=\frac{s_2}{\sqrt{n}} \]
Unknown Variance
Follows a t distribution of course, this is for assuming equal variance and t \(\sim n_1+n_2-2\)in addition if unknown if equal variance:
Welch Procedure
Welch Procedure for the Difference of means for Independent Groups \(\left(\sigma_1^2 \neq \sigma_2^2\right)\) 1. \(H_0: \mu_1-\mu_2=\delta_0 \quad H_A: \begin{cases}\mu_1-\mu_2 \neq \delta_0 & \text { two-sided test } \\ \mu_1-\mu_2<\delta_0 & \text { one-sided (lower-tail) test } \\ \mu_1-\mu_2>\delta_0 & \text { one-sided (upper-tail) test }\end{cases}\)
2. Test Statistic: \(\quad T=\frac{\bar{X}_1-\bar{X}_2-\delta}{\sqrt{\frac{S_1^2}{n_1}+\frac{S_2^2}{n_2}}} \sim t_\nu\) where \(\nu=\frac{\left(\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2}\right)^2}{\frac{1}{n_1-1}\left(\frac{s_1^2}{n_1}\right)^2+\frac{1}{n_2-1}\left(\frac{s_2^2}{n_2}\right)^2}\) and \(s_1^2\) and \(s_2^2\) are the sample variances calculated using: \[ s_1^2=\frac{\sum_{i=1}^{n_1}\left(x_{1 i}-\bar{x}_1\right)^2}{n_1-1} \quad s_2^2=\frac{\sum_{i=1}^{n_2}\left(x_{2 i}-\bar{x}_2\right)^2}{n_2-1} \]
Pooled t-test for the Difference of means for Independent Groups \(\left(\sigma_1^2=\sigma_2^2\right)\)
\(H_0: \mu_1-\mu_2=\delta_0 \quad H_A: \begin{cases}\mu_1-\mu_2 \neq \delta_0 & \text { two-sided test } \\ \mu_1-\mu_2<\delta_0 & \text { one-sided (lower-tail) test } \\ \mu_1-\mu_2>\delta_0 & \text { one-sided (upper-tail) test }\end{cases}\) 2. Test Statistic: \(\quad T=\frac{\bar{X}_1-\bar{X}_2-\delta}{s_p \sqrt{\frac{1}{n_1}+\frac{1}{n_2}}} \sim t_\nu\) where \(\nu=n_1+n_2-2\) where \(s_p\) is the square-root of the pooled variance: \[ s_p^2=\frac{\left(n_1-1\right) s_1^2+\left(n_2-1\right) s_2^2}{n_1+n_2-2} \]
Examples:
chicken beans:
soy meal: \(\bar{x_1}= 246.43, s_1 =54.13, n_1=14\)
meat meal: \(\bar{x_2}=276.91,s_2=64.9, n_2=11\)