cs-109 — The Salary Parable
| Field | Value |
|---|---|
| id | cs-109 |
| difficulty | Beginner |
| topics | mean vs median, skew |
| lecture | lecture-28 |
| estimated time | 5-minute attempt + 10-minute discussion |
| prerequisites | none |
| objective | state inputs, outputs, and assumptions, then solve a small instance by hand |
| solution | held by the instructor; discussed after the attempt |
Problem
One billionaire joins a 9-person seminar: the mean salary explodes. Mean vs median, when each is honest, and how to state them.
Your deliverable is the stated assumptions, mean and median computed and contrasted on the worked instance, and one sentence on who benefits from reporting only the mean. 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: 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 distribution
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
- One extreme point drags the mean; the median ignores magnitude. Neither is 'wrong' - the choice must be stated.
- 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: "Propose one extra rule that would change the verdict — is it an improvement?"
Constraints and assumptions
- Difficulty: Beginner (no prior experience assumed).
- Topics: mean vs median, skew.
- Classroom-scale inputs unless the problem says otherwise.
- Time-box: about five minutes for a first attempt; partial answers with clear reasoning are worth more than silent struggling.
- 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: Write the two honest headlines for this summary and their audiences.