Total Probability Theorem
For a finite set of mutually exclusive events ( for ) that form a partition of the sample space (i.e. every possible outcome is included in only one event for all ), the total probability theorem states that if for all , the probability of any event can be expressed as the sum of the joint probability of and every , so that
or as the sum of the conditional probabilities of given , weighted by , and vice-versa, such that
Intuition
Consider events that form a partition of the sample space, such that . Consider another event , which intersects with parts of and in the following figure:
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
% Draw the probability space rectangle
\draw[thick] (0,0) rectangle (6,4) node[below left]{$\Omega$};
% Draw the random squiggly line to divide the rectangle
\draw[thick]
(0.5,0) .. controls (1,1) and (1.5,2) .. (2,1.5)
.. controls (2.5,1) and (3,2.5) .. (3.5,3.2)
.. controls (4,3.8) and (5,3) .. (5.5,4);
% Label A_1 and A_2
\node at (1,3) {$A_1$};
\node at (5,1) {$A_2$};
% Draw the event B as a circle
\draw[thick] (3,2) circle (1.5);
\node at (3,2) {$B$};
% Label intersections and shade them
% Intersection of A_1 and B
\begin{scope}
\clip (0,0) rectangle (6,4);
\clip
(0.5,0) .. controls (1,1) and (1.5,2) .. (2,1.5)
.. controls (2.5,1) and (3,2.5) .. (3.5,3.2)
.. controls (4,3.8) and (5,3) .. (5.5,4) -- (6,4) -- (6,0) -- cycle;
\fill[gray, opacity=0.3] (3,2) circle (1.5);
\end{scope}
\node at (3.5,1.5) {$A_2 \cap B$};
% Intersection of A_2 and B
\begin{scope}
\clip (0,0) rectangle (6,4);
\clip
(0.5,0) .. controls (1,1) and (1.5,2) .. (2,1.5)
.. controls (2.5,1) and (3,2.5) .. (3.5,3.2)
.. controls (4,3.8) and (5,3) .. (5.5,4) -- (0,4) -- (0,0) -- cycle;
\fill[gray, opacity=0.7] (3,2) circle (1.5);
\end{scope}
\node at (2.35,2.5) {$A_1 \cap B$};
\end{tikzpicture}
\end{document}Since (i.e. and are mutually exclusive), so are and . Furthermore, these two intersections form a partition of , such that . Therefore, by the additivity axiom, . Likewise, since is contained within a sample space , we must weigh it by , as seen in 1.3.
Examples
Candies in a Jar
You are taking out candies one by one from a jar that contains 10 red candies, 20 blue candies, and 30 green candies.
What is the probability that there are at least 1 blue candy and 1 green candy left in the jar when you have taken out all the red candies? , , and be the positions of the last red, green and blue candy in the sequence of 60 candies. Then, we are solving for the problem of since the two events are mutually exclusive.
This problem requires a little bit more creative thinking. Let
We abstract from the 60-candy sequence, and take a look at the two events. Since taking out each of the 60 candies is equally likely, and the blue candy is the last one, we can transform the first factor into
Note that here , since knowing that a blue candy occupies slot 60 tells you nothing about how the red and green candies are interleaved among the remaining slots.Similarly, the second factor can be written as
Therefore, our final answer is
Galton-Watson Branching
You are starting your sourdough with only one cell of yeast. Every hour each cell of yeast undergoes a transformation, which could be any of the three following events: (a) with probability 25% the cell dies, (b) with probability 25% the cell does nothing, (c) with probability 50% the cell replicates itself (so there will be 2 cells).
What is the probability the yeast eventually dies out in the dough?
Rolling Dice