# Joint PDF of sample mean and variance

Assume $$Y$$ is a r.v. which follows a normal distribution with mean $$\mu$$ and variance $$\sigma^2$$. How could we find the probability density function of $$\overline{Y}$$ and $$\sum_{i=1}^n \frac{(Y_i-\overline{Y})^2}{\sigma^2}$$? I know that the sample mean follows a normal distribution and the sample variance follows a chi-square distribution and both are independent. Therefore we can just multiply the marginal density functions. But my question is, how could we get this from the joint density function of the n observations of $$Y$$? i.e. computing the integral.

Given the joint density $$f_Y (y_1, \dots, y_n)$$ you should be able to apply the Jacobian transformation method to find the joint density of $$Y_1, \dots Y_{n-2}, \bar{Y}, \frac{\sum (Y_i - \bar{Y})^2}{ \sigma^2}.$$
One can then find the joint density of just $$\bar{Y}, \frac{\sum (Y_i - \bar{Y})^2}{ \sigma^2}$$ by integrating this joint density over the supports of $$Y_1, \dots, Y_{n-2}$$.