1. Home
  2. Explore
  3. Mathematics
  4. Probability Examples

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Probability Examples

🎲 Probability Examples: Law of Total Probability & Bayes' Theorem

This document explores two fundamental concepts in probability: the Law of Total Probability and Bayes' Theorem, using a consistent problem setup involving two urns and ball transfers. Understanding these concepts is crucial for solving complex probability problems, especially those involving conditional probabilities.


urn Setup & Initial Conditions 📦

Both examples utilize the same initial configuration for two urns:

  • Urn 1: Contains 15 red balls and 10 green balls.

    Total balls: 25

Urn 2: Contains 4 red balls and 15 green balls.

  • Total balls: 19

The process involves two steps:

  1. A ball is randomly selected from Urn 1 and transferred to Urn 2.

  2. After the transfer, a ball is selected from Urn 2.


⚖️ Law of Total Probability Example

The first example focuses on calculating the probability that the ball selected from Urn 2 (after the transfer) is red. This is a classic application of the Law of Total Probability.

🧠 Intuitive Breakdown

Before diving into formal notation, let's consider the logical steps:

  1. Probability of Transferring a Red Ball (from Urn 1 to Urn 2):

    There are 15 red balls out of 25 total in Urn 1.

  2. $P(\text{Transferred Ball is Red}) = 15/25 = \textbf{0.6}$

  3. State of Urn 2 if a Red Ball was Transferred:

    With probability 0.6, Urn 2 now has:

    5 red balls (4 initial + 1 transferred red)

  4. 15 green balls (15 initial)

  5. Total balls: 20

  6. Probability of selecting a red ball from Urn 2 given a red ball was transferred: $5/20 = \textbf{0.25}$

  7. Probability of Transferring a Green Ball (from Urn 1 to Urn 2):

    There are 10 green balls out of 25 total in Urn 1.

  8. $P(\text{Transferred Ball is Green}) = 10/25 = \textbf{0.4}$

  9. State of Urn 2 if a Green Ball was Transferred:

    With probability 0.4, Urn 2 now has:

    4 red balls (4 initial)

  10. 16 green balls (15 initial + 1 transferred green)

  11. Total balls: 20

  12. Probability of selecting a red ball from Urn 2 given a green ball was transferred: $4/20 = \textbf{0.20}$

📊 Calculation using Law of Total Probability

The total probability of selecting a red ball from Urn 2 is a weighted average of the probabilities calculated above.

$P(\text{Ball from Urn 2 is Red}) = P(\text{Red from Urn 2 | Transferred Red}) \times P(\text{Transferred Red}) + P(\text{Red from Urn 2 | Transferred Green}) \times P(\text{Transferred Green})$

$P(\text{Ball from Urn 2 is Red}) = (0.25 \times 0.6) + (0.20 \times 0.4)$
$P(\text{Ball from Urn 2 is Red}) = 0.15 + 0.08 = \textbf{0.23}$

📝 Mathematical Notation

Let's formalize this with notation:

  • Event T: The color of the transferred ball.

    $P(T = \text{Red}) = \textbf{0.6}$

  • $P(T = \text{Green}) = \textbf{0.4}$

Event C: The color of the ball selected from Urn 2.

We are interested in $P(C = \text{Red})$.
The conditional probabilities are:

  • $P(C = \text{Red} | T = \text{Red}) = 5/20 = \textbf{0.25}$

  • $P(C = \text{Red} | T = \text{Green}) = 4/20 = \textbf{0.20}$

Applying the Law of Total Probability:
$P(C = \text{Red}) = P(C = \text{Red} | T = \text{Red}) \times P(T = \text{Red}) + P(C = \text{Red} | T = \text{Green}) \times P(T = \text{Green})$
$P(C = \text{Red}) = (0.25 \times 0.6) + (0.20 \times 0.4) = 0.15 + 0.08 = \textbf{0.23}$


🔄 Bayes' Theorem Example

This second example uses the exact same urn setup but poses a different question: Given that the ball selected from Urn 2 is red, what is the probability that the transferred ball was green? This is a conditional probability in reverse, making it a Bayes' Theorem problem.

❓ The Problem Statement

  • Given: The ball selected from Urn 2 is red.

  • Calculate: The probability that the transferred ball was green.

This can be written as $P(T = \text{Green} | C = \text{Red})$.

💡 Bayes' Theorem Insight

Bayes' Theorem allows us to reverse the conditioning of probabilities. We know $P(C = \text{Red} | T = \text{Green})$ (the "easy" direction), and Bayes' Theorem helps us find $P(T = \text{Green} | C = \text{Red})$ (the "difficult" direction).

The general form of Bayes' Theorem for events A and B is:
$P(A|B) = \frac{P(B|A) \times P(A)}{P(B)}$

In our case:

  • A = ($T = \text{Green}$)

  • B = ($C = \text{Red}$)

So, we want to calculate:
$P(T = \text{Green} | C = \text{Red}) = \frac{P(C = \text{Red} | T = \text{Green}) \times P(T = \text{Green})}{P(C = \text{Red})}$

🛠️ Step-by-Step Calculation

  1. Identify the terms from the previous problem:

    $P(C = \text{Red} | T = \text{Green}) = \textbf{0.20}$ (Probability of red from Urn 2 given green transferred)

  2. $P(T = \text{Green}) = \textbf{0.4}$ (Prior probability of transferring a green ball)

  3. $P(C = \text{Red}) = \textbf{0.23}$ (This is the denominator, which we calculated using the Law of Total Probability in the previous example)

  4. Substitute values into Bayes' Theorem formula:
    $P(T = \text{Green} | C = \text{Red}) = \frac{0.20 \times 0.4}{0.23}$

  5. Calculate the numerator:
    Numerator = $0.20 \times 0.4 = \textbf{0.08}$

  6. Calculate the final probability:
    $P(T = \text{Green} | C = \text{Red}) = \frac{0.08}{0.23}$

    This can also be expressed as a fraction: $\frac{8}{23}$.

🔗 Connection to Law of Total Probability

A key takeaway for Bayes' Theorem problems is that the denominator ($P(B)$ or $P(C = \text{Red})$ in our case) is always calculated using the Law of Total Probability.

$P(C = \text{Red}) = P(C = \text{Red} | T = \text{Red}) \times P(T = \text{Red}) + P(C = \text{Red} | T = \text{Green}) \times P(T = \text{Green})$
$P(C = \text{Red}) = (0.25 \times 0.6) + (0.20 \times 0.4)$

Notice that the numerator of the Bayes' Theorem calculation ($P(C = \text{Red} | T = \text{Green}) \times P(T = \text{Green})$) is one of the terms from the sum in the denominator. In this case, it corresponds to the scenario where a green ball was transferred.

So, for Bayes' Theorem:

  • The denominator is the sum of all possible scenarios leading to the observed event (e.g., drawing a red ball from Urn 2).

  • The numerator is the specific scenario we are interested in (e.g., drawing a red ball from Urn 2 and having transferred a green ball).

This relationship is fundamental to understanding and applying Bayes' Theorem effectively.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent