cs-102 — The Double-Click Question
| Field | Value |
|---|---|
| id | cs-102 |
| difficulty | Foundational |
| topics | probability, independence |
| lecture | lecture-26 |
| estimated time | 5-minute attempt + 10-minute discussion |
| prerequisites | lectures 1-2 (problem framing, precise pseudocode) |
| objective | recognise the pattern, translate it into precise steps, and trace it correctly |
| solution | held by the instructor; discussed after the attempt |
Problem
If 4% of clicks are accidental and 10% of clicks are on ads, what's the range for both-at-once? Bounds without independence; exact value with it.
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: P(accidental) = 0.04, P(ad click) = 0.10
- Output: P(both) is between max(0, 0.04+0.10-1)=0 and min(0.04, 0.10)=0.04; with independence: 0.004
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
- Without independence only BOUNDS are honest. State them, then state what independence would add.
- '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: "Where exactly did the wrong counts double-count — point at the pair."
Constraints and assumptions
- Difficulty: Foundational (early-semester techniques assumed: precise statements, traces, simple loops).
- Topics: probability, independence.
- Classroom-scale inputs unless the problem says otherwise.
- Time-box: about five minutes; naming the pattern and stating the assumption is already a pass, completing the calculation is the stretch.
- 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.