When we talk about total probability we are talking about a partition space. A partition of any sample space is nothing but simply a collection of events that are disjoint say $C_1, C_2…, C_k$ and the union of all these events is equal to the sample space. 

Such kind of partition will also divide any set say B of the sample space into disjoint pieces. 
Let us suppose that we have an event B and $A_1, A_2,…, A_k$ are the partitions then, event B is the union of these partitions such that:

$B$ = $(B \cap A_1) \cup (B \cap A_2) \cup … \cup (B \cap A_k)$
Since all these partitions are disjoint so we have

$P(B)$ = $P (B \cap A_1) + P (B \cap A_2) + … + P (B \cap A_k)$

We know by the multiplication rule that:

$P(B \cap A_1)$ = $P (A_1) P (B|A_1)$

where $P (B|A_1)$ is the conditional probability which gives the probability of occurrence of event B when event $A_1$ has already occurred.
Applying this rule above we get,

$P (B)$ = $P (A_1) P (B|A_1) + P (A_2) P (B|A_2) + … + P (A_k) P (B|A_k)$

This is the law of total probability. This law is very useful in many places. For example: We are drawing two cards from a deck of cards. The first card drawn is a king. To find the probability if the second one is an ace or not we use the law of total probability only which makes it easier to find.

The law of total probability is also referred to as total probability theorem or law of alternatives.
Let us check some examples of problem solving that involves the total probability theorem.

Example

Let us check some examples of problem solving that involves the total probability theorem.

Example 1: We draw two cards from a deck of shuffled cards without replacement. Find the probability of getting the second card a queen.

Solution: Let $‘A’$ represent the event of getting the first card a queen.

Let $‘B’$ represent the event that the first card is not a queen.

Let $‘E’$ represent the event that the second card is a queen.

Then the probability that the second card will be a queen or not will be represented by the law of total probability as:

$P (E)$ = $P (A) P (E|A) + P (B) P (E|B)$

Where $P (E)$ is the probability that second card is a queen

 $P (A)$ is the probability that the first card is a queen

$P (E|A)$ is the probability that the second card is a queen given that first card is a queen.

$P (B)$ is the probability that the first card is not a queen

$P (E|B)$ is the probability that the second card is a queen but the first card drawn is not a queen.

According to question:

$P (A)$ = $\frac{4}{52}$ $P (B)$ = $\frac{48}{52}$ $P (E|A)$ = $\frac{3}{51}$ $P (E|B)$ = $\frac{4}{51}$

On substituting we get,

$P (E)$ = $\frac{4}{52}$ * $\frac{3}{51}$ + $\frac{48}{52}$ * $\frac{4}{51}$

 = $\frac{(3 * 4)}{(52 * 51)}$ + $\frac{(48 * 4)}{(52 * 51)}$
 
 = $\frac{(4 * (3 + 48))}{(52 * 51)}$
 
 = $\frac{(4 * 51)}{ (52 * 51)}$
 
 = $\frac{4}{52}$
 
 = $\frac{1}{13}$