cs-103 — The Grid Decision Review
| Field | Value |
|---|---|
| id | cs-103 |
| difficulty | Intermediate |
| topics | conditional probability, false positives |
| lecture | lecture-26 |
| estimated time | 5-minute attempt + 10-minute discussion |
| prerequisites | loops, lists, and tracing from lectures 1-6 |
| objective | choose the technique, trace it faithfully, and defend the boundary behaviour |
| solution | held by the instructor; discussed after the attempt |
Problem
A rare-condition flagger: 99% accurate, 1-in-1000 prevalence. Compute the chance a flagged person actually has it. The counterintuitive base-rate classic.
Your deliverable is the count (or probability) with the sample space stated, the case analysis, and a brute-force check for a small instance. If the problem is ambiguous anywhere, state the assumption you are making and carry on — a stated assumption is part of a good answer.
Examples
- Input: prevalence 1/1000; flagger: sensitivity 99%, false-positive rate 1%
- Output: P(condition | flagged) = 0.990.001 / (0.990.001 + 0.01*0.999) ~ 9.0%
Solve for the worked instance first. Then ask what would change if one number, name, or condition were replaced by something stranger.
What to notice
- Draw the 100,000-person table: 100 sick (99 flagged), 99900 healthy (999 flagged). Count before believing.
- 'How many total, how many favourable' is the whole skeleton of probability.
- Complements turn hairy unions into one subtraction.
Discussion starter
After the solution is revealed, the class spends five minutes on this prompt: "When is enumeration a legitimate answer rather than a crutch?"
Constraints and assumptions
- Difficulty: Intermediate (loops and lists assumed).
- Topics: conditional probability, false positives.
- Classroom-scale inputs unless the problem says otherwise.
- Time-box: about five minutes for the plan and trace; finishing the details is a bonus, defending the method is the target.
- Optional stretch (not required): describe an alternative approach and say when it beats the obvious one.
Hints and extension
- First nudge: identify the pattern the worked instance uses before computing anything.
- If stuck after three minutes, write the input/output line you expect and trace the smallest example by hand.
- After the reveal, attempt the extension below before the next lecture.
- Extension challenge: Compute both conditionals from your table and explain the denominator swap.