Let X random variable with a probability density function (p.d.f) $f(x)$. Let $P(A)$ the probability of event $A$ and $P(A|x)$ the probability of event $A$ given $x$. Then, the following is true:
$P(A) = \int_{0}^{1} P(A|x) f(x) dx$
Why is this true?