Proof:Law of total probability

From CS2800 wiki
If [math]A_1 [/math], [math]A_2 [/math], [math]\dots [/math], [math]A_n [/math] partition the sample space, then for any [math]B [/math],


[math]\href{/cs2800/wiki/index.php/Pr}{Pr}(B) = \sum \href{/cs2800/wiki/index.php/Pr}{Pr}(B \href{/cs2800/wiki/index.php/%5Cmid}{\mid} A_i)\href{/cs2800/wiki/index.php/Pr}{Pr}(A_i) = \href{/cs2800/wiki/index.php/Pr}{Pr}(B \href{/cs2800/wiki/index.php/%5Cmid}{\mid} A_1)\href{/cs2800/wiki/index.php/Pr}{Pr}(A_1) + \href{/cs2800/wiki/index.php/Pr}{Pr}(B \href{/cs2800/wiki/index.php/%5Cmid}{\mid} A_2)\href{/cs2800/wiki/index.php/Pr}{Pr}(A_2) + \cdots + \href{/cs2800/wiki/index.php/Pr}{Pr}(B \href{/cs2800/wiki/index.php/%5Cmid}{\mid} A_n)\href{/cs2800/wiki/index.php/Pr}{Pr}(A_n) [/math]
Proof: Law of total probability
The proof is pretty clear from the following picture:

Law-of-total-probability.svg

Since the [math]A_i [/math] are disjoint, we have that the sets [math]B \href{/cs2800/wiki/index.php/%E2%88%A9}{∩} A_i [/math] are disjoint; and since every element of [math]S [/math] is in one of the [math]A_i [/math], we have that every element of [math]B [/math] is in one of the [math]B \href{/cs2800/wiki/index.php/%E2%88%A9}{∩} A_i [/math].

Therefore, we can apply the third Kolmogorov axiom to conclude

[math]\begin{aligned} \href{/cs2800/wiki/index.php/Pr}{Pr}(B) &= \href{/cs2800/wiki/index.php/Pr}{Pr}((B \href{/cs2800/wiki/index.php/%E2%88%A9}{∩} A_1) \href{/cs2800/wiki/index.php/%E2%88%AA}{∪} \cdots \href{/cs2800/wiki/index.php/%E2%88%AA}{∪} (B \href{/cs2800/wiki/index.php/%E2%88%A9}{∩} A_n)) && \text{as argued above} \\ &= \href{/cs2800/wiki/index.php/Pr}{Pr}(B \href{/cs2800/wiki/index.php/%E2%88%A9}{∩} A_1) + \cdots + \href{/cs2800/wiki/index.php/Pr}{Pr}(B \href{/cs2800/wiki/index.php/%E2%88%A9}{∩} A_n) && \href{/cs2800/wiki/index.php/Kolmogorov_axiom}{\text{Kologorov's third axiom}} \\ &= \href{/cs2800/wiki/index.php/Pr}{Pr}(B \href{/cs2800/wiki/index.php/%5Cmid}{\mid} A_1)\href{/cs2800/wiki/index.php/Pr}{Pr}(A_1) + \cdots + \href{/cs2800/wiki/index.php/Pr}{Pr}(B \href{/cs2800/wiki/index.php/%5Cmid}{\mid} A_n)\href{/cs2800/wiki/index.php/Pr}{Pr}(A_n) && \href{/cs2800/wiki/index.php/Conditional_probability}{\text{by definition of }Pr(B \mid A)} \end{aligned} [/math]

as required.