Skip to content
Insider Magazin
Resources

Statistics · 8 min read

Descriptive Statistics Explained

Mean, median, mode, quantiles, interquartile range and skewness: what each measure captures, how type-7 quantile interpolation works, and how robust each statistic is to outliers, with a fully worked example.

Introduction

Descriptive statistics compress a set of observations into a handful of numbers that describe its centre, its spread and its shape. They do not explain why the data look the way they do, and they make no claims beyond the observations at hand. Used well, they are the fastest way to understand a dataset and to communicate it to others. Used carelessly, a single number such as the mean can hide most of what matters.

This article covers the measures reported in a typical summary table: the mean, median and mode; quantiles and the interquartile range; and skewness. Throughout, we use one small dataset so every number can be checked by hand, and we look at what happens when a single extreme value is present.

The example is ten daily first-response times in minutes, sorted: 12, 14, 15, 15, 16, 18, 19, 21, 24, 58. For comparison we also use a version in which the last value is 26 instead of 58.

Measures of centre: mean, median and mode

Arithmetic mean

x̄ = (1/n) · Σ xᵢ
The sum of the observations divided by their number.

The ten values sum to 212, so x̄ = 21.2 minutes. The mean uses every observation and has convenient mathematical properties: deviations from it sum to zero, and it minimizes the sum of squared deviations. Its weakness is sensitivity to extreme values. Replace 58 by 26 and the sum falls to 180, so the mean drops to 18.0. One observation out of ten moved the mean by 3.2 minutes.

Median

The median is the middle value of the sorted data. With an even number of observations, it is the average of the two middle values. Here the fifth and sixth values are 16 and 18, so the median is 17 minutes, in both versions of the dataset. The median depends only on the order of the values near the middle, so it is unaffected by how extreme the largest value is.

Mode

The mode is the most frequent value: 15, which appears twice. For discrete data with few distinct values the mode is informative (the most common number of items per order, for instance). For continuous data recorded with fine precision, nearly every value is unique and the mode is either undefined or meaningless; the modal class of a histogram is more useful, and it depends on the bin width.

When mean and median differ noticeably, the distribution is asymmetric. Here the mean (21.2) sits well above the median (17) because of the long right tail. Reporting both is a cheap and effective way to signal skew.

Quantiles and type-7 interpolation

The p-quantile is a value below which a proportion p of the data lies. The quartiles Q1, Q2 (the median) and Q3 correspond to p = 0.25, 0.5 and 0.75. For a finite sample the definition is ambiguous: the 25th percentile of ten values usually falls between two observations, and there are several reasonable ways to interpolate.

Hyndman & Fan (1996) catalogued nine sample quantile definitions used by statistical software. Insider Magazin uses type 7, which is the default in R and NumPy and matches Excel's QUARTILE.INC. It interpolates linearly between the two order statistics that bracket the position h:

h = (n − 1) · p + 1 Q(p) = x₍⌊h⌋₎ + (h − ⌊h⌋) · (x₍⌊h⌋+1₎ − x₍⌊h⌋₎)
Type-7 quantile. x₍ₖ₎ is the k-th smallest observation (1-indexed).
QuantilePosition hBracketing valuesResult
Q1 (p = 0.25)9 × 0.25 + 1 = 3.25x₍₃₎ = 15, x₍₄₎ = 1515 + 0.25 × 0 = 15.0
Median (p = 0.5)9 × 0.5 + 1 = 5.5x₍₅₎ = 16, x₍₆₎ = 1816 + 0.5 × 2 = 17.0
Q3 (p = 0.75)9 × 0.75 + 1 = 7.75x₍₇₎ = 19, x₍₈₎ = 2119 + 0.75 × 2 = 20.5
Type-7 quartiles of the ten response times.

Other definitions give other answers. Type 6 (used by Minitab and SPSS, and by Excel's QUARTILE.EXC) uses the position h = (n + 1) · p, which gives Q1 = 14.75 and Q3 = 21.75 for the same data. Neither is wrong; they are different conventions. The differences shrink as n grows, but for small samples it is worth knowing which definition a tool uses before comparing its output with another.

Spread: range, IQR and standard deviation

The range (max − min) is 58 − 12 = 46 minutes. It is determined entirely by the two most extreme values, which makes it the least robust measure of spread.

The interquartile range covers the middle half of the data:

IQR = Q3 − Q1 = 20.5 − 15.0 = 5.5 minutes
The spread of the central 50% of observations.

The IQR is identical for both versions of the dataset, because neither 58 nor 26 affects the quartiles. The sample standard deviation, by contrast, is 13.41 with the extreme value and 4.52 without it. A single observation nearly tripled it. (The article on variance and standard deviation covers the n − 1 denominator and its interpretation.)

Tukey's fences

Tukey's box plot uses the IQR to flag unusual values. Observations more than 1.5 IQR below Q1 or above Q3 are drawn individually as potential outliers; the whiskers extend to the most extreme values inside these fences.

lower fence = Q1 − 1.5 · IQR = 6.75 upper fence = Q3 + 1.5 · IQR = 28.75
Fences for the example data.

The value 58 lies well beyond the upper fence and is flagged; the upper whisker ends at 24, the largest value inside the fence. In the version with 26, nothing is flagged. A flag is a prompt to investigate, not a verdict. The long response may be a data error, or it may be the most important observation in the set.

Shape: skewness

Skewness quantifies asymmetry. Positive skew means a longer right tail (a few large values), negative skew a longer left tail. Insider Magazin reports the adjusted Fisher–Pearson coefficient G1, the definition used by most statistical packages:

g₁ = m₃ / m₂^(3/2) G₁ = √(n(n − 1)) / (n − 2) · g₁
mₖ = (1/n) · Σ (xᵢ − x̄)ᵏ is the k-th central sample moment. G1 requires n ≥ 3.

For the example, G1 ≈ 2.77 with the value 58 and ≈ 0.62 with 26. Both indicate right skew, but the first is driven almost entirely by one observation. Because skewness uses cubed deviations, it is even more sensitive to extreme values than the standard deviation. As a rough guide, |G1| below about 0.5 indicates mild asymmetry and values above 1 strong asymmetry, but with small samples the estimate itself is unstable and should be read alongside a histogram or box plot.

Right-skewed data are common wherever values are bounded below and unbounded above: durations, prices, file sizes, waiting times. For such data the median and IQR are usually better headline figures than the mean and standard deviation.

Robustness at a glance

The table summarizes how each statistic responded when one value out of ten changed from 26 to 58.

StatisticLast value 26Last value 58Robust to the outlier?
Mean18.021.2No
Median17.017.0Yes
Mode1515Yes
Q1 / Q315.0 / 20.515.0 / 20.5Yes
IQR5.55.5Yes
Range1446No
Standard deviation4.5213.41No
Skewness G10.622.77No
Coefficient of variation25.1%63.2%No
Type-7 quartiles; sample standard deviation with n − 1.

A useful concept here is the breakdown point: the fraction of observations that can be made arbitrarily large before a statistic becomes arbitrarily large. The mean has a breakdown point of 0 (one bad value is enough), the median 50%, and the IQR 25%. Robust statistics are not always preferable, since they discard information about the tails, but they are safer as defaults when data quality is uncertain.

Common pitfalls

A summary is not the data

Very different datasets can share the same mean and standard deviation. Anscombe's quartet is the classic demonstration. Always look at a histogram or box plot before relying on summary statistics, and report a measure of spread with every measure of centre.

  • Averaging averages. The mean of group means equals the overall mean only when groups are the same size. Otherwise, weight by group size or recompute from the observations.
  • Comparing quantiles across tools without checking the quantile definition.
  • Removing outliers automatically. Exclude values only for a documented reason, such as a confirmed recording error, and report how many were excluded.
  • Reporting excessive precision. A median of 17.0347 minutes from data recorded to the nearest minute implies accuracy the data do not have.

Descriptive statistics in the workspace

The distributions view reports n, mean, median, standard deviation, variance, minimum, maximum, Q1, Q3, IQR, skewness (G1) and coefficient of variation for the current selection, with box plots per category using Tukey whiskers at 1.5 × IQR. The histogram marks the mean and median so that skew is visible at a glance.

Compare robust and non-robust measures on the illustrative datasets in the interactive demo; the support-response dataset is deliberately right-skewed. All formulas, including the type-7 quantile, are listed in the methodology, and the documentation describes the summary table column by column.

Bring clarity to your analytical workflow.

See the workspace with your own questions in mind. A walkthrough takes about 30 to 45 minutes and is followed by a written proposal if the platform is a fit.