Bayes' rule - Exercise set 1

This exercise set contains some solved exercises on Bayes' rule. The theory needed to solve these exercises is introduced in the lecture entitled Bayes' rule.

Exercise 1.1

There are two urns containing colored balls. The first urn contains 50 red balls and 50 blue balls. The second urn contains 30 red balls and 70 blue balls. One of the two urns is randomly chosen (both urns have probability $50%$ of being chosen) and then a ball is drawn at random from one of the two urns. If a red ball is drawn, what is the probability that it comes from the first urn?

nav_button Solution

In probabilistic terms, what we know about this problem can be formalized as follows:[eq1]The unconditional probability of drawing a red ball can be derived using the law of total probability:[eq2]Using Bayes' rule we obtain:[eq3]

Exercise 1.2

An economics consulting firm has created a model to predict recessions. The model predicts a recession with probability 80% when a recession is indeed coming and with probability 10% when no recession is coming. The unconditional probability of falling into a recession is 20%. If the model predicts a recession, what is the probability that a recession will indeed come?

nav_button Solution

What we know about this problem can be formalized as follows:[eq4]The unconditional probability of predicting a recession can be derived using the law of total probability:[eq5]Using Bayes' rule we obtain:[eq6]

Exercise 1.3

Alice has two coins in her pocket, a fair coin (head on one side and tail on the other side) and a two-headed coin. She picks one at random from her pocket, tosses it and obtains head. What is the probability that she flipped the fair coin?

nav_button Solution

What we know about this problem can be formalized as follows:[eq7]The unconditional probability of obtaining head can be derived using the law of total probability:[eq8]Using Bayes' rule we obtain:[eq9]

by
About | Contacts | Privacy and terms of use | Sitemap