# Total Probability Theorem

Suppose we are given ‘**n**’ disjoint sets meaning that the intersection of any two sets is a null set and these sets partition omega(sample space is represented by omega) meaning that the union of these sets gives the sample space

If we have a **set B**(circular part in the below image) which intersects with the given sets(A₁, A₂, …., A₇) then we can write **B** as the union of its parts and these parts refers to the part that intersects with each of the given sets:

One thing to note here is that the parts of **B** or **intersection of B** with each of the given sets forms disjoint events because the given sets are disjoint.

Since **B** is written as a union of disjoint events, the probability of **B** can be written as the sum of probability of individual events that contributes to the union

Using the chain rule on top of this:

**The above result/formula is known as the total probability theorem.**

Let’s take the same COVID-19 example discussed in the previous article:

So, we have been provided with some information wherein we have the event definition and the probability for different cases

And we are interested in the **P(B)** which is the probability of a test result turning out to be positive and we can compute the probability of **B** using total probability theorem along with chain rule:

We know that **event A and its complement are disjoint events and their union forms the sample space**

Let’s take one more example:

Here we have a person who is entering a dungeon and there are three different paths through the dungeon and he might take any one of these paths and along the path, he might encounter a monster and we are interested in knowing the probability that the person will come out alive(if the monster is encountered along the path, then the person will not come out alive):

Let’s define events in this case:

And suppose we are provided with the below information

The person will come out alive if he does not encounter a monster so we are interested in knowing the probability of **B complement**

We know that **A₁, A₂, A₃** are disjoint events because he can take any one of the three paths

Using the axioms, properties of probability, we can compute the **probability of B complement given A₁**

Now each of the paths is equally likely in this case and hence we have probabilities of **A₁, A₂, A₃** as 1/3 each

Total probability theorem leverages the concept of conditional probability, chain rule of probability to compute the probability of an event which can be represented as the union of ‘**n**’ disjoint events such that these ’**n**’ events partitions the sample space(union of these ’**n**’ events gives the universal set/sample space).

References: PadhAI