Case-based lecture: you attempt, we discuss, then we reveal.
cs-121, cs-122, cs-123, cs-124Carry an umbrella (mild inconvenience, cost 2) or not. Rain ruins the day (cost 10). Forecast says 30% rain. What does expected cost say, and when does it flip?
p = 0.3
ev_carry = 2
ev_leave = p * 10
flip = 2 / 10
print(ev_carry < ev_leave, flip)Expected: carry the umbrella (EV 2 vs 3); ranking flips below 20% rain chance
Cost: O(1) per decision; the tree's value is in forcing outcomes OUT of the prose.
Three doors, one prize. You pick door 1; the host opens door 3 (empty). Should you switch to door 2?
stay_wins = switch_wins = 0
for prize in (1, 2, 3):
if prize == 1:
stay_wins += 1
else:
switch_wins += 1
print(stay_wins, switch_wins)Expected: switch: wins 2/3 vs staying 1/3
Cost: O(1) enumeration; the simulation version is O(trials) and validates the tally.
Insurance costs 50; the insured event (probability 1%) costs 4000. EV says decline (-50 vs -40 expected loss). Why do rational people buy, and what decision rule are they using?
ev_buy = -50
ev_skip = 0.01 * -4000
print(ev_buy, ev_skip, ev_buy < ev_skip)Expected: EV(buy) -50 vs EV(skip) -40: insurance loses on EV, wins on ruin-avoidance
Cost: O(1); the hard part is admitting which rule you chose.
Carry an umbrella or not under a 30% rain chance with asymmetric costs. Payoff table, expected values, and why the bigger loss dominates.
**Input:** rain 30%; umbrella: carry cost 2 (bother); caught in rain cost 10**Output:** EV carry = -2 always; EV leave = 0.7x0 + 0.3x(-10) = -3 -> carry wins despite 70% sunnySolve for the worked instance first. Then ask what would change if onenumber, name, or condition were replaced by something stranger.Pseudocode, flowchart or Python. State one assumption. Compare with your neighbour at minute 4.
Instructor: the reveal, the reasoning section and common wrong turns are in the instructor distribution for cs-121 — not embedded in this deck.
The three-door switch-or-stay problem, argued with an outcome table and then by simulation. Updating on new information.
**Input:** 3 doors, car behind one; host opens a goat door; switch or stay**Output:** stay wins 1/3; switch wins 2/3 - the host's knowledge is the hidden assumptionSolve for the worked instance first. Then ask what would change if onenumber, name, or condition were replaced by something stranger.Pseudocode, flowchart or Python. State one assumption. Compare with your neighbour at minute 4.
Instructor: the reveal, the reasoning section and common wrong turns are in the instructor distribution for cs-122 — not embedded in this deck.
Insurance costs more than expected loss. Why rational people still buy: variance, ruin, and utility in plain language. EV as a tool, not a god.
**Input:** phone worth 600; loss chance 10%/year; premium 80**Output:** EV loss = 60 << 80 premium: 'bad deal' by EV; still rational for ruin-aversion - EV is a tool, not the verdictSolve for the worked instance first. Then ask what would change if onenumber, name, or condition were replaced by something stranger.Pseudocode, flowchart or Python. State one assumption. Compare with your neighbour at minute 4.
Instructor: the reveal, the reasoning section and common wrong turns are in the instructor distribution for cs-123 — not embedded in this deck.
A sealed-bid popup quiz auction for the last textbook. Reason one level up from naive bids; introduce thinking about others' thinking.
**Input:** one textbook; bids sealed; value to you 40; others bid 10-35 unknown**Output:** second-price logic: bid your true value 40; bidding higher risks overpaying, lower risks losing cheaplySolve for the worked instance first. Then ask what would change if onenumber, name, or condition were replaced by something stranger.Pseudocode, flowchart or Python. State one assumption. Compare with your neighbour at minute 4.
Instructor: the reveal, the reasoning section and common wrong turns are in the instructor distribution for cs-124 — not embedded in this deck.