NapkinCalc

Statistics — Describing & Inferring

z-scores — how unusual is a value?

continues from lesson 2 — values defined earlier in the course stay live here

ELI5: a z-score rescales any value into "how many standard deviations from the mean": z = (x − mean) / std. A z of 0 is dead average; z = 2 is unusually high (top ~2.5%).

zdemo=80705z_{demo} = \frac{80 - 70}{5} = 22 a score of 80 when mean = 70, std = 5
✓ pass zdemo==2z_{demo} == 2 two standard deviations above average

Real-world hook: z-scores standardize test results across different exams, flag anomalies in fraud detection, and underlie every hypothesis test ("is this result too far out to be chance?").

Try it yourself: a value of 90, where the mean is 75 and the standard deviation is 10. What is its z-score?

zyou=907510z_{you} = \frac{90 - 75}{10} = 1.50001.5000 ✏️ Your turn: compute z = (x − mean)/std = (90 − 75)/10.
✓ pass abs(zyou907510)<109\mathrm{abs}\left(z_{you} - \frac{90 - 75}{10}\right) < 10^{-9} green when your z-score is correct

Where next: Discrete Mathematics — the logic, counting, and number theory that computer science is built on.