Statistics for Sports Data
The measurement toolkit: distributions, z-scores, percentiles, outliers, time series — closing with what actually predicts winning.
Sports arguments are statistics arguments in disguise. This course builds the measurement vocabulary — what a distribution is, when a mean lies, how to standardize across eras, where a hot streak is real and where it's noise — always computed by you, on real data, never quoted from authority.
It ends deliberately on correlation and regression: after ten tutorials of describing data, the capstone asks the question every fan actually cares about — which numbers predict winning, and how would you know?
What you'll be able to do
- Summarize any stat honestly: center, spread, shape, outliers
- Standardize with z-scores and percentiles to compare across teams and eras
- Smooth time series with rolling windows and EWMA without erasing the signal
- Run and read a regression, and know its limits
The bundle contains each part's finished script, the shared helpers, and the sample data they read, with a README listing the run order - the whole course works offline.
The syllabus
Pace: Sequential through part 8; the time-series pair and the regression capstone close it out. Three weeks at a sitting each.
0 of 11 parts marked complete on this device.
Every part of this course is marked complete on this device. The capstone below is the victory lap - and the quiz will tell you if anything slipped.
- Summary Statistics and Distributions with pandasCenter, spread and shape - the three questions to ask any column first.
- Box Plots: Comparing Distributions Across GroupsThe five-number summary as a picture; comparisons come free.
- Standardize Stats with Z-Scores: Compare Columns on One ScaleThe universal translator: any stat, any era, one scale.
- Percentile Ranks and Tiers: Locate a Team in the DistributionWhere a value sits in the pack, in units everyone understands.
- Binning Continuous Data into Categories with pd.cut()Continuous to categorical, honestly - tiers without cherry-picking.
- The ECDF: Read Any Percentile Off a Cumulative CurveThe whole distribution in one curve, no bins to argue about.
- Measuring Inequality: Lorenz Curves and the Gini CoefficientHow concentrated is scoring? Inequality has a number.
- Outlier Detection: IQR Fences and the Modified Z-ScoreA defensible rule for 'weird', instead of squinting at it.
- Rolling Averages and Form: Time-Series Basics for SportsForm is a moving window; learn what the window hides.
- Exponentially Weighted Averages: Form That Weights Recent Games MoreRecency weighting done right - and when it beats a plain rolling mean.
- Correlation and Regression: What Actually Predicts Winning?The capstone question: which numbers actually predict winning?
Check yourself
Five questions, graded on the page, nothing recorded anywhere - pick an answer and the explanation appears.
1. In a distribution with a long right tail, the mean sits…
The tail drags the mean toward it. Big right-tail values pull the mean above the median - which is why salary data quotes medians.
2. A z-score of +2 means the value is…
z = (x − mean) / sd. It's a distance in standard deviations - the percentile depends on the distribution's shape.
3. The 75th percentile is…
Percentiles are rank statements about the data itself - no distribution assumption, no formula involving the mean.
4. IQR-based outlier fences beat mean-and-sigma fences when…
Means and standard deviations are themselves dragged by outliers; quartiles aren't. Robust data gets robust fences.
5. Shots and goals correlate at r = 0.9. That means…
r measures how tightly points hug a line - not causation, not a percentage of anything, and not the slope.
Where next: Randomness, Inference & Simulation · Machine Learning from Scratch.