I recently took a HackerRank test for a Data Science position and got the following question wrong:
A casino has 10 slot machines. Eight of them are "Wheel of Fortune" themed, and two are "Jeopardy" themed. However, you do not know which machines are which. A "Wheel of Fortune" slot machine wins on 20% of spins which a "Jeopardy" machine wins on 50%. Say you play a round and are a winner. What is the probability that this is a "Wheel of Fortune" machine?
I used posterior probability to calculate this: WoF = Wheel of Fortune
J = Jeopardy
W = Win
L = Lost
P(WoF|W) = (P(W|WoF) * P(WoF)) / P(W)
P(WoF) = 80/100 = 4/5
P(W|WoF) = 20/100 = 1/5
P(W) = (20/100)*(8/10)+(50/100)*(2/10) = 13/50
P(WoF|W) = 8/13
I came up with the answer of 8/13. Can anyone help me identify what I did wrong?