23
$\begingroup$

This is probably a trivial question, but my search has been fruitless so far, including this wikipedia article, and the "Compendium of Distributions" document.

If $X$ has a uniform distribution, does it mean that $e^X$ follows an exponential distribution?

Similarly, if $Y$ follows an exponential distribution, does it mean $ln(Y)$ follows a uniform distribution?

$\endgroup$
  • 3
    $\begingroup$ Why would you expect it to be so? Because of the name? Check en.wikipedia.org/wiki/… to see how other distributions are related to exponential. Also $\exp(X) \not\in [0, \infty)$... $\endgroup$ – Tim Sep 12 '16 at 11:06
  • $\begingroup$ No, I think I am following analogies with standard function transformations, forgetting that with distributions, things are different. $\endgroup$ – luchonacho Sep 12 '16 at 11:55
30
$\begingroup$

It is not the case that exponentiating a uniform random variable gives an exponential, nor does taking the log of an exponential random variable yield a uniform.

Let $U$ be uniform on $(0,1)$ and let $X=\exp(U)$.

$F_X(x) = P(X \leq x) = P(\exp(U)\leq x) = P(U\leq \ln x) = \ln x\,,\quad 1<x<e$

So $f_x(x) = \frac{d}{dx} \ln x = \frac{1}{x}\,,\quad 1<x<e$.

This is not an exponential variate. A similar calculation shows that the log of an exponential is not uniform.

Let $Y$ be standard exponential, so $F_Y(y)=P(Y\leq y) = 1-e^{-y}\,,\quad y>0$.

Let $V=\ln Y$. Then $F_V(v) = P(V\leq v) = P(\ln Y\leq v) = P(Y\leq e^v) = 1-e^{-e^v}\,,\quad v<0$.

This is not a uniform. (Indeed $-V$ is a Gumbel-distributed random variable, so you might call the distribution of $V$ a 'flipped Gumbel'.)

However, in each case we can see it more quickly by simply considering the bounds on random variables. If $U$ is uniform(0,1) it lies between 0 and 1 so $X=\exp(U)$ lies between $1$ and $e$ ... so it's not exponential. Similarly, for $Y$ exponential, $\ln Y$ is on $(-\infty,\infty)$, so that can't be uniform(0,1), nor indeed any other uniform.

We could also simulate, and again see it right away:

First, exponentiating a uniform --

histogram of exponentiated uniform with the theoretical density superimposed

[the blue curve is the density (1/x on the indicated interval) we worked out above...]

Second, the log of a exponential:

histogram of log of an exponential variate

Which we can see is far from uniform! (If we differentiate the cdf we worked out before, which would give the density, it matches the shape we see here.)

Indeed the inverse cdf method indicates that taking the negative of the log of a uniform(0,1) variate gives a standard exponential variate, and conversely, exponentiating the negative of a standard exponential gives a uniform. [Also see probability integral transform]

This method tells us that if $U=F_Y(Y)$, $Y = F^{-1}(U)$. If we apply the inverse of the cdf as a transformation on $U$, a standard uniform, the resulting random variable has distribution function $F_Y$.

If we let $U$ be uniform(0,1), then $P(U\leq u) = u$. Let $Y=-\ln (1-U)$. (Note that $1-U$ is also uniform on (0,1) so you could actually let $Y=-\ln U$, but we're following the inverse cdf method in full here)

Then $P(Y\leq y) = P(-\ln (1-U) \leq y) = P( 1-U \geq e^{-y}) = P( U \leq 1-e^{-y}) = 1-e^{-y}$, which is the cdf of a standard exponential.

[This property of the inverse cdf transform is why the $\log$ transform is actually required to obtain an exponential distribution, and the probability integral transform is why exponentiating the negative of a negative exponential gets back to a uniform.]

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Great answer! Thanks. I see it now. I calculated the CDF in both cases, and I get the negative of the log in the former case and the absolute value of an inverse, in the latter. I think my confusion is on thinking in terms of standard function transformations, which does not follow through when it comes to distributions. +1 for the graphs! $\endgroup$ – luchonacho Sep 12 '16 at 11:53
9
$\begingroup$

You almost have it back to front. You asked:

  • "If $X$ has a uniform distribution, does it mean that $e^X$ follows an exponential distribution?"

  • "Similarly, if $Y$ follows an exponential distribution, does it mean $\ln(Y)$ follows a uniform distribution?"

In fact

  • if $X$ is uniform on $[0,1]$ then $-\log_e(X)$ follows an exponential distribution with parameter $1$
  • if $Y$ follows an exponential distribution with parameter $1$ then $e^{-Y}$ has a uniform distribution on $[0,1]$.

More generally you could say:

  • if $X$ is uniform on $[a,b]$ then $-\frac1k \log_e\left(\frac{X-a}{b-a}\right)$ follows an exponential distribution with rate parameter $k$
  • if $Y$ follows an exponential distribution with rate parameter $k$ then $e^{-kY}$ has a uniform distribution on $[0,1]$ while $a+(b-a)e^{-kY}$ has a uniform distribution on $[a,b]$
| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.