I was looking through wiki's treatment on the title topic in https://en.wikipedia.org/wiki/Random_variable and am completely stumped on this particular section:
There are several specifics that elude me.
- How is the following progression derived
$$Y = \log(1 + e^{-X}) \Longrightarrow F_Y(y) = \Pr( \log(1+e^{-X}) \le y )$$
and then the next step
$$\Pr( \log(1+e^{-X}) \le y) = \Pr( X \ge -\log(e^y – 1) )$$
Thx for filling in the blanks.
Best Answer
Introduction. The so-called "CDF method" is one way to find the distribution of a the transformation $Y = g(X)$ of a random variable $X$ with a known CDF. Let's look at a simpler example first: Suppose $X \sim \mathsf{Univ}(0,1)$ and find the CDF of $Y = g(X) = \sqrt{X}.$ The support of $X$ is $(0,1)$ and it is clear that the support of $Y$ will also be $(0,1).$
The CDF of $X$ is $F_X(x) = x,$ for $x \in (0,1).$ Then the CDF of $Y$ is $$P(Y \le y) = P(g(X) \le y) = P(\sqrt{X} \le y) = P(X \le y^2) = y^2,$$ for $y \in (0,1).$ The last step uses $F_X(x) = P(X \le x) = x,$ where $y^2 = x.$ Thus the PDF of $Y$ is $f_Y(y) = F_Y^\prime(y) = dy^2/dy = 2y,$ which we recognize as the PDF of $\mathsf{Beta}(2,1).$
Illustrating this with a random sample of $n = 10^5$ observations $X_i$ from $\mathsf{Unif}(0,1),$ we have the following results (in R):
Your Question. Now let's do a similar procedure for $X$ with CDF $F_X(x) = P(X \le x) = (1 + e^{-x})^{-\theta},$ for $\theta > 0$ and the transformation $Y = g(X) = \log(1+e^{-X}),$ which has support $(0, \infty).$
Using the CDF method again, we have:
$$F_Y(y) = P(Y\le y) = P(\log(1 + e^{-X})\le y) = P(1+e^{-X} \le e^y)\\ =P(e^{-X} \le e^y - 1) = P(-X \le \log(e^y -1))\\ = P(X \ge -\log(e^y -1)) = \cdots,$$
So, $F_y(y) = 1-e^{-\theta y},$ for $y > 0,$ as claimed.
We illustrate with a random sample of $n = 10^5$ observations from the original logistic distribution with $\theta = 1.$ This distribution can be sampled in terms of standard uniform distributions as shown in the R code; see Wikipedia, second bullet under Related Distributions.