Introduction

Descriptive statistics summarise a data set with a few numbers: where it is centred (mean, median, mode) and how spread out it is (range, variance, standard deviation). These are the sample counterparts of the expectation and variance of a random variable. The calculations are straightforward, but the divisor nn versus n−1n - 1, the effect of shifting and scaling data, combining groups, and the order of mean, median and mode in a skewed distribution all need care.

Prerequisites

None within this subject. Basic arithmetic and summation notation suffice. Random Variables, Expectation and Variance gives the probabilistic view of the same ideas.

Core concepts

Throughout, the data are x1,x2,…,xnx_1, x_2, \ldots, x_n, and x(1)≤x(2)≤⋯≤x(n)x_{(1)} \le x_{(2)} \le \cdots \le x_{(n)} are the same values sorted.

Measures of central tendency

Arithmetic mean. xˉ=1n∑i=1nxi\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i. For values xix_i with frequencies fif_i, xˉ=∑fixi/∑fi\bar{x} = \sum f_i x_i / \sum f_i. Key facts:

  • ∑(xi−xˉ)=0\sum (x_i - \bar{x}) = 0: deviations from the mean cancel.
  • xˉ\bar{x} minimises ∑(xi−c)2\sum (x_i - c)^2 over constants cc.
  • Combined mean of groups with sizes n1,n2n_1, n_2 and means xˉ1,xˉ2\bar{x}_1, \bar{x}_2: xˉ=(n1xˉ1+n2xˉ2)/(n1+n2)\bar{x} = (n_1\bar{x}_1 + n_2\bar{x}_2)/(n_1 + n_2).
  • The mean is sensitive to outliers.

Median. The middle value of the sorted data: x((n+1)/2)x_{((n+1)/2)} if nn is odd, and the average 12(x(n/2)+x(n/2+1))\frac{1}{2}\big(x_{(n/2)} + x_{(n/2 + 1)}\big) if nn is even (the usual convention). The median minimises ∑∣xi−c∣\sum |x_i - c| and is robust to outliers.

Mode. The most frequent value. A data set can have no mode (all values distinct, under the usual convention), one mode, or several (bimodal, multimodal).

Grouped data (class width hh, total frequency NN):

Median≈L+N/2−Cf h,Mode≈L+f1−f02f1−f0−f2 h,\text{Median} \approx L + \frac{N/2 - C}{f}\, h, \qquad \text{Mode} \approx L + \frac{f_1 - f_0}{2f_1 - f_0 - f_2}\, h,

where for the median LL is the lower boundary of the class containing the (N/2)(N/2)-th value, CC the cumulative frequency before it and ff its frequency; for the mode LL is the lower boundary of the modal class, f1f_1 its frequency and f0,f2f_0, f_2 the frequencies of the classes before and after. These are interpolation formulas, not exact values.

Other means for positive data: geometric mean G=(x1⋯xn)1/nG = (x_1 \cdots x_n)^{1/n} and harmonic mean H=n/∑(1/xi)H = n / \sum (1/x_i). Always AM≥GM≥HM\text{AM} \ge \text{GM} \ge \text{HM}, with equality if and only if all values are equal. For two numbers, G2=A⋅HG^2 = A \cdot H.

Measures of dispersion

  • Range =x(n)−x(1)= x_{(n)} - x_{(1)}.
  • Mean absolute deviation about the mean: 1n∑∣xi−xˉ∣\frac{1}{n}\sum |x_i - \bar{x}|.
  • Quartiles Q1,Q2=median,Q3Q_1, Q_2 = \text{median}, Q_3 and the interquartile range Q3−Q1Q_3 - Q_1. Textbooks use slightly different rules for quartiles of small data sets, so check which rule the question uses before computing.
  • Variance and standard deviation, in two versions:
population: σ2=1n∑i=1n(xi−xˉ)2,sample: s2=1n−1∑i=1n(xi−xˉ)2.\text{population: } \sigma^2 = \frac{1}{n}\sum_{i=1}^{n}(x_i - \bar{x})^2, \qquad \text{sample: } s^2 = \frac{1}{n - 1}\sum_{i=1}^{n}(x_i - \bar{x})^2 .

Divisor convention. Sample formulas with divisor n−1n-1 require n≥2n\ge2. Use the divisor nn when the data are the whole population, and n−1n - 1 when the data are a sample used to estimate the population variance (s2s^2 is then an unbiased estimator). Check whether the question's "variance" uses divisor nn or n−1n-1; if the options contain both values, decide which the question means. The standard deviation is the square root: σ\sigma or ss.

Shortcut formula (population): σ2=1n∑xi2−xˉ2\sigma^2 = \frac{1}{n}\sum x_i^2 - \bar{x}^2. Equivalently, the variance is the mean of squares minus the square of the mean, mirroring E[X2]−(E[X])2E[X^2] - (E[X])^2.

Coefficient of variation: CV=standard deviation/xˉ\mathrm{CV}=\text{standard deviation}/\bar x, often as a percentage, using σ\sigma or ss consistently. The quotient requires a nonzero mean. Interpreting CV as relative spread normally requires a positive-mean ratio-scale quantity with a meaningful zero; arbitrary shifted scales such as Celsius do not support that interpretation. Positive rescaling preserves CV; shifting generally does not.

Effect of shifting and scaling

If every value is transformed as yi=axi+by_i = a x_i + b:

StatisticNew value
mean, mediana(⋅)+ba(\cdot)+b
mode values, a≠0a\ne0a(⋅)+ba(\cdot)+b; if a=0a=0, all observations equal bb, the unique mode
quartiles, a>0a>0Q1′=aQ1+b, Q3′=aQ3+bQ'_1=aQ_1+b,\ Q'_3=aQ_3+b
quartiles, a<0a<0Q1′=aQ3+b, Q3′=aQ1+bQ'_1=aQ_3+b,\ Q'_3=aQ_1+b (order reverses)
quartiles, a=0a=0every quantile equals bb
range, IQR, standard deviation, mean deviation∣a∣\lvert a \rvert times the old value
variancea2a^2 times the old value

Adding a constant shifts location but leaves spread unchanged.

Combined variance (population form) of two groups with sizes n1,n2n_1, n_2, means xˉ1,xˉ2\bar{x}_1, \bar{x}_2, variances σ12,σ22\sigma_1^2, \sigma_2^2 and combined mean xˉ\bar{x}, with dj=xˉj−xˉd_j = \bar{x}_j - \bar{x}:

σ2=n1(σ12+d12)+n2(σ22+d22)n1+n2.\sigma^2 = \frac{n_1(\sigma_1^2 + d_1^2) + n_2(\sigma_2^2 + d_2^2)}{n_1 + n_2}.

Skewness: where mean, median and mode sit

Mean, median and mode under skew
Figure 1. In a symmetric unimodal distribution mean, median and mode coincide. With a long right tail (positive skew) the typical order is mode << median << mean; with a long left tail it is reversed.
  • Symmetric unimodal: mean = median = mode.
  • Positively (right) skewed, long right tail: typically mode << median << mean. Incomes and waiting times look like this.
  • Negatively (left) skewed: typically mean << median << mode.

These orderings are typical, not guaranteed; counterexamples exist for unusual shapes. Pearson's empirical relation Mode≈3 Median−2 Mean\text{Mode} \approx 3\,\text{Median} - 2\,\text{Mean} holds approximately for moderately skewed unimodal data. It is not an identity. Pearson's coefficient of skewness (Mean−Mode)/σ(\text{Mean} - \text{Mode})/\sigma is typically positive for ordinary right-skewed unimodal shapes; in unusual distributions its sign need not agree with moment skewness.

Paired data: covariance and correlation

For paired observations (xi,yi)(x_i,y_i), i=1,…,ni=1,\ldots,n, sample covariance requires n≥2n\ge2. Pearson's rr additionally requires nonzero variation in both variables; it is undefined if either is constant. The formulas are

sxy=1n−1∑i=1n(xi−xˉ)(yi−yˉ),r=∑(xi−xˉ)(yi−yˉ)∑(xi−xˉ)2∑(yi−yˉ)2.s_{xy} = \frac{1}{n - 1}\sum_{i=1}^{n} (x_i - \bar{x})(y_i - \bar{y}), \qquad r = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum (x_i - \bar{x})^2 \sum (y_i - \bar{y})^2}} .

The divisor cancels in rr, so rr is the same whether nn or n−1n - 1 is used throughout. Always −1≤r≤1-1 \le r \le 1; r=±1r = \pm 1 exactly when the points lie on a line with non-zero slope; rr is unchanged by shifting either variable and by multiplying it by a positive constant, and changes sign under a negative constant. rr measures linear association only: for y=x2y = x^2 on x=−2,−1,0,1,2x = -2, -1, 0, 1, 2, r=0r = 0 although yy is a function of xx.

Worked examples

Example 1: a small data set

Data: 2,4,4,4,5,5,7,92, 4, 4, 4, 5, 5, 7, 9 (n=8n = 8). Mean =40/8=5= 40/8 = 5. Median =(4+5)/2=4.5= (4 + 5)/2 = 4.5. Mode =4= 4. Squared deviations sum to 9+1+1+1+0+0+4+16=329 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32, so the population variance is 32/8=432/8 = 4 (σ=2\sigma = 2), and the sample variance is 32/7≈4.57132/7 \approx 4.571 (s≈2.138s \approx 2.138). Shortcut check: 18∑xi2=232/8=29\frac{1}{8}\sum x_i^2 = 232/8 = 29 and 29−25=429 - 25 = 4. Range =7= 7.

Example 2: combining groups

Group A: 30 students, mean 60, standard deviation 10. Group B: 20 students, mean 70, standard deviation 5. Combined mean =(1800+1400)/50=64= (1800 + 1400)/50 = 64; dA=−4d_A = -4, dB=6d_B = 6. Combined variance =[30(100+16)+20(25+36)]/50=4700/50=94= [30(100 + 16) + 20(25 + 36)]/50 = 4700/50 = 94, standard deviation ≈9.70\approx 9.70.

Example 3: change of units

Temperatures in Celsius have mean 20 and standard deviation 5. In Fahrenheit, F=1.8C+32F = 1.8C + 32: mean 6868, standard deviation 99, variance 8181.

Example 4: correcting an error

The mean of 10 observations is 15. One value, 12, was recorded as 21. The corrected total is 150−21+12=141150 - 21 + 12 = 141, so the corrected mean is 14.114.1.

Example 5: grouped data

Class0 to 1010 to 2020 to 3030 to 40
Frequency58125

N=30N = 30, N/2=15N/2 = 15; cumulative frequencies are 5,13,25,305, 13, 25, 30, so the median class is 20 to 30. Median ≈20+15−1312⋅10≈21.67\approx 20 + \frac{15 - 13}{12}\cdot 10 \approx 21.67. Modal class 20 to 30: Mode ≈20+12−824−8−5⋅10=20+40/11≈23.64\approx 20 + \frac{12 - 8}{24 - 8 - 5}\cdot 10 = 20 + 40/11 \approx 23.64.

Example 6: three means

For 22 and 88: AM =5= 5, GM =4= 4, HM =2⋅2⋅8/(2+8)=3.2= 2 \cdot 2 \cdot 8/(2 + 8) = 3.2. Check G2=16=5×3.2G^2 = 16 = 5 \times 3.2.

Example 7: correlation of paired data

Data (1,2),(2,4),(3,5),(4,4),(5,5)(1, 2), (2, 4), (3, 5), (4, 4), (5, 5). Means xˉ=3\bar{x} = 3, yˉ=4\bar{y} = 4. Deviations: x−xˉ=−2,−1,0,1,2x - \bar{x} = -2, -1, 0, 1, 2; y−yˉ=−2,0,1,0,1y - \bar{y} = -2, 0, 1, 0, 1. Then ∑(x−xˉ)(y−yˉ)=4+0+0+0+2=6\sum (x - \bar{x})(y - \bar{y}) = 4 + 0 + 0 + 0 + 2 = 6, ∑(x−xˉ)2=10\sum (x - \bar{x})^2 = 10, ∑(y−yˉ)2=6\sum (y - \bar{y})^2 = 6, and r=6/60≈0.775r = 6/\sqrt{60} \approx 0.775. The sample covariance is 6/4=1.56/4 = 1.5. Converting xx to other units (x′=10x+7x' = 10x + 7) leaves rr unchanged.

Example 8: quick formulas

  • The population standard deviation of two numbers a,ba, b is ∣a−b∣/2|a - b|/2: for 4 and 10 it is 3.
  • The first nn natural numbers have mean (n+1)/2(n + 1)/2 and population variance (n2−1)/12(n^2 - 1)/12: for 1,…,101, \ldots, 10, mean 5.5 and variance 99/12=8.2599/12 = 8.25.
  • One outlier moves the mean but barely moves the median: for 2,3,4,5,1002, 3, 4, 5, 100 the mean is 22.8 and the median 4. Prefer the median for skewed data such as incomes.

Important properties and observations

  • Standard deviation is zero if and only if all values are equal.
  • Adding a value equal to the mean leaves the mean unchanged but decreases the population variance unless all values were already equal (the new point has zero deviation).
  • For n≥3n\ge3, increasing the largest observation leaves the conventional median unchanged, but changes the mean and spread. For n=2n=2, the median is the average of the two values, so increasing the maximum changes it too.
  • Variance has squared units; standard deviation is in the units of the data.

GATE examination perspective

  • Direct computation of mean, median, mode, variance or standard deviation of a small data set; watch for the divisor.
  • Transformations. Effect of ax+bax + b on each statistic.
  • Combining groups and correcting errors with totals nxˉn\bar{x}.
  • Skewness ordering of mean, median and mode.
  • Trap: mixing nn and n−1n - 1 between steps.
  • Trap: forgetting to sort before taking the median.
  • Correlation of paired data. Compute deviations, then r=∑dxdy/∑dx2∑dy2r = \sum d_x d_y/\sqrt{\sum d_x^2 \sum d_y^2}; check that ∣r∣≤1|r| \le 1.
  • Trap: reading r=0r = 0 as "no relationship"; it rules out only a linear one.

Summary

Sources

  1. S. M. Ross, Introduction to Probability and Statistics for Engineers and Scientists, 4th ed., Elsevier Academic Press, 2009: Chapter 2 (Descriptive Statistics).
  2. E. Kreyszig, Advanced Engineering Mathematics, 10th ed., Wiley, 2011: Chapter 24 (Data Analysis. Probability Theory).

Next steps