# Exponential random variable X with a uniform random variable as its parameter

$$X\ \sim Exp(U) ~ and\ U\ \sim U(0,1)$$

The question asked for the value of $$P(X\geqslant 1)$$

I saw the solution and it went like this:

$$P(X\geqslant 1) = E[P(X\geqslant 1)|U] = E[e^{-u}] = \int_{0}^{1}e^{-x}dx$$

Could someone explain the solution to me?

More specifically how did the solution derive each step?

You are given that the conditional distribution of $$X$$ given $$U=u$$ is $$\text{Exp}(u)$$ (presumably $$u$$ is the rate parameter), where $$U$$ itself is uniformly distributed on $$(0,1)$$.
Suppose $$I(X\ge 1)$$ is an indicator variable that equals $$1$$ if $$X\ge 1$$ and equals $$0$$ otherwise. And let the density of $$U$$ be $$f_U$$. Then,
\begin{align} P(X\ge 1)&=E\left[I(X\ge 1)\right] \\&=E\left[E\left[I(X\ge 1\mid U\right]\right] \\&=E\left[P(X\ge 1\mid U)\right] \\&=E\left[e^{-U}\right] \\&=\int e^{-x}f_U(x)\,dx \\&=\int_0^1 e^{-x}\,dx \end{align}
• You can directly say $P(X\ge 1)=\int P(X\ge 1\mid U=x)f_U(x)\,dx$ by law of total probability. Apr 24 at 5:45