I'm learning probability, specifically transformations of random variables, and need help with the following exercise:
If the random variable $X$ follows the uniform distribution $U(0, 1)$, find :
$(1)$ The distribution of the random variable $Y = -2 \ln X$;
$(2)$ If the random variables $X_1, X_2, \ldots , X_n$ are independent and follow the uniform distribution $U(0, 1)$, find the distribution of the random variable $Z = \sum_{i=1}^n Y_i$.
Since I'm having difficulties for $(2)$, I'm going to share my work for $(1)$.
$(1)$ First, we note that the function $Y = -2 \ln X$ defined over the interval $0 < x < 1$ is an invertible (decreasing monotonic) function. Taking the exponential on both sides, it is easy to show that the inverse function is
$$x = v(y) = e^{-y/2}.$$
$(Q1)$ What is the range of the above inverse function? When $x = 0$, $y$ is undefined and when $x = 1, y = 0$. So what should I say for $a < y < b$?
Now, taking the derivative of $v(y)$, we get $$v'(y) = -\frac{1}{2}e^{-y/2}.$$
Therefore, by the change-of-variable technique we find the probability distribution function of $Y$ to be
$$f_Y(y) = f_x(v(y)) \times |v'(y)| = \frac{1}{2}e^{-y/2}.$$
This looks to me like the exponential distribution with parameter $\lambda = \frac{1}{2}$ so I'm going to say that the random variable $Y$ follows the exponential distribution with parameter $\lambda = \frac{1}{2}$, i.e. $Y \sim Exp(\lambda = \frac{1}{2})$. But again, what is the support of $y$?
Is my work correct for $(1)$? Can someone help me with the $(Q1)$ that I'm having? For $(2)$ I have absolutely no idea how to solve it. Any help is appreciated, including the theory needed to solve it.
Your work for $(1)$ is correct. For $(2)$ we use the moment generating function method.
Recall that if $X_1, X_2, \ldots, X_n$ are observations of a random sample from a population (distribution) with moment generating function $M(t)$, then the moment generating function (M.G.F.) of a linear combination $Y = \sum_{i = 1}^{n} X_i$ is
$$M_Y(t) = \prod_{i = 1}^{n} M(t) = [M(t)]^n.$$
From $(1)$ you've found that the random variables $Y_1, Y_2, \ldots, Y_n$ follow the exponential distribution with parameter $\lambda = 1/2$. To find the distribution of the random variable $Z = \sum_{i = 1}^{n} Y_i$ we use the M.G.F. method described above. One has
$$M_Z(t) = \prod_{i = 1}^{n} M_{Y_i}(t) = [M_{Y_1}(t)]^n \tag{A}$$
where $$M_{Y_1}(t) = \frac{\lambda}{\lambda - t} = \frac{1}{\frac{\lambda - t}{\lambda}} = \frac{1}{1 - \frac{t}{\lambda}} = \big(1 - \frac{t}{\lambda}\big)^{-1} \tag{B}$$
Substituing $(B)$ into $(A)$ yields
$$M_Z(t) = \big[\big(1 - \frac{t}{\lambda}\big)^{-1}\big]^n = \big(1 - \frac{t}{\lambda}\big)^{-n} = \big(1 - \frac{t}{1/2}\big)^{-n} \tag{C}$$
Does $(C)$ look familiar to you? Recall that the moment generator of the Gamma distribution is given by
$$M(t) = \big(1 - \frac{t}{\beta}\big)^{-\alpha}, \, \, t < \alpha.$$
Therefore the random variable $Z$ follows the Gamma distribution with parameters $\alpha = n$ and $b = \frac{1}{2}$. We usually write $Z \sim G(\alpha = n, \beta = 1/2)$.