Mathematics · intro

Descriptive Statistics

Summarizing data: mean, median, variance, correlation, and when each summary lies.

mathematicsstatistics

Mental model

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.

How to study Descriptive Statistics

Begin by restating the mental model in your own words, then connect it to a concrete system you have built or operated. Name the mechanism, the constraint it addresses, and the trade-off it introduces. Use Khan Academy — Statistics, Introduction to Modern Statistics — Ch. 5: Exploring numerical data to check details, but close the source before writing your explanation. Retrieval is the learning step; rereading is only preparation.

Next, compare Descriptive Statistics with Random Variables & Distributions, Linear Regression, Estimation & Confidence Intervals. Ask what changes in correctness, latency, resource use, operability, and failure recovery. Complete Summarize a small dataset, Correlation pitfalls and preserve the command, input, output, and one failed attempt as evidence. Finish by explaining the idea without jargon to someone who has not studied the track.

Proof of understanding

  • Explain the mechanism from first principles and identify the state it reads or changes.
  • Give one situation where the concept is the right choice and one where it is not.
  • Predict a realistic failure mode before running the drill, then compare the prediction with evidence.
  • Connect the result to a roadmap or build artifact instead of treating the concept as isolated trivia.

Where it matters

Dashboards, experiment readouts, data profiling before modeling.

Common mistakes

  • Using mean on heavy-tailed latency data
  • Treating correlation as causation
  • Reporting precision without sample size

Learn from primary sources

Practice and explain it back

Summarize a small dataset

Latency samples (ms): 12, 14, 15, 16, 200. Compute mean, median, and sample standard deviation. Which summary is misleading for SLA reporting and why?

Expected evidence: Mean ≈ 51.4 (pulled by outlier), median = 15 (robust), std dev is large. Report median + p95 for SLAs, not mean.

Open the interactive drill →

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?

Expected evidence: (a) No — correlation ≠ causation. (b) Summer/temperature drives both. (c) Feature screening, anomaly pairs, quick linear sanity checks — never causal claims.

Open the interactive drill →

Review prompts

  • When should you report median instead of mean?
  • Why does correlation not imply causation?

Build evidence

Implement mean, variance, correlation from scratch

On a real CSV (or synthetic data), compute mean, variance, std dev, covariance, and Pearson r without pandas/numpy — loops only.

  • Functions: mean, variance (sample), covariance, correlation
  • Spot-check against a calculator on 5 hand-picked pairs
  • Document when you would use median instead of mean on this dataset

Prerequisites

None assigned yet.

Related concepts

Learning paths