Need clarification on Naive Bayes Theorem

#Week1

In the dice example mentioned in the above video when I apply Bayes theorem I am not sure if I am getting it right.
Question - Probablity that the sum is 10 when we roll two dice given the first dice shows 6.
Prior - Sum is 10
Event - 1st if 6
Posterior according to the formula is
P(sum=10|1st dice shows 6) = ?
What is A and B ?

Kindly help in demonstrating how to solve this using Naive Bayes formula.

Hi @Sandhya5

In this context, A corresponds to the event that the sum is 10, and B corresponds to the event that the first dice shows 6. So, we have:

  • Prior: P(A) = \frac{3}{36} = \frac{1}{12}
    -> (6,4), (4,6), (5,5) / All Combinations

  • Observed Event: P(B) = \frac{6}{36} = \frac{1}{6}
    -> (6,1), (6,2), (6,3), (6,4), (6,5), (6,6) / All Combinations

  • Likelihood: P(B | A) = \frac{P(A \cap B)}{P(A)} = \frac{1}{3}
    -> (6,4) / (6,4), (4,6), (5,5)

  • Posterior: P(A | B) = \frac{P(B | A) \cdot P(A)}{P(B)} = \frac{\frac{1}{3}\cdot \frac{1}{12}}{\frac{1}{6}} = \frac{6}{36} = \frac{1}{6}

Hope this helps. Feel free to ask if you need further assistance!

2 Likes

Thank you so much. It is very clear now.

1 Like

You’re welcome! Happy to help :raised_hands: