intro practice · coding problem
Correlation pitfalls
Dataset: ice cream sales and drowning deaths are strongly correlated (r≈0.9). (a) Does ice cream cause drowning? (b) Name the lurking variable. (c) When would correlation still be useful for engineers?
The mechanism
Descriptive stats compress a dataset into a few numbers you can reason about. Mean chases outliers; median resists them. Correlation measures linear co-movement, not causation — and breaks under nonlinearity.
Expected evidence
(a) No — correlation ≠ causation. (b) Summer/temperature drives both. (c) Feature screening, anomaly pairs, quick linear sanity checks — never causal claims.
Try this drill in the practice workspace →
Hints when you need them
- Look for a confounder that affects both series.
- Correlation measures linear co-movement only.
Watch for these mistakes
- Using mean on heavy-tailed latency data
- Treating correlation as causation
- Reporting precision without sample size