The concept of the problem is well known. So, in short for not to waste your time guys:
- $A$ - behind the door #1 there's a car
- $B$ - Monty opens the door #3
- $C$ - behind the door #2 there's a car
$P(A|B) = \frac{P(A \cap B)}{P(B)} = \frac{P(B|A)P(A)}{P(B|A)P(A)\ +\ P(B|C)P(C)} = \frac{\frac{1}{2}\cdot\frac{1}{3}}{\frac{1}{2}\cdot\frac{1}{3}\ +\ \frac{1}{2}\cdot\frac{1}{3}} = \frac{1}{2}$
Comments: I assume that the probability that behind a door there's a car to equal $\frac{1}{3}$ because there's 3 possible arrangements. Also I assume that the events "Car Behind Door #N" make a partition of the sample space, that's how I derived the denominator.
Could you help me to understand where the flaw in my formulation. I think about it 10 hours and have not got further than this... Thanks!
The flaw is in the fact that Monthy knows what's behind the doors and he MUST choose a door that doesn't end the game directly. So the probability of opening door $3$ given the car is behind door $2$ is 100%; because he can't open door $1$ and $2$.
So
$$P(B|C) =1 $$i.e.$$\frac{\frac{1}{2}\cdot\frac{1}{3}}{\frac{1}{2}\cdot\frac{1}{3}\ +\ 1\cdot\frac{1}{3}} = \frac{1}{3}$$