(Proof of the independence of $\overline{\mathrm{X}}$ and $\mathrm{S}^{2}$ for $\mathrm{n}=2$ ) If $X_{1}$ and $X_{2}$ are independent random variables having the standard normal distribution, show that
(a) the joint density of $X_{1}$ and $\bar{X}$ is given by
$$
f\left(x_{1}, \bar{x}\right)=\frac{1}{\pi} \cdot e^{-x^{-2}} e^{-\left(x_{1}-\bar{x}\right)^{2}}
$$
for $-\infty<x_{1}<\infty$ and $-\infty<\bar{x}<\infty$;
(b) the joint density of $U=\left|X_{1}-\bar{X}\right|$ and $\bar{X}$ is given by
$$
g(u, \bar{x})=\frac{2}{\pi} \cdot e^{-\left(\bar{x}^{2}+u^{2}\right)}
$$
for $u>0$ and $-\infty<\bar{x}<\infty$, since $f\left(x_{1}, \bar{x}\right)$ is symmetrical about $\bar{x}$ for fixed $\bar{x}$
(c) $S^{2}=2\left(X_{1}-\bar{X}\right)^{2}=2 U^{2}$
(d) the joint density of $\bar{X}$ and $S^{2}$ is given by
$$
h\left(s^{2}, \bar{x}\right)=\frac{1}{\sqrt{\pi}} e^{-\vec{x}^{2}} \cdot \frac{1}{\sqrt{2 \pi}}\left(s^{2}\right)^{-\frac{1}{2}} e^{-\frac{1}{2} s^{2}}
$$
for $s^{2}>0$ and $-\infty<\bar{x}<\infty$, demonstrating that $\bar{X}$ and $S^{2}$ are independent.