Bayes Theorem practice using the Candy Conundrum set of questions.
See the Jupyter Notebook for formulas used and answers.
Candy Conundrum I have two bowls of candy. One is supposed to be filled with candy-covered chocolates, the other filled with fruit-flavored candies with candy shells. Unfortunately, someone has nefariously mixed up the contents of the two bowls, mixing a portion of one bowl into the second, and vice versa. Even worse, the candies are visually indistinguishable, and can only be sorted out by taste.
I know that one of the bowls (A) has candies in the following proportions: A ~ {2/3 chocolate, 1/3 fruity}, B ~ {1/4 chocolate, 3/4 fruity}. Assume for the questions below that both bowls are large enough that small samples will not have a practical effect on the distribution of candies.
-
I select a bowl at random and choose a random candy. It's a chocolate candy! What is the probability that I've picked up bowl A (the one weighted towards chocolates)?
-
Continuing with the same bowl as before, I select two more candies. They are both fruity candies. What is the probability that I've picked up bowl A (the one weighted towards chocolates) now? (To clarify, there are three candies drawn in all: one chocolate and two fruity.)