# Why is the normal r.v. and chi square r.v in the Student t-test independent?

When testing for a difference in the means of two independent normal samples with assumed equal variance $$\sigma^2$$, we use the statistic $$T=\frac{\overline{X_1}-\overline{X_2}}{S_p \sqrt{\frac{1}{n_1}+\frac{1}{n_2}}}$$, which can equivalently be expressed as $$\frac{\left(\frac{\overline{X_1}-\overline{X_2}}{\sigma\sqrt{\frac{1}{n_1}+\frac{1}{n_2}}} \right)}{\sqrt{\frac{(n_1-1)S_1^2+(n_2-1)S_2^2}{\sigma^2(n_1+n_2-2)}}}$$, where $$S_1,S_2$$ represent the sample standard deviations of the two samples, and $$n_1, n_2$$ represent the sample sizes.

I've been reading proofs as to why T follows a t-distribution, and they all use the fact that $$\frac{Z}{\sqrt \frac{\chi^2_n}{n}} \sim t_n$$, given that $$Z$$ and $$\chi^2_n$$ are independent, where Z is a standard normal distribution. I can see why Z=$$\left(\frac{\overline{X_1}-\overline{X_2}}{\sigma\sqrt{\frac{1}{n_1}+\frac{1}{n_2}}} \right)$$ follows a standard normal distribution, and why $$Y^2 = \frac{(n_1-1)S_1^2+(n_2-1)S_2^2}{\sigma^2}$$ follows a chi square distribution with $$n_1+n_2-2$$ degrees of freedom. But, I've never seen an argument that shows why $$Z$$ and $$Y^2$$ are independent.

If someone could either post the proof here, or redirect me to some source with the proof, it would be greatly appreciated.

$$\bar{X_1}$$ and $$S^2_1$$ are independent. $$\bar{X_2}$$ and $$S^2_2$$ are independent. This independence of $$\bar{X}$$ and $$S^2$$ is true because of normality condition. proof-of-the-independence-of-the-sample-mean-and-sample-variance .

Two samples are independent.

If $$X$$ and $$Y$$ are independent so any (measurable) function of them ( $$g(X)$$ and $$g(Y)$$)are independent. if-x-and-y-are-independent-then-fx-and-gy-are-also-independent. So

$$P(\bar{X_1}\in A , \bar{X_2}\in B ,S^2_1 \in C,S^2_2 \in D) =P(\bar{X_1}\in A,S^2_1 \in C)*P(\bar{X_2}\in B,S^2_2\in D)$$ since Two samples are independent , so any function of them are independent. $$=P(\bar{X_1}\in A) P(S^2_1 \in C)P(\bar{X_2}\in B)P(S^2_2\in D)$$ Since $$\bar{X}$$ and $$S^2$$ are independent.

You can see it clearly by $$P(\bar{X_1}\in A , \bar{X_2}\in B ,S^2_1 \in C,S^2_2 \in D) =P(\bar{X_1}\in A) P(S^2_1 \in C)P(\bar{X_2}\in B)P(S^2_2\in D) =P(\bar{X_1}\in A,\bar{X_2}\in B)*P(S^2_1 \in C, S^2_2\in D)$$

so $$(\bar{X_1},\bar{X_2})$$ and $$(S^2_1 , S^2_2)$$ are independent so any function of them($$\bar{X_1}-\bar{X_2}$$ and $$g(S^2_1 , S^2_2)$$) are independent.

• Yep I was already aware of this fact - however as far as I know the following statement isn't necessarily true: "if X, Y, Z, W are independent, then X-Y is independent of any weighted sum of Z and W". Unless you are saying that it does hold true specifically in the case of normal random variables? – user767761 Apr 7 '20 at 10:48
• $(\bar{X_1},\bar{X_2})$ and $(S^2_1 , S^2_2)$ are independent so any function of them($\bar{X_1}-\bar{X_2}$ and $g(S^2_1 , S^2_2)$) are independent. – Masoud Apr 7 '20 at 11:14