Descriptive Statistics — Mean, Median, Mode, Spread, Covariance and Correlation
Measures of central tendency and spread for raw and grouped data, population vs sample variance, the effect of shifting and scaling, quartiles and skewness, covariance and Pearson correlation with their properties, and why uncorrelated does not mean independent.
Descriptive statistics summarise a data set with a few numbers: where it is centred, how spread out it is, its shape, and how two variables move together. These formulas reappear in random variables (as expectations), in hypothesis testing (sample mean and variance), in PCA (the covariance matrix) and in regression (correlation and least squares).
Measures of central tendency
| Measure | Definition | Notes |
|---|---|---|
| Mean | uses every value; sensitive to outliers | |
| Weighted mean | combined mean of groups: weights = group sizes | |
| Median | middle value of sorted data; average of two middle values if even | robust to outliers |
| Mode | most frequent value | can be non-unique; the only one for nominal data |
| Geometric mean | growth rates; | |
| Harmonic mean | average speeds and rates; |
Key property of the mean: deviations sum to zero, , and minimises . The median minimises .
Grouped data
For a frequency table with class midpoints and frequencies : .
- Median: where is the lower boundary of the median class, the cumulative frequency before it, its frequency and the class width.
- Mode: (modal class , neighbours ).
- Empirical relation for moderately skewed data: .
Measures of spread
| Measure | Formula |
|---|---|
| Range | |
| Population variance | |
| Sample variance (unbiased) | |
| Standard deviation | , in the data's units |
| Mean absolute deviation | |
| Interquartile range | (robust) |
| Coefficient of variation | (unit-free) |
Shifting and scaling
If : , , , . Shifting moves location but never spread.
Standardisation: has mean 0 and standard deviation 1.
Quantiles, box plots and skewness
The -th quantile has a fraction of the data below it; are the quartiles. A box plot draws – as a box with the median inside, whiskers to the most extreme points within , and flags points beyond as outliers.
Moment coefficient of skewness: (0 for symmetric distributions). Kurtosis is 3 for the normal distribution.
Covariance
For data: . Positive covariance means the variables tend to be above their means together.
Properties:
- ; .
- Bilinear: .
- .
- Independent (the converse is false).
Covariance depends on units, which is why we normalise it.
Pearson correlation
| Property | |
|---|---|
| Range | (Cauchy–Schwarz) |
| exact linear relationship with | |
| Affine invariance | |
| Measures | only linear association |
| Link to regression | slope of least-squares line ; in simple regression |
Spearman's rank correlation is Pearson's applied to ranks, capturing monotonic (not just linear) relationships: when there are no ties.
The covariance matrix
For a random vector , . is symmetric and positive semi-definite, and . This is the matrix PCA diagonalises — see Principal component analysis.
Quick revision
Practice questions
GATE-style questions: 5 one-mark and 4 two-mark. Wrong MCQs cost ⅓ of their marks in the real exam; MSQ and NAT have no negative marking. Attempt each before opening the solution.
The population standard deviation of the data is ______.
Every observation in a data set with standard deviation is multiplied by and then increased by . The new standard deviation is
The sample variance (with divisor ) of the observations is ______.
The median of is
For the paired data : , the Pearson correlation coefficient is ______ (round to two decimals).
Which of the following statements about the Pearson correlation coefficient are true?
One or more options are correct.
, and . Then is ______.
For a unimodal distribution with a long right tail (positively skewed), the usual ordering of the measures of central tendency is
A class has two sections. Section A has 20 students with mean score 60 and section B has 30 students with mean score 70. The mean score of all 50 students is ______.