I was reading the Wikipedia page for the solution to Monty Hall problem using Bayes' theorem. I am very confused about this part
P(H3|X1) = 1/2 because this expression only depends on X1, not on any Ci. So, in this particular expression, the choosing of the host does not depend on where the car is, and there's only two remaining doors once X1 is chosen (for instance, P(H1|X1) = 0); and P(Ci,Xi) = P(Ci)P(Xi) because Ci and Xi are independent events (the player does not know where the car is in order to make a choice).
I still don't understand why P(H3|X1) = 1/2. I understand P(H3|X1) as the probability that the host will open door 3 given that the player chooses door 1 (and the car is inside door 1). Does the probability of 1/2 indicate that the host will either open door 2 or door 3? But I thought H3 is the event the host will open door 3? What am I missing?




Let's start with very minimal assumptions -- nothing about how the host chooses a door:$$ P(C1)=P(C2)=P(C3)=\tfrac{1}{3}\\ P(C1,C2)=P(C1,C3)=P(C2,C3)=0\\ P(Xi|Cj)=P(Xi) \forall i, j\\ P(Hi|Xi)=0 \\ P(Hi|Ci)= 0 $$
Given the situation in the article, we want $P(C1|X1, H3)$ and $P(C2|X1, H3)$.
$$P(C1|X1, H3)=\frac{P(H3, X1|C1) P(C1) }{P(X1, H3)}\\ P(H3, X1|C1)=P(H3|X1,C1)P(X1|C1)\\ P(X1, H3)=P(H3|X1)P(X1)\\ P(C1|X1, H3)=\frac{P(H3|X1,C1)P(X1|C1)P(C1)}{P(H3|X1)P(X1)} $$
The same formulas apply for $C2$. By our initial assumptions, we get some cancellation: $$ P(C1|X1, H3)=\frac{P(H3|X1,C1)\tfrac{1}{3}}{P(H3|X1)}\\ P(C2|X1, H3)=\frac{P(H3|X1,C2)\tfrac{1}{3}}{P(H3|X1)} $$ $P(H3|X1,C2)=1$ (host can't open the door with the car behind it), so:$$ P(C2|X1, H3)=\tfrac{1}{3}\frac{1}{P(H3|X1)} $$
Since $C1$, $C2$, and $C3$ are mutually exclusive and sum to 1, $P(H3|X1)=P(H3|X1,C1)P(C1)+P(H3|X1,C2)P(C2)+P(H3|X1,C3)P(C3)$
$P(H3|X1,C2)=1$ and $P(H3|X1,C3)=0$ so $P(H3|X1)=P(H3|X1,C1)P(C1)+P(C2)=\tfrac{1}{3}(P(H3|X1,C1)+1)$
If $P(H3|X1,C1)=\tfrac{1}{2}$, then $P(H3|X1)=\tfrac{1}{2}$ -- but only in that case. If the host hates door 3, and never chooses it unless they have to, $P(H3|X1,C1)=0$ and $P(H3|X1)=\tfrac{1}{3}$.
This makes for:$$ P(C2|X1, H3)=\frac{1}{(P(H3|X1,C1)+1)}\\ P(C1|X1, H3)=\tfrac{1}{3}\frac{P(H3|X1,C1)}{P(H3|X1)}=\frac{P(H3|X1,C1)}{(P(H3|X1,C1)+1)} $$
This looks like a pretty clear dependence on the host's strategy -- why?
Let's look at it from another angle: if the host and player were in cahoots, but couldn't communicate except through the game (but could coordinate in advance) -- could the host give the player a hint, through their choice of door?
Suppose the host always opens the lowest numbered door they can. In that case, we have:
If player picks 1, and the host responds 2 (X1, H3), the player would know that the car is behind 2 (C2) for sure.
Knowing nothing about the host's strategy, the player should use $1/2$ -- but that's not entirely satisfying -- because it seems like the host can influence the player's chances!
We can take a step back in the game, and look at the odds of the player winning, from the host's perspective. Call their final choice $Y$; take $X1$ as a given.
$$ P(Y1, X1, C1)+P(Y2, X1, C2)+P(Y3, X1, C3)=P(Y1, H2, X1, C1)+P(Y1, H3, X1, C1)+P(Y2, H3, X1, C2)+P(Y3, H2, X1, C3)=P(Y1| H2, X1, C1)P(H2, X1, C1)+P(Y1|H3, X1, C1)P(H3, X1, C1)+P(Y2|H3, X1, C2)P(H3, X1, C2)+P(Y3| H2, X1, C3)P(H2, X1, C3)\\ =P(Y1| H2, X1, C1)P(H2|X1, C1)P(X1,C1)+P(Y1|H3, X1, C1)P(H3| X1, C1)P(X1,C1)+P(Y2|H3, X1, C2)P(H3| X1, C2)P(X1,C2)+P(Y3| H2, X1, C3)P(H2| X1, C3)P(X1,C3) $$ Using $P(X1)=1$ and simplifying the cases where the host has no choice:$$ P(Y1, X1, C1)+P(Y2, X1, C2)+P(Y3, X1, C3)=P(Y1| H2, X1, C1)P(H2|X1, C1)\tfrac{1}{3}+P(Y1|H3, X1, C1)P(H3| X1, C1)\tfrac{1}{3}+P(Y2|H3, X1, C2)\tfrac{1}{3}+P(Y3| H2, X1, C3)\tfrac{1}{3} $$ $P(Y1| H2, X1, C1)$ and $P(Y1|H3, X1, C1)$ are both "keep the same door" for the player. Say the player does that with probability $x$. Then the other two terms are "remaining door," chosen with probability $1-x$.
Then: $$ P(Y1, X1, C1)+P(Y2, X1, C2)+P(Y3, X1, C3)=\tfrac{1}{3}(x (P(H2|X1, C1)+P(H3| X1, C1))+2(1-x)) $$
$P(H2|X1, C1)+P(H3| X1, C1)=1$ because the host has to choose one of H2 or H3. This leaves $\tfrac{1}{3}(2-x)$ as the odds of winning. This is maximized by $x=0$, regardless of how the host chooses a door.