I have the following question. I would like to get some feedback regarding my approach.
Let $U$ be random variable such that $U\sim \text{Unif}\left((0,1)\right)$. Define the following r.v: $$Z_1=\begin{cases}\ln(2U),& 0
My try:
First compute the CDFs of $Z_1,Z_2$ and then derive the results in order to get the PDFs.
For $Z_1$ we split into cases:
- For $0
- For $\dfrac{1}{2}0$): \begin{align*}F_{Z_1}(z)&=P(Z_1\le z)=P\left(-\ln(2(1-U))\le z\right)\\&=P\left(\frac{1}{2(1-U)}\le\exp(z)\right)=P\left(U\le 1-\frac{1}{2}\exp(z)\right)\end{align*}
Thus, $F_{Z_1}(z_1)=\begin{cases} \dfrac{1}{2}\exp(z),&z\le 0 \\ 1-\dfrac{1}{2}\exp(-z),&z>0\end{cases}\implies \boxed{f_{Z_1}(z_1)=\begin{cases}\dfrac{1}{2}\exp(z),&z\le 0 \\ \dfrac{1}{2}\exp(-z),&z>0\end{cases}}$
For $Z_2$ we first notice that $Z_2>0$, i.e $\forall z_2\le 0: f_{Z_2}(z_2)=0$. Now, \begin{align}F_{Z_2}(z)&=P(Z_2\le z)=P\left(\sqrt{-2\ln(1-U)}\le z\right)=P\left(-2\ln(1-U)\le z^2\right) \\ &=P\left(-\ln(1-U)\le \frac{z^2}{2}\right)=P\left(\frac{1}{1-U}\le\exp\left(\frac{z^2}{2}\right)\right)=P\left(U\le 1-\exp\left(-\frac{z^2}{2}\right)\right)\end{align}Thus $F_{Z_2}(z_2)=\begin{cases}0,&z_2\le 0 \\ 1-\exp\left(-\dfrac{z_2^2}{2}\right),&z_2>0\end{cases}\implies\boxed{f_{Z_2}(z_2)=\begin{cases}0,&z_2\le 0\\ z_2\exp\left(-\dfrac{z_2^2}{2}\right),&z_2>0\end{cases}}$
Thank you.