Learn mean, median, mode, variance, standard deviation, quartiles and robust summaries with practical interpretation. For summary statistics, the examples stay small enough for you to predict the result before execution. This page targets the practical intent behind summary statistics, not repetition of the phrase itself.
Editorial note: Publication metadata for Descriptive Statistics is intentionally unset until this URL is actually released; the lesson already includes its own examples, CSV and notebook.
Interpret summary statistics before reaching for a formula
If most customer orders are between $20 and $80 but a few enterprise orders exceed $20,000, median order value may represent the typical purchase better than the mean.
- Mean summarizes the arithmetic center, median resists extreme values, and mode identifies the most frequent value.
- Variance and standard deviation quantify spread around the mean, but their interpretation depends on units and distribution shape.
- Percentiles and the interquartile range are often more informative than mean and standard deviation for skewed data.
- A summary table should be paired with a plot because different distributions can share similar summary statistics.
Calculate a small case and verify it in Python
For summary statistics, predict one visible result before each snippet runs—a row count, shape, statistic, ranking or error pattern—then compare it with the printed checkpoint.
# summary statistics · example 1
import pandas as pd
s = pd.Series([20, 25, 25, 30, 35, 80, 20000])
print('mean', s.mean())
print('median', s.median())
print('std', s.std())
print('IQR', s.quantile(.75) - s.quantile(.25))summary statistics checkpoint 1: Run the cell and inspect the printed values before changing anything.
# summary statistics · example 2
import pandas as pd
import numpy as np
df = pd.read_csv('practice.csv')
x = df.select_dtypes('number').iloc[:,0].dropna()
print('n=', len(x), 'mean=', round(x.mean(),2), 'median=', round(x.median(),2))summary statistics checkpoint 2: n, mean and median are printed from the first numeric column.
# summary statistics · example 3
q1, q3 = x.quantile([0.25,0.75])
iqr = q3 - q1
print('std=', round(x.std(ddof=1),2), 'IQR=', round(iqr,2))summary statistics checkpoint 3: Standard deviation and IQR provide two different views of spread.
# summary statistics · example 4
rng = np.random.default_rng(42)
boot = [rng.choice(x, size=len(x), replace=True).mean() for _ in range(1000)]
print(np.percentile(boot,[2.5,50,97.5]).round(2))summary statistics checkpoint 4: The three values are the bootstrap 2.5th, 50th and 97.5th percentiles.
# summary statistics · example 5
x2 = pd.concat([x, pd.Series([x.max()*5])], ignore_index=True)
print('mean change:', round(x2.mean()-x.mean(),2))
print('median change:', round(x2.median()-x.median(),2))summary statistics checkpoint 5: The mean usually moves more than the median when one extreme value is added.
Stress-test the result against assumptions and outliers
Percentiles and the interquartile range are often more informative than mean and standard deviation for skewed data.
A summary table should be paired with a plot because different distributions can share similar summary statistics.
Self-check with answers
For summary statistics, what result should you be able to explain without the code?
Mean summarizes the arithmetic center, median resists extreme values, and mode identifies the most frequent value.
Which assumption matters most in this summary statistics exercise?
Percentiles and the interquartile range are often more informative than mean and standard deviation for skewed data.
What failure mode would make this summary statistics result untrustworthy?
A summary table should be paired with a plot because different distributions can share similar summary statistics.
Practise interpretation, not only arithmetic
Try it yourself workspace
Edit this summary statistics starter, copy it, and run it in the downloadable notebook or your local Jupyter environment.
Questions specific to this lesson
What does summary statistics help me decide?
Mean summarizes the arithmetic center, median resists extreme values, and mode identifies the most frequent value.
Which assumption should I check first for summary statistics?
A summary table should be paired with a plot because different distributions can share similar summary statistics.
Why should I calculate this by hand once for summary statistics?
For summary statistics, one small manual calculation exposes the meaning of each term and gives you a reference for checking library output.
How do I avoid misinterpreting the result for summary statistics?
Report the units, sample size and practical meaning alongside the number. A mathematically valid result can still answer the wrong question.
Primary references and further reading
For summary statistics, use these primary references when exact syntax, defaults or formal definitions matter beyond the examples on this page.





















































































































































