Let’s consider a situation where we have two bags (Bag A and Bag B) with the following distribution of colored balls:

In total, there are 54 + 6 + 20 + 20 = 100 balls. We will use this setup to illustrate several probability concepts: joint probability, marginal probability, law of total probability, and conditional probability.

To simplify the analysis, we make a naive assumption (the classic probability model), where each sample has an equal likelihood of being selected. Under this assumption, the probability of selecting Bag A is $60/100 = 0.60$, and the probability of selecting Bag B is $40/100 = 0.40$.

While this assumption aids in understanding the concepts, it may not always hold true in real-world scenarios.

Joint Probability

Joint probability refers to the probability of two events occurring simultaneously. We denote it as $P(A,B)$.

embed_(69) (1).svg

  1. Setting Up the Events

Marginal Probability

Marginal probability is the probability of one event, ignoring other distinctions. For example, $P(\text{Blue})$ is the probability of drawing a blue ball from either bag, with no regard to which bag it came from.

Often, we find marginal probability by summing relevant joint probabilities.

embed (67).svg

Counting Perspective (Frequency)

The Law of Total Probability: it states that if an event can occur via several disjoint “routes,” you sum over those routes:

$$ P(\text{Blue})= P(\text{Bag A, Blue}) + P(\text{Bag B, Blue}). $$

  1. Calculating $P(\text{Bag A, Blue})$ and $P(\text{Bag B, Blue})$

  2. Combining via the Law of Total Probability

    $$ P(\text{Blue}) = 0.54 + 0.20 = 0.74. $$

Conditional Probability

Conditional probability is the probability of an event $A$ occurring given that another event $B$ has already occurred. It's denoted as $P(A|B)$, which reads as "the probability of A given B."

$$ P(A \mid B) = \frac{P(A, B)}{P(B)}. $$