Case-based lecture: you attempt, we discuss, then we reveal.
cs-109, cs-110, cs-111, cs-112, cs-135Salaries 30k, 32k, 35k, 38k, 200k. Which summary survives, and how would each be (mis)used?
sal = [30, 32, 35, 38, 200]
mean = sum(sal) / len(sal)
sorted_sal = sorted(sal)
median = sorted_sal[len(sorted_sal) // 2]
print(mean, median)Expected: mean 67k, median 35k - the 32k gap is the skew alarm
Cost: O(n) mean, O(n log n) median by sorting (O(n) selection exists - enrichment).
A price rises 20%, then falls 20%. Back to the start? And: churn fell from 10% to 8% - is that '2%' or '20%' better?
price = 100 * 1.20 * 0.80
points = 10 - 8
relative = (10 - 8) / 10
print(price, points, relative)Expected: price ends at 96 (not 100); churn: -2 points = -20% relative
Cost: O(1); the skill is vocabulary discipline, not arithmetic.
Waiting times (minutes): 684 customers' experiences compress to: most wait 2, a few wait 60+. Report honestly: which average, and what must accompany it?
waits = [2, 2, 2, 3, 4, 5, 60, 70]
med = sorted(waits)[len(waits) // 2]
mean = sum(waits) / len(waits)
tail = sum(1 for w in waits if w > 30) / len(waits)
print(med, round(mean, 1), tail)Expected: median 3 min, mean 18.5 min, 25% wait over 30 min
Cost: O(n log n) with the sort; all three summaries from one pass over sorted data.
One billionaire joins a 9-person seminar: the mean salary explodes. Mean vs median, when each is honest, and how to state them.
**Input:** salaries 9 x 30k + 1 x 5,000,000**Output:** mean 527k (honest but useless here); median 30k; report both or median only, with the distributionSolve 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-109 — not embedded in this deck.
'Sales up 50% then down 40%' — why that's a net gain, not a loss. Percentage bases; then reconstruct a table from percentage claims.
**Input:** sales 100 -> up 50% -> 150 -> down 40% -> 90; two claims 'up 50, down 40'**Output:** net change 100 -> 90 = -10%; bases differ (150 for the fall) - percentages never add across different basesSolve 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-110 — not embedded in this deck.
Buses every 10 minutes, yet average wait is 15. Why your sample differs from the schedule's average (length-biased sampling), and the fix.
**Input:** buses every 10 min exactly; you arrive at a random minute**Output:** your expected wait 5 min if you believe the schedule; with bunching (headways 2,2,26 avg 10), rider average = (2^2+2^2+26^2)/(2*30) = 11.4 minSolve 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-111 — not embedded in this deck.
A dashboard shows 'average response time 2s'. Find three honest-but-misleading framings and redesign the summary. Communication as a design problem.
**Input:** dashboard: 'average response time 2s' hiding a bimodal 0.2s/8s split**Output:** redesigns: median + p95, separate fast/slow paths, distribution sparkline - each tells the truth the mean hidesSolve 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-112 — not embedded in this deck.
A team builds a study-hours → pass/fail predictor for 40 students and reports: *"test accuracy computed on 20 held-out rows."* Their pipeline:
**Input:** the eight-row dataset; the two standardisation choices**Output:** leaky: scaled −0.0945 → fail — correct: scaled +0.4082 →pass — the same student, two decisionsSolve for the worked instance first. Then ask what would change if onePseudocode, 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-135 — not embedded in this deck.