# Find the distribution of $Y = -\log (1-X)$ given that $X\sim U(0,1)$.

If $X \sim U (0,1)$ then if we define a new random variable $Y=-\log (1-X)$ then what will be distribution of $Y$.

• I tried to find the pdf of Y. And got it as e^-y - e^-2y.but this doesnt seem to be a pdf.please help – user311790 Feb 9 '16 at 9:42

Let $y>0$.

$P(Y\leq y)=P(-\log(1-X)\leq y)=P(\log(1-X)\geq -y)=P(1-X\geq e^{-y})$

Now if $X\sim U(0,1)$, $1-X\sim U(0,1)$ too. So $P(1-X\geq e^{-y})=1-e^{-y}$.

We get the cdf of a standard exponential distribution.

$$P(y\leq Y\leq y+dy)=\int_0^1 dx\ \delta(y+\log(1-x))=\int_0^1 dx \delta(x-(1-e^{-y}))(1-x)=e^{-y}\Theta(y)\ ,$$ where $\Theta(\cdot)$ is the Heaviside function.

• Nice explanation +1 – complexmanifold Feb 9 '16 at 13:05

The answers above are right, you find the PDF of a positively-truncated exponential.

In fact, this is one of the most common way to generate (on a computer) numbers following an exponential distribution, assuming that you have a PRNG that produces number $X \sim \mathcal{U}([0,1])$. See here for more details, and here about the general method (Inverse transform sampling).