I'm was working on some exercises on statistical inference and came across a question I could not solve. After a while I decided to take a look at the solution to hopefully understand the problem better.
Situation: Let $X_{1} \dots X_{n}$ be independent and identically distributed random variables, each with the $N(\mu,\sigma^2)$ distribution. We have that $\mu \in\mathbb{R}$ is a known parameter and $\sigma^2$ is unknown. We consider $T=\frac{\sum^{n}_{i=i}(X_{i}-\bar{X})^{2}}{n-1}$ and can use the fact that $\frac{(n-1)}{\sigma^2} T\sim Gamma(\frac{n-1}{2},\frac{1}{2})$.
My problem: In the solution is the following line:
Since $T=cY$, where $c=\frac{\sigma^2}{n-1}$ and $Y\sim Gamma(\frac{n-1}{2},\frac{1}{2})$, using a change of variables yields that $f_{T}(x)=c^{-1}f_{Y}(x/c)$.
How does this change of variables work? How is it computed and why is it even necessary? Is it because the distribution of $T$ itself isn't explicitly given, but rather the distribution of $cT$? Any help is appreciated.
You can see this as a simple change of variable in an integral:
$$ P(T < t) = P(cY < t) = P(Y < \frac{t}{c}) =\int_{-\infty}^{\frac{t}{c}} f^Y(x)dx $$
define $ u = cx \Rightarrow " du = c dx" \iff dx "=" \frac{1}{c}du.$
This yields
$$ P(T< t) = \int_{-\infty}^{\frac{t}{c}} f^Y(x)dx = \int_{-\infty}^t \frac{1}{c} f^Y(u/c) du .$$
And $c^{-1}f^Y(xc^{-1})$ is a probability density function for $T$.