The game of Let's Make A Deal proceeds as follows;
The player is given the choice of three doors: Behind one door is a car; behind the others, goats. The player picks a door, say No. 1, and the host, either immediately opens that door or opens another door, say No. 3, which might have the car or a goat. If the host opens door No. 3 and it has a goat behind it, he then offers the player the choice, "Do you want to pick door No. 2?"
The game play is guided by the following set of rules:
In order to manipulate the game play, the host does not always (uniformly) randomly hide the car behind the doors. Instead, based on previous games statistics, the host determines the probability Pc.
Pc = [pc_1 pc_2 pc_3] pc_i is the probability of the host placing car behind door i.
If the player initially picks door D, then the host's choice of which door to open is represented by a conditional probability matrix Ph
Ph = [ ph_11 ph_12 ph_13 ph_21 ph_22 ph_23 ph_31 ph_32 ph_33 ]
In the above matrix, ph_ij represents the probability that the host opens door j given that the car is behind door i.
Interpreting the matrix in terms of the assumptions implies that all elements ph_ij of the conditional probability matrix can be nonzero with the constraint that
ph_i1 + ph_i2 + ph_i3 = 1 i.e. the host must always open a door to reveal the car or a goat.
On the game show, the host places the car behind a door with probability Pc in order to manipulate the outcome. The player then choose door D and the host, Monty Hall, opens door H using the conditional probability Ph.
If the door H opened by the host has a goat behind it, what is the probability Pws that the player will win the car by switching the initial door choice to the door remaining?
If switching option is not available (i.e. host always opens a door with the car behind it) return NaN.