My question is about how to transform a Gamma distrbution in a Chi-squared one. I know that $X\sim\Gamma(\frac{\nu}{2},2$) is the same as $X\sim \chi^2 (\nu)$.
Thus, for example in a case in which I have an $X\sim\Gamma(n,\frac{1}{2\theta})$, how should I work to obtain the analogous Chi-squared distribution?
If $Y\sim \chi_{2n}^2,$ then $$X = \theta Y \sim \text{Gamma}\left(n, \frac{1}{2\theta}\right).$$
Or, if $Y\sim \text{Gamma}\left(n, \frac{1}{2\theta}\right)$, then $$X = \frac{1}{\theta}Y\sim \chi_{2n}^2.$$
Note: I take $X\sim \text{Gamma}(r,\lambda)$ to mean $$f_X(x) = \frac{1}{\Gamma(r)}\lambda^r x^{r-1}e^{-\lambda x}.$$