cs-100 — The Survey Skew
| Field | Value |
|---|---|
| id | cs-100 |
| difficulty | Expert |
| topics | data, bias, design |
| lecture | lecture-25 |
| estimated time | 5-minute attempt + 10-minute discussion |
| prerequisites | the full Block I-III toolbox and proof-shaped reasoning |
| objective | make and justify design decisions where the method itself is the challenge |
| solution | held by the instructor; discussed after the attempt |
Problem
A survey over-represents one hall of residence. Show how naive averages mislead, then reweight (or segment) to a fairer summary.
Your deliverable is the stated assumptions, the naive and reweighted summaries side by side, and one sentence on what the weighting assumes. 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: hall weights: north 500 students sampled 200, south 300 sampled 50, east 200 sampled 50; satisfaction yes-rates 0.6, 0.5, 0.7
- Output: naive mean 0.6; weighted (by population) = (500.6 + 300.5 + 200*.7)/1000 = 0.59; segment-wise reporting also valid
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
- The sample over-represents north. Either reweight to the population or report per hall - never the raw average.
- Writing the rules IS the solution; code is transcription.
- Every assumption is a place where two good answers can differ.
Discussion starter
After the solution is revealed, the class spends five minutes on this prompt: "Which assumption would you attack first if you had to argue the other side?"
Constraints and assumptions
- Difficulty: Expert (independent design decisions and proof-shaped arguments assumed).
- Topics: data, bias, design.
- Classroom-scale inputs unless the problem says otherwise.
- Time-box: about five minutes for the attack plan; the full argument may exceed the box - outline the proof strategy instead of grinding details.
- 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: Find the aggregation that answers a different stakeholder's question.