# Distribution of $-\log X$ if $X$ is uniform.

For $X$ and $Y$ random variables; $X$ follows the uniform distribution.

(1): if $Y=-\log X$

(2): then it can be shown that $-\log X$ is distributed as $\exp(1)$ {i.e. exponential with mean 1}.

Why is this so? Intuitively statement (2) make sense to me. But i'd like a mathematical proof.

-Probably wrong working:

(1) seems to imply $\exp(-Y) = X$ (which is like saying $X$ is exponentially distributed, which is a contradiction, since its actually uniform!); or is it incorrect for me to do this since $X$ and $Y$ are random variables?

Ultimately how do I prove (2)?

Thanks

-
(2) is correct if $X$ is uniformly distributed on $[0,1]$ but for a general uniform distribution on $[a,b]$, the distribution of $-\log X$ is not exponential with mean $1$. –  Dilip Sarwate Sep 20 '12 at 12:20

The trick to resolve this kind of problems is to calculate the distribution of $Y$: $F(y) = P(Y<y)$. In this case, we have $F(y)=P(\log X<y)=P(X<e^y) =\int_0^{e^y}dt$. Now if you make the change of variable $t=e^u$, you are able to transform this expression into something of the form $F(y) = \int_{-\infty}^y f(u)du$, and then $f$ will be the density you are looking for.
@student101 yes that's true but in this case you got a nice expression of $F(y)$ because $X$ as a very simple distribution you can easily integrate, while I was providing you with the general methodology. –  S4M Sep 20 '12 at 9:42