Descriptive Statistics Formulas
Averages, measures of spread, skewness and kurtosis, quartiles and percentiles, and correlation, with a worked example.
Averages (6)
| Formula | Expression |
|---|---|
| Mean | x̄ = Σx / n |
| Weighted Mean | x̄w = Σwᵢxᵢ/Σwᵢ |
| Combined Mean | x̄c = (n₁x̄₁+n₂x̄₂)/(n₁+n₂) |
| Geometric Mean | GM = ⁿ√(x₁x₂...xₙ) |
| Harmonic Mean | HM = n/Σ(1/xᵢ) |
| Median (grouped) | Med = l + [(n/2−cf)/f]×h |
Dispersion (14)
| Formula | Expression |
|---|---|
| Range | Range = max(x) - min(x) |
| Interquartile Range | IQR = Q₃ − Q₁ |
| Quartile Deviation | QD = (Q₃ − Q₁)/2 |
| Mean Deviation | MD = Σ|x−x̄|/n |
| Mean Absolute Deviation (about the median) | MAD = Σ|x−median|/n |
| Variance (Sample) | s² = (1/(n-1))Σ(xᵢ-x̄)² |
| Combined Variance | σc² = [n₁(σ₁²+d₁²)+n₂(σ₂²+d₂²)]/(n₁+n₂) |
| Pooled Standard Deviation | sp = √[((n₁-1)s₁²+(n₂-1)s₂²)/(n₁+n₂-2)] |
| Sum of Squares (corrected) | SS = Σx² − (Σx)²/n |
| Coefficient of Variation | CV = (σ/x̄) × 100 |
| Sample Coefficient of Variation | CV = (s/x̄) × 100 |
| Coefficient of Mean Deviation | CMD = (MD/x̄) × 100 |
| Coefficient of Quartile Deviation | CQD = (Q₃−Q₁)/(Q₃+Q₁) × 100 |
| Standard Error of Mean | SEM = s/√n |
Shape and outliers (6)
| Formula | Expression |
|---|---|
| Skewness | Sk = 3(x̄−Med)/σ |
| Coefficient of Skewness (Bowley) | Sk = (Q₃+Q₁−2Med)/(Q₃−Q₁) |
| Moment Coefficient of Skewness | γ₁ = m₃/m₂^(3/2) |
| Kurtosis | γ₂ = m₄/m₂² − 3 |
| kth Statistical Moment | mₖ = (1/n)Σ(xᵢ-μ)^k |
| Outlier Boundary (IQR Method) | outlier if x < Q1−1.5·IQR or x > Q3+1.5·IQR |
Position (quartiles, percentiles, z-scores) (5)
| Formula | Expression |
|---|---|
| Quartile (grouped) | Qₖ = l + [(kn/4−cf)/f]×h |
| Decile | Dₖ = l + [(kn/10−cf)/f]×h |
| Percentile | Pₖ = l + [(kn/100−cf)/f]×h |
| Percentile Rank | PR = (number of values below x/n) × 100 |
| Z-score | z = (x−μ)/σ |
Relationship and estimation (4)
| Formula | Expression |
|---|---|
| Covariance | Cov(X,Y) = (1/n)Σ(xᵢ-x̄)(yᵢ-ȳ) |
| Pearson Correlation | r = Cov(X,Y)/(σx·σy) |
| Spearman Rank Correlation | ρ = 1 - 6Σdᵢ²/(n(n²-1)) |
| Confidence Interval for Mean | x̄ ± z·(σ/√n) |
About these Descriptive Statistics formulas
Descriptive statistics summarise a data set in a few numbers: where it is centred (averages), how spread out it is (dispersion), what shape it has (skewness and kurtosis), and where individual values sit (quartiles, percentiles, z-scores). The formulas below follow that order.
Most mistakes come from using a formula for the wrong kind of data. Use the sample formulas (dividing by n − 1) when the data is a sample, the population formulas when it is the whole population, and the grouped formulas only when you are given a frequency table.
How to use these formulas
- Decide whether the data is a sample or a population. This decides whether the variance divides by n − 1 or by n.
- Use the mean and standard deviation for roughly symmetric data. For skewed data or data with outliers, the median and IQR describe it better.
- Use the coefficient of variation to compare spread between data sets with different units or very different means.
Worked example
Question. Find the mean, variance, standard deviation and coefficient of variation of the sample 4, 8, 6, 5, 3, 9, 7.
n = 7, Σx = 42, mean = 42 / 7 = 6.
Σ(x − mean)² = 28, so the sample variance s² = 28 / (7 − 1) = 4.67.
Standard deviation s = √4.67 = 2.16.
Coefficient of variation = 2.16 / 6 × 100 = 36.0%.
Standard error of the mean = 2.16 / √7 = 0.82.
Common mistakes
- Dividing by n instead of n − 1 when the data is a sample.
- Using the arithmetic mean for growth rates. Use the geometric mean for averages of ratios and growth factors.
- Reading skewness from the formula alone. Always check against a plot or the relationship between mean and median.
FAQ
What is the difference between population and sample variance?
Population variance divides the sum of squared deviations by n. Sample variance divides by n − 1, which corrects the tendency of a sample to underestimate the spread of the population.
When should I use the geometric mean?
When averaging growth rates, ratios or index numbers, where values multiply rather than add. For example, the average annual return over several years.
What does the coefficient of variation tell me?
It expresses the standard deviation as a percentage of the mean, so you can compare the spread of data sets measured in different units or with very different averages.