In: Statistics and Probability
**Question 4**: Three identical-looking chests contain the following booty:
1) 40 gold coins, 20 silver, and 40 bronze
2) 20 gold coins, 70 silver, and 10 bronze
3) 10 gold coins, 20 silver, and 70 bronze
Each chest is locked, but all have a small slit at the top where you could deposit additional coins (and maybe shake out a coin already inside). You select one of the chests at random, pick it up, and shake it. Out of the slit comes a gold coin, then after further shaking a bronze coin. Let's find the probability that you are holding chest 1.
a) Before any coins fall out, what is the prior probability that you you are holding chest 1?
**Response:**
b) If you indeed had chest 1, what is the probability that a gold coin would fall out, followed by a bronze coin?
**Response:**
c) If you instead had chest 2, what is the probability that a gold
coin would fall out, followed by a bronze coin?
**Response:**
d) If you instead had chest 3, what is the probability that a gold coin would fall out, followed by a bronze coin?
**Response:**
e) What is the (unconditional) probability of shaking a chest (that was picked at random) and having a gold coin fall out followed by a bronze coin. Show your numerical calculation in the R chunk below. Sanity check: between 8-9%.
**Response:**
**Question 5** You look at 50000 past transactions of a convenience store. 225 had a chocolate bar. 489 had gum. 112 had both.
a. You pick one transaction at random from this list to audit. What's the probability that gum was part of this transaction?
**Response:**
b. The first item listed on the receipt of the transaction you picked turns out to be a chocolate bar. Now what's the probability that gum was part of this transaction?
**Response:**
c. What's the "lift" of the association between gum and chocolate bars? Explain what this number means in simple terms (there's multiple ways of interpreting this number; you only need to provide one).
**Response:**
given that
Three identical-looking chests contain the following booty:
1) 40 gold coins, 20 silver, and 40 bronze
2) 20 gold coins, 70 silver, and 10 bronze
3) 10 gold coins, 20 silver, and 70 bronze
a)
since all three chests are identical hence each has an equal chance of being selected hence
probability of holding chest 1=1/3
b)
if you are holding chest 1
then you have total 100 coins out of 100,40 coins are gold while 40 bronze
for first coin to be gold there are 40 gold coins out of 100 coins so chance =40/100=0.4
for second coin to be bronze there are 40 bronze coins out of 99 coins so chance =40/99
hence required probability =0.4*(40/99)=0.162
c)
if you are holding chest 2
then you have total 100 coins out of 100,20 coins are gold while 10 bronze
for first coin to be gold there are 20 gold coins out of 100 coins so chance =20/100=0.2
for second coin to be bronze there are 10 bronze coins out of 99 coins so chance =10/99
hence required probability =0.2*(10/99)=0.02
d)
if you are holding chest 3
then you have total 100 coins out of 100,10 coins are gold while 70 bronze
for first coin to be gold there are 10 gold coins out of 100 coins so chance =10/100=0.1
for second coin to be bronze there are 70 bronze coins out of 99 coins so chance =70/99
hence required probability =0.1*(70/99)=0.071
e)
since chests are identical hence each have equal chance of being selected i.e. 1/3
so
for chest1
Required probability =0.162*(1/3)=0.054
for chest 2
Required Probability=0.02*(1/3)=0.007
for chest 3
Required probability =0.071*(1/3)=0.024