Claim: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]