Q.
Let X ~ Uniform(0,1) and Y= -log(X).
- Find E(Y), Var(Y)
A.
- U ~ Uniform (0,1)
- 1-U ~ Uniform(0,1)
- -log(1-U) ~exp(1)
- -log(U) ~ exp(1)
- E(Y) = V(Y) = 1
I can't understand the -log(U) ~ exp(1) and E(Y) = V(Y) =1. How can i know -log(U) follow exponential distribution?
I will provide two answers: The first answer is a direct calculation:
Let $Z = -\log(U)$, then for any $z \in (0,\infty)$ we have \begin{align*} \mathbb{P}(Z\leq z)&=\mathbb{P}(-\log(U)\leq z) \\ &= \mathbb{P}(\log(U) \geq -z) \\ &= \mathbb{P}(U \geq e^{-z}) \\ &= 1 - \mathbb{P}(U < e^{-z}) \\ &= 1- e^{-z} \end{align*} where $1-e^{-z}$ is the CDF of an exponential distribution with rate parameter $1$.
For a more general answer, consider any random variable $X$ with strictly increasing CDF $F_X$. Now consider the variable $U=F_X(X)$. Notice that
$$\mathbb{P}(U\leq u) =\mathbb{P}(F_X(X) \leq u) = \mathbb{P}(X\leq F_X^{-1}(u))=F_X(F_X^{-1}(u)) = u$$ and it follows that $U\sim Uniform(0,1)$ and as an interesting consequence we have for any uniform random variable $U\sim Uniform(0,1)$, that $F_X^{-1}(U)\sim X$. Let us apply this general result to the exponential distribution. The CDF is $F_X(x) = 1-e^{-x}$ and therefore $F_X^{-1}(u) = -\log(1-u)$.