# Probability of a random variable as a function given a CDF

I have a cumulative function/cdf defined as follows, where $X$ is a random variable:

\ F_X(x) = \left\{\begin{aligned} &0 &&: x \le 0\\ &1-e^{-x} &&: x > 0 \end{aligned} \right.

How would I go about solving $P(0 \le e^X \le 4)$ ?

I understand that if we are given a probability range and a CDF we can find the probability as follows:

$P(a \le X \le b) =F_X(b)-F_X(a)$

Would I just need to do some simplification like taking the natural log of both sides of the range of the probability?

We know that $e^X \geq 0$, the event $e^X \leq 4$ is equivalent to $X \leq \ln 4$, hence
$$P(0 \leq e^X \leq 4)= P(X \leq \ln 4)=F_X(\ln 4) = 1- \exp(-\ln 4)=\frac34$$
• Yup, $e^X >0$ for sure. – Siong Thye Goh Feb 24 '17 at 23:51
$P(0 \le e^X \le 4) = P(e^X \le 4) = P(X \le \ln 4) = F(\ln 4)$