# CDF of $-\ln X$ where $X$ is uniform on $(0,1)$

I'm having difficulty studying this part of the subject, because i can't get through this first example, can anyone help?

Let $$X: U(0,1)$$ Find the distribution function of the following random variable:$$Z=-lnX;$$ Answer:

$F_z(z)=P\{Z<z\}=P\{-lnX<z\}=P\{lnX>-z\}=P\{X>e^{-z}\}= \begin{cases} 1-e^{-z} ; e^{-z}\leq 1 \\ 0 ; e^{-z}>1 \end{cases}=\begin{cases} 1-e^{-z} ; z\geq 0 \\ 0 ; z < 0 \end{cases}$

What I don't understand is this last step, could anyone clarify what i'm not seeing ? How is this deducted ?

## 2 Answers

The PDF $p_X(x)$ of your uniform $X$ is $p_X(x) = 1$ for $x \in [0,1]$ and $p_X(x) = 0$ otherwise. The probability of $X$ being greater than $e^{-z}$ is thus $$P\{X > e^{-z}\} = \int_{e^{-z}}^\infty p_X(x) dx = \int_{e^{-z}}^1 1 dx + \int_1^\infty 0 dx = \int_{e^{-z}}^1 1 dx = 1- e^{-z}$$ if $e^{-z}$ does not exceed the interval $[0,1]$ by being greater than $1$ (trivial answer otherwise, see your case-by-case stuff). On the other hand, $e^{-z} > 0$ is always true.

We know that $P(X>e^{-z})=1-P(X\leq e^{-z})$ and $P(X\leq a)=\begin{cases}0,&a<0\\a,& 0\leq a\leq 1\\1,&a>1\end{cases}$ by definition of uniform distribution. When you substitute $a=e^{-z}$ you get the conclusion.

• By definition of uniform distribution? Clarify this (the definition your working with, and this example..) – Bozo Vulicevic Apr 30 '15 at 21:13
• @BozoVulicevic Well, I guess since the answer is for you it is better to base it in your definition of uniform distribution. Do you define it by giving the cumulative distribution function, by giving the density, how? – Alamos Apr 30 '15 at 21:18
• No, no , Let's see yours, this is a universal subject (my materials aren't with me), i'll deduct it into my system later on.. I want to see formally, how you concluded your answer above.. – Bozo Vulicevic Apr 30 '15 at 21:20
• @BozoVulicevic Well, what is written before "by definition" is the cumulative distribution function (CDF) of the uniform. If you define it by giving the CDF that's it. If you define it by giving the density you integrate it and get the CDF. – Alamos Apr 30 '15 at 21:23