The Monty Hall problem goes as follows: Assume there are three curtains, A,B,C. One of these curtains has a prize. You are given the chance to pick a curtain, and let’s assume that you pick A. Then, curtain B opens, and you can see that there is no prize behind curtain B. You have the option to change your initial choice: do you switch to C or do you stay with A?
The probability for the price to be behind any of the 3 curtains is 1/3:
\[ \Pr(\text{Prize in A}) = \Pr(\text{Prize in B}) = \Pr(\text{Prize in C}) = 1/3 \]
Once we chose curtain A, then the probability of B and C to be revealed is 1/2:
\[ \Pr(\text{B Revealed | Chose A}) = \Pr(\text{C Revealed | Chose A}) = 1/2 \]
Given that B is revealed, we want to estimate the conditional \(\Pr(\text{Prize in C | B Revealed, Chose A})\). If this probability is greater than 1/3, then we should switch to C. Using the Bays rule we can decompose this probability as follows:
\[ \Pr(\text{Prize in C | B Revealed, Chose A}) = \frac{\Pr(\text{B Revealed, Chose A| Prize in C}) * \Pr(\text{ Prize in C})}{\Pr(\text{B Revealed, Chose A})} \] The \(\Pr(\text{B Revealed, Chose A| Prize in C})\) can be estimated as follows:
\[ \begin{align} \Pr(\text{B Revealed, Chose A| Prize in C}) &= \Pr(\text{B Revealed | Chose A, Prize in C}) * \Pr(\text{Chose A}) \\ &= 1 * 1/3 = 1/3 \end{align} \]
The denominator of the above is:
\[ \Pr(\text{B Revealed, Chose A}) = \Pr(\text{B Revealed | Chose A}) * \Pr(\text{Chose A}) = 1/3 * 1/2 = 1/6 \]
Hence, the wanted probability becomes:
\[ \Pr(\text{Prize in C | B Revealed, Chose A}) = \frac{ 1/3 * 1/3}{1/6} = 2/3 \]
As a result, once B is revealed, the probability for the prize to be in C becomes 1/2, and hence we should switch our selection from A to C.
These types of problems are fairly common in data-related interviews. While getting the exact version of Monty Hall is unlikely, getting variations of this problem is very likely. You can find variations of this problem by searching for prior evidence at https://www.madinterview.com.