Descriptive Statistics: Central Tendency, Dispersion & Distribution Shapes

Before fitting a single predictive model, a data scientist must understand the structural properties of their data. Descriptive Statistics provides the mathematical language to summarize, quantify, and communicate the central tendency, dispersion, and shape of numeric features.

Normal Distribution and Statistical Dispersion

Figure 4.1: The Gaussian Normal Distribution with σ Boundaries and Central Tendency Measures.

1. Measures of Central Tendency

Central tendency identifies the single central value that best represents the location of an entire distribution:

  • Arithmetic Mean (\(\mu\) or \(\bar{x}\)): The mathematical center of mass: \[ \bar{x} = \frac{1}{n} \sum_{i=1}^{n} x_i \] Limitation: Highly sensitive to extreme values. A single outlier can shift the mean drastically.
  • Median: The middle score of an ordered array (50th percentile). If \(n\) is odd, it is the exact middle point; if \(n\) is even, it is the average of the two central numbers. Advantage: Completely robust against outliers.
  • Mode: The most frequently occurring value in a dataset. Particularly useful for categorical and discrete integer columns.

2. Measures of Dispersion & Spread

Two datasets can have identical means of 50 while representing completely different realities (e.g., [50, 50, 50] vs. [0, 50, 100]). Dispersion quantifies the variability across observations:

Metric Mathematical Formula Interpretation & Properties
Range \(\text{Max} - \text{Min}\) Crude overall spread. Extremely sensitive to minimum and maximum outliers.
Sample Variance (\(s^2\)) \(s^2 = \frac{1}{n-1} \sum (x_i - \bar{x})^2\) Average squared deviation from the mean. Denominator \(n-1\) provides Bessel's unbiased correction.
Standard Deviation (\(s\)) \(s = \sqrt{s^2}\) The square root of variance, restoring spread back into the original measurement units.
Interquartile Range (IQR) \(\text{IQR} = Q_3 - Q_1\) The distance between the 75th and 25th percentiles. Measures the spread of the middle 50% of the data.

3. Shape: Skewness and Kurtosis

Skewness (Asymmetry)

Skewness measures the degree of asymmetry of a distribution around its mean:

  • Symmetric (Skew ≈ 0): The bell curve. Mean ≈ Median ≈ Mode.
  • Positive / Right Skew (Skew > 0): Tail extends towards higher positive values. Mean > Median > Mode (e.g., Household income, website session duration).
  • Negative / Left Skew (Skew < 0): Tail extends towards lower values. Mean < Median < Mode (e.g., Age at retirement, product failure times).

Kurtosis (Tailedness)

Excess kurtosis measures the thickness of distribution tails relative to a normal curve (kurtosis = 0):

  • Mesokurtic: Standard normal distribution (excess kurtosis ≈ 0).
  • Leptokurtic (Kurtosis > 0): Sharp peak with heavy, fat tails. High propensity for extreme outlier events (standard in financial market returns).
  • Platykurtic (Kurtosis < 0): Flat peak with thin, light tails. Outlier events are exceptionally rare.

Python Implementation: Complete Descriptive Profiling

import numpy as np
import pandas as pd
from scipy import stats

# Generate sample distribution with positive skew
np.random.seed(42)
data = np.random.exponential(scale=2.5, size=1000)

# Compute central tendency & spread
mean_val = np.mean(data)
median_val = np.median(data)
std_dev = np.std(data, ddof=1)  # ddof=1 for sample standard deviation
q25, q75 = np.percentile(data, [25, 75])
iqr_val = q75 - q25
skew_val = stats.skew(data)
kurt_val = stats.kurtosis(data)

print(f"Mean:       {mean_val:.3f}")
print(f"Median:     {median_val:.3f}")
print(f"Std Dev:    {std_dev:.3f}")
print(f"IQR:        {iqr_val:.3f} (Q1={q25:.3f}, Q3={q75:.3f})")
print(f"Skewness:   {skew_val:.3f} (Right-skewed: Mean > Median)")
print(f"Kurtosis:   {kurt_val:.3f} (Leptokurtic)")

University Exam Practice Questions

State the Empirical Rule (68-95-99.7 Rule) for a Gaussian distribution. If an examination has a mean of 70 and a standard deviation of 8, within what bounds will 95.4% of student scores fall? (Answer: 70 ± 2(8) = [54, 86]).

Frequently Asked Questions (FAQ) - Student & Interview Review

Q1. Why is the median often preferred over the mean for income data?

The arithmetic mean is highly sensitive to extreme outliers. In wealth and income distributions, a handful of billionaires heavily skew the mean upward, presenting a distorted view of typical earnings. The median (the 50th percentile) is robust against outliers and accurately reflects the center of skewed distributions.

Q2. What is the difference between sample variance and population variance?

Population variance divides the sum of squared deviations by N (the total population size). Sample variance divides by (n - 1) — a correction known as Bessel's correction. Dividing by (n - 1) corrects for sample bias, ensuring the sample variance is an unbiased estimator of the true population parameter.

Q3. What is the Interquartile Range (IQR) and how is it used?

The Interquartile Range (IQR = Q3 - Q1) measures the spread of the middle 50% of sorted data. It is the foundation of John Tukey's box plot fences: any data point falling below Q1 - 1.5*IQR or above Q3 + 1.5*IQR is classified as an empirical outlier.

Q4. What do positive and negative skewness indicate?

Positive (right) skewness indicates a distribution with a long right tail of unusually high values, where Mean > Median > Mode. Negative (left) skewness indicates a long left tail of unusually low values, where Mean < Median < Mode.

Q5. What is kurtosis and what does it measure?

Kurtosis measures the 'tailedness' and extreme outlier propensity of a distribution relative to a standard normal curve. High kurtosis (leptokurtic) signals heavy tails and a higher probability of rare, extreme events (fat-tail risk).

Explore Related Data Science Tutorials & Next Steps

Broaden your statistical analysis, Python data wrangling, and production engineering expertise:

Probability Distributions: Normal, Poisson & Binomial

Explore theoretical distributions that model real-world continuous and discrete processes.

Hypothesis Testing & A/B Testing Framework

Use statistical tests to validate empirical differences between sample groups.

Data Cleaning & Outlier Detection

Detect and treat outliers using Z-scores, IQR fences, and Winsorization.

Data Visualization: Matplotlib & Seaborn

Visualize summary metrics using box plots, histograms, and violin plots.

Share Share on Facebook Share on Twitter Share on LinkedIn Pin on Pinterest Share on Reddit

You may also like this!