# Monty Hall problem with coin flip

Before each show, Monty secretly flips a coin with probability p of Heads. If the coin lands Heads, Monty resolves to open a goat door (with equal probabilities if there is a choice). Otherwise, Monty resolves to open a random unopened door, with equal probabilities. The contestant knows p but does not know the outcome of the coin flip. When the show starts, the contestant chooses a door. Monty (who knows where the car is) then opens a door. If the car is revealed, the game is over; if a goat is revealed, the contestant is offered the option of switching. Now suppose it turns out that the contestant opens door 1 and then Monty opens door 2, revealing a goat. What is the contestant’s probability of success if he or she switches to door 3?

This is from "Introduction to Probability" By Joseph K. Blitzstein

The solution that I came up with is the following:

Ci - event that car is behind door i

H - event that coin landed head

Xi - event that participant picks door i initially Oi - event that Monty opens door i

Given this we have:

$$P(C3|X1, O2) = \frac{P(O2|C3, X1)P(C3|X1)}{P(O2|C3, X1)}$$

And:

$$P(O2|C3, X1) = P(O2|C3, X1, H)P(H|C3, X1) + P(O2|C3, X1, Hc)P(Hc|C3, X1)$$

I'd appreciate some thoughts on this.

• Well.... did you try plugging in some numbers? It seems like a straightforward Baye's theorem. Nov 26 '18 at 23:18
• Don't think you need to worry about probability that contestant picks door i. We are given that he picked door 1. That's a given. Nov 26 '18 at 23:20

$$\begin{split}\mathsf P(O_2\mid X_1,C_3) &= \mathsf P(H)~\mathsf P(O_2\mid H,X_1,C_3) + \mathsf P(H^\complement)~\mathsf P(O_2\mid H^\complement,X_1)\end{split}$$
$$\begin{split}\mathsf P(C_3\mid X_1,O_2) &= \dfrac{\mathsf P(C_3)~\mathsf P(O_2\mid X_1,C_3)}{\mathsf P(C_1)~\mathsf P(O_2\mid X_1,C_1)+\mathsf P(C_3)~\mathsf P(O_2\mid X_1,C_3)}\end{split}$$