liveBook · Manning

Stay strategy

As explained in Causal AI

A stay strategy is a game strategy in which the contestant retains the initially selected door.

A stay strategy keeps the contestant’s initially selected door after the host reveals another door containing a goat. In the standard three-door Monty Hall setup, staying wins with probability one-third, while switching wins with probability two-thirds. The host’s informed choice—not a random elimination—preserves the original one-third versus two-thirds asymmetry. section 6.3.1

Model the strategy as a decision variable connected to the game’s causal workflow:

  • The player makes an initial choice. section 6.3.3
  • The host selects a losing door that differs from the initial choice. section 6.3.3
  • Under stay, the second choice remains the initial door; the outcome is then determined by that choice and the car’s location. section 6.3.3 section 9.2.2

Conditional counterfactual

If a contestant stayed and lost, the initial door could not contain the car. The host therefore opened the only losing alternative available, so switching would have won with probability 100% in that realized case. section 9.2.4

Listing 9.10 Infer the counterfactual distributions
cf_model = do(twin_world_graph, {'Strategy Hyp': 'switch'})     #1
infer = VariableElimination(cf_model)    #2

cf_dist1 = infer.query(     #3
    ['Win or Lose Hyp'],    #3
    evidence={'Strategy': 'stay', 'Win or Lose': 'lose'}    #3
)   
print(cf_dist1)

cf_dist2 = infer.query(    #4
    ['Win or Lose Hyp'],    #4
    evidence={'Win or Lose': 'lose'}    #4
)   
print(cf_dist2)

Inspect the pgmpy query that intervenes on a hypothetical switch strategy while conditioning on observed stay and loss. section 9.2.4

How Causal AI covers it

How deep it goes
Defines the probability contrast and implements deterministic strategy logic, then extends it to counterfactual inference.
Examples
Uses a three-door car-and-goat game, deterministic conditional probability tables, pgmpy queries, and observed-loss counterfactuals.
What it assumes
Assumes basic probability and door-choice rules while making host behavior, strategy, and outcome functions explicit.
What you can do after
Evaluate the stay strategy’s one-third win probability and query its counterfactual alternatives with pgmpy.
How it connects
Connects to Monty Hall problem, structural causal models, Bayesian networks, counterfactual reasoning, and variable elimination.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal AI. The section links point to the parts of the book it draws on.