From the course: Machine Learning Foundations: Probability

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Total probability

Total probability

- [Instructor] Let's explore the following example, Jack has three bags with 10 sweets in each bag. The first bag has three chocolate and seven vanilla sweets. The second bag has four chocolate and six vanilla sweets. And the third bag consists of five chocolate and five vanilla sweets. A sweet is randomly chosen from one of the bags. What is the probability that it is a vanilla sweet? When our sample space can be separated into disjoint regions B1, B2, B3, et cetera, so that the totality of the sample space is covered by the region's Bi's that don't overlap, we can use this formula to calculate the total probability of the event i over the partitions. P of A equals sum P of A given Bi multiplied by P of Bi. In this formula, P of A given Bi represents the probability of A given partition Bi. And P of Bi represents the probability of the partition Bi. Let's see it in an example. We had three companies, Google, Microsoft, and…

Contents