Let A_{1}, …, A_{n} be a partition of a sample space S with P (A_{i}) > 0 for all i, and let B be an event in S. Then

P (B) = P (B|A_{1})P (A_{1}) + … + P (B|A_{n})P (A_{n}).