Session Ready
Exercise

Bayesian Probability II

Bayes law is based on the idea that prior knowledge about A (e.g. whether or not a plant is a tree), provides information about B (e.g. whether or not a plant lives indoors).

The formula for Bayes law is: \(P(A | B) = (P(B | A) * P(A)) / P(B)\)

Use this formula to solve the following problem: In a shop, people can take chewing gum from a dispenser on the right, or the left. The dispenser on the right has 7 packets of mint gum, and 3 packets of fruit gum, and the dispenser on the left has 7 packets of mint gum and 7 packets of fruit gum.

Someone buys a packet of mint gum - what is the probability that they took this packet from the right dispenser?

Instructions
100 XP
  • Complete the separate components in your script to solve the probability that someone took gum from the right dispenser, given that the packet was mint.