[Math] Transformation of Random Variable $Y = -2\ln X$

density functionprobabilityrandom variables

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.

Best Answer

Let us explicitly write the definitions and stick to basic arguments. The distribution of a variable $X$ is a function $F$: $$F_X(x)=P(X\le x)$$ so for a uniform variable $X$ we have: $$ F_X(x)=\begin{cases} 0 & x\le 0 \\ x & 0\le x \le 1 \\ 1 & x\ge 1 \end{cases} $$

Then, for $Y=-2\ln X$ results: $$ F_Y(y)=P(Y\le y)= P(-2\ln X \le y)=P(X\ge e^{-\frac{y}{2}})=1-F_X(e^{-\frac{y}{2}}) $$ because the logarithm is monotone. Now, if $x\ge 1$, then $y=-2\ln x\le 0$, so: $$ F_Y(y)=\begin{cases} 0 & y\le 0 \\ 1-e^{-\frac{y}{2}} & y\ge 0 \end{cases} $$ This concludes that $Y$ follows an exponential distribution with no need to memorize "change of variables" formulas.

As for (2), once you know that each individual distribution is exponential, their sum is the Gamma distribution: https://stats.stackexchange.com/questions/17424/what-reference-can-i-cite-for-the-proof-that-the-sum-of-n-exponential-variables?rq=1

Related Question