Before any modelling, you summarise: where is the data centred, how spread out is it, and how do two variables move together? This part covers mean, median, mode, variance, standard deviation, z-scores and normalisation, then covariance and Pearson’s correlation computed from data. GATE asks these directly, in the General Aptitude section and in the DA section, and normalisation also appears in the databases syllabus.
You need: sums (Refreshers 2.1) and expectation and variance (Probability 3.2). Quick check: what is the mean of 2, 4 and 9? (It’s 5.) If $\sum$ notation or “mean” feels shaky, Refreshers 2.1 takes 40 minutes.
Centre, spread and z-scores
The mean, median and mode describe where data is centred; the variance and standard deviation describe how spread out it is; a z-score says how unusual one value is, in units of standard deviation.
Every statistics and ML method starts with these summaries, and GATE asks them as quick numerical questions: an average from a bar chart, an updated mean, a z-score.
It’s like summarising a batter’s season for a commentator: “averages 38, usually scores between 20 and 55, and that 140 was a freak innings.” Centre, spread, and how unusual one value is.
Quick numerical questions in both the aptitude and the subject sections.
Why summarise? A DPL season produces thousands of numbers: every score, every over, every attendance figure. Nobody can take in a list of thousands. Statistics starts by squeezing a list into a few honest numbers: one for where the values sit (the centre) and one for how much they vary (the spread). Later parts go further, using a small sample to say something about a much bigger population.
The Bengaluru Backprops’ opener scored 12, 45, 7, 45 and 30 in five innings.
- Mean $\bar x = \frac1n\sum x_i = \frac{139}{5} = 27.8$: the balance point.
- Median: sort (7, 12, 30, 45, 45) and take the middle value, 30. With an even count, average the two middle values.
- Mode: the most frequent value, 45.
The median ignores how extreme the extremes are; the mean doesn’t. Replace the 45 with a 145 and the mean jumps to 47.8 while the median stays at 30. So the median is robust to outliers. When data has a long tail to the right (a few huge scores), the mean is pulled above the median: right skew.
Measuring spread, step by step. Take the scores 2, 4, 6, with mean 4. How far is each from the mean? The deviations are $-2, 0, 2$. Their plain average is always 0 (the pluses and minuses cancel), so we square them first: $4, 0, 4$. The average squared deviation is the variance, and its square root, the standard deviation, brings us back to the original units. Dividing the total 8 by $n = 3$ gives $\tfrac83 \approx 2.67$; dividing by $n - 1 = 2$ gives 4. Which to use is explained in the box.
The population variance of values $x_1, \ldots, x_n$ is $\frac1n\sum (x_i - \bar x)^2$. The sample variance, used when the data is a sample from a bigger population, divides by $n - 1$ instead: $$s^2 = \frac{1}{n-1}\sum_{i=1}^n (x_i - \bar x)^2.$$ The standard deviation is the square root. (Part 2 explains why $n - 1$.) Other spread measures: the range (max − min) and the interquartile range (the spread of the middle 50%).
If every value is transformed as $y = ax + b$, then $\bar y = a\bar x + b$ and $\mathrm{SD}(y) = |a|\,\mathrm{SD}(x)$ (variance multiplied by $a^2$). Converting runs to “runs above 20” shifts the mean but leaves the spread alone; doubling every score doubles both.
The z-score of a value is $z = \dfrac{x - \bar x}{s}$: how many standard deviations it is from the mean. After converting every value, the data has mean 0 and SD 1 (“standardisation”, or z-score normalisation).
Min–max normalisation rescales to $[0, 1]$: $x' = \dfrac{x - \min}{\max - \min}$. Both appear in the databases syllabus under “data transformation”, and both matter in ML, where features on wildly different scales confuse distance-based methods like k-NN and k-means.
Each dot is one innings. Drag dots left and right, or add an outlier. Watch the mean (triangle) chase the outlier while the median (diamond) barely moves. The band shows mean ± one standard deviation. The readout shows both the n and the n − 1 versions of the variance.
The number of patients per shift ($X$) consulting Dr. Gita in her past 100 shifts is shown in the figure. If the amount she earns is ₹1000($X$ − 0.2), what is the average amount (in ₹) she has earned per shift in the past 100 shifts?
The figure is a bar chart: 20 shifts with 5 patients, 40 shifts with 6, 30 shifts with 7, and 10 shifts with 8.
- 6,100
- 6,300
- 6,000
- 6,500
Mean number of patients: $\bar X = \dfrac{5\cdot20 + 6\cdot40 + 7\cdot30 + 8\cdot10}{100} = \dfrac{100 + 240 + 210 + 80}{100} = 6.3$.
A frequency-weighted mean: each value times how often it occurs, divided by the total count.
Earnings are a linear transformation of $X$: $1000(X - 0.2)$. So the mean earning is $1000(\bar X - 0.2)$.
The mean of $aX + b$ is $a\bar X + b$. There’s no need to compute the earning for each shift.
$1000(6.3 - 0.2) = 6100$. Answer (A).
(B) forgets the $-0.2$. Official key: (A).
Warm-up. Find the mean and the median of 3, 8, 1, 6, 7.
Mean: add and divide by 5. Median: sort first, then take the middle value.
Mean $= 25/5 = 5$. Sorted: 1, 3, 6, 7, 8, so the median is 6.
Warm-up. Find the sample variance $s^2$ of 2, 4, 6.
Deviations from the mean 4, squared and added, then divided by $n - 1$.
$(4 + 0 + 4)/(3 - 1) = 4$, so $s = 2$.
Find the mean, median and mode of the innings 12, 45, 7, 45, 30. (Try it before checking the text above.)
Sort the values for the median; the mode is the most frequent value.
Mean $139/5 = 27.8$. Sorted: 7, 12, 30, 45, 45, so the median is 30. Mode 45.
Find the population standard deviation (divide by $n$) of 2, 4, 4, 4, 5, 5, 7, 9.
The mean is 5. Square the deviations, average them, take the root.
Deviations: −3, −1, −1, −1, 0, 0, 2, 4. Squares sum to $9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32$. Variance $32/8 = 4$, SD $= 2$.
Data has mean 10 and SD 2. Each value is transformed by $y = 3x - 5$. Find the new mean and SD.
Mean becomes $a\bar x + b$; SD becomes $|a|\cdot$SD.
Mean $3\cdot10 - 5 = 25$. SD $3\cdot2 = 6$ (the $-5$ shifts but doesn’t spread).
Using the numbers from GATE 2024 Q27 (min ₹46,000, max ₹1,70,000), what is the min–max normalised value of ₹1,06,000? (That question asked for the z-score; this asks for the other normalisation.)
$(x - \min)/(\max - \min)$.
$(106000 - 46000)/(170000 - 46000) = 60000/124000 \approx 0.484$. The z-score (using the mean ₹96,000 and SD ₹21,000) was 0.476: similar here, but the two normalisations are different in general.
A scorer summarises the Nagpur Neural Nets’ 20 innings as mean 30 runs and population variance 25 (dividing by $n$). Later she finds that one innings entered as 45 was really 25. Find the corrected mean and the corrected population variance.
Rebuild the two totals the summary hides, the sum $\sum x_i$ and the sum of squares $\sum x_i^2$, correct the one entry in each, then recompute. Moving one value changes the variance too.
Sum: $\sum x_i = 20\times30 = 600$. Corrected: $600 - 45 + 25 = 580$, so the corrected mean is $580/20 = 29$.
Sum of squares: the population variance is $\frac1n\sum x_i^2 - \bar x^2$, so $\sum x_i^2 = 20\,(25 + 30^2) = 18500$. Corrected: $18500 - 45^2 + 25^2 = 18500 - 2025 + 625 = 17100$.
Corrected variance: $17100/20 - 29^2 = 855 - 841 = 14$.
The variance drops sharply because the wrong entry, 45, sat three standard deviations above the mean. Final: mean 29, variance 14.
The Bengaluru Backprops score 10, 14, 18, 22 and 26 in five matches. Use the population SD (divide by $n$) for every z-score. Which statements are true? (Select all that apply.)
- After min–max normalisation to $[0, 1]$, the population SD of the normalised scores is $\frac{1}{2\sqrt2} \approx 0.354$.
- The z-score of 26 is $\sqrt2 \approx 1.414$, and it is the same after min–max normalisation.
- If every score is transformed by $y = 30 - 2x$, the value that came from 26 has z-score $+\sqrt2$.
- The sample variance (dividing by $n - 1$) of the original scores is 32.
Min–max normalisation is the linear map $x' = (x - \min)/(\max - \min)$. What does a linear map do to the SD, and what happens to a z-score when the slope is positive, or negative?
Mean $\bar x = 18$; deviations $-8, -4, 0, 4, 8$; sum of squares 160. Population variance $160/5 = 32$, SD $\sqrt{32} = 4\sqrt2 \approx 5.657$.
(A) True. Here $x' = (x - 10)/16$, so the SD is divided by 16: $4\sqrt2/16 = \frac{\sqrt2}{4} = \frac{1}{2\sqrt2} \approx 0.354$.
(B) True. $z = 8/(4\sqrt2) = \sqrt2$. A linear map with positive slope scales the deviation and the SD by the same factor, so every z-score is unchanged.
(C) False. With slope −2 the deviation becomes $-2\times8 = -16$ while the SD becomes $2\times4\sqrt2$, so $z = -\sqrt2$: a negative slope flips the sign.
(D) False. The sample variance is $160/4 = 40$; 32 is the population variance.
Answer: (A) and (B).
The Kalinga Kernels played 10 home matches with mean 50 and population variance 16, and 15 away matches with mean 40 and population variance 36. Find the population variance of all 25 scores, and the z-score of a score of 62 within the combined set, using the combined population SD (two decimals).
The combined mean is a weighted mean. For the variance, averaging 16 and 36 is not enough: either rebuild each group’s sum of squares, or add the spread within the groups to the spread between the two group means.
Combined mean: $(10\times50 + 15\times40)/25 = 1100/25 = 44$.
Sums of squares, from $\sum x_i^2 = n(\text{variance} + \text{mean}^2)$: home $10\,(16 + 2500) = 25160$, away $15\,(36 + 1600) = 24540$, total 49700.
Combined variance: $49700/25 - 44^2 = 1988 - 1936 = 52$.
Check by splitting the spread: within groups $(10\times16 + 15\times36)/25 = 28$; between groups $\big(10\,(50 - 44)^2 + 15\,(40 - 44)^2\big)/25 = (360 + 240)/25 = 24$; total $28 + 24 = 52$. The weighted average of the variances alone (28) misses the gap between the home and away means.
z-score: $(62 - 44)/\sqrt{52} = 18/7.211 \approx 2.50$. Final: variance 52, z ≈ 2.50.
- Use frequencies as weights when data comes as a table or bar chart.
- Report the median for skewed data with outliers.
- Use the linear-transformation rules instead of transforming every value.
- Forgetting to sort before taking the median.
- Adding the shift $b$ to the standard deviation.
- Mixing up z-score and min–max normalisation, or using min and max in a z-score.
- The mean is the balance point and is pulled by outliers; the median is robust; the mode is the most frequent value.
- Variance averages squared deviations (÷n for a population, ÷(n−1) for a sample); for y = ax + b, the mean becomes a·x̄ + b and the SD becomes |a|·SD.
- z = (x − x̄)/s measures unusualness in SD units; min–max scaling maps the data onto [0, 1].
Incomes in a town have a few billionaires. Which is the better summary of a typical income?
Every score in a dataset is increased by 10. The standard deviation
A value has z-score −2. It is
Covariance and correlation from data
Pearson’s correlation coefficient $r$ measures how close a scatter of points is to a straight line, from −1 (perfect downhill line) through 0 (no linear trend) to +1 (perfect uphill line).
Correlation and covariance are in the syllabus by name, the sample paper asked for $r$ from a table, and regression, PCA and feature selection all build on them.
It’s like noticing that teams who hit more sixes tend to score more runs. Correlation puts a number on “tend to”, without claiming one causes the other.
Computing r from data, and conceptual questions about covariance and correlation.
Why a single number for “moving together”? Do players who face more balls hit more sixes? Plot each player as a point (balls faced across, sixes up): a scatter plot. If the points drift uphill, the two go together. Correlation turns that impression into one number, so different pairs of variables can be compared.
A three-point example. Take $x = (1, 2, 3)$ and $y = (1, 3, 2)$. Both means are 2, so the deviations are $dx = (-1, 0, 1)$ and $dy = (-1, 1, 0)$. Multiply in pairs and add: $(-1)(-1) + 0 \cdot 1 + 1 \cdot 0 = 1$. Divide by $\sqrt{\sum dx^2 \cdot \sum dy^2} = \sqrt{2 \cdot 2} = 2$: $r = 0.5$, a moderate uphill trend. The formula in the box is exactly these steps.
For pairs $(x_i, y_i)$ with means $\bar x, \bar y$: $$s_{xy} = \frac{1}{n-1}\sum (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}}.$$ Each product $(x_i - \bar x)(y_i - \bar y)$ is positive when the point is on the same side of both means (both above or both below), and negative otherwise. The $(n-1)$s cancel in $r$.
- $-1 \le r \le 1$, and $r = \pm1$ exactly when the points lie on a straight line.
- $r$ has no units: changing units (cm to inches) or shifting values doesn’t change it. Multiplying one variable by a negative number flips its sign.
- $r$ only measures linear association: points on a parabola can have $r \approx 0$ (2026 Q63).
- One outlier can change $r$ dramatically.
- Correlation is not causation: ice-cream sales and drownings are correlated because both rise in summer.
Drag the points. The readout shows $r$, and the line is the least-squares line (which the ML module derives). Make a perfect line ($r = \pm1$), a cloud ($r \approx 0$), and a U-shape ($r \approx 0$ despite an obvious pattern). Then drag one point far away and watch a single outlier swing $r$.
What is the Pearson’s correlation coefficient between x and y for the data in the table below? (rounded off to the first decimal place)
| x | y |
|---|---|
| −6 | 6.4 |
| 2 | 4.7 |
| 0.2 | 8 |
| 7 | 2 |
| −4 | 3.4 |
- −0.5
- 0.5
- 0.3
- −0.3
Means: $\bar x = (-6 + 2 + 0.2 + 7 - 4)/5 = -0.16$ and $\bar y = (6.4 + 4.7 + 8 + 2 + 3.4)/5 = 4.9$.
Always start from the means.
Deviations $x - \bar x$: −5.84, 2.16, 0.36, 7.16, −3.84. Deviations $y - \bar y$: 1.5, −0.2, 3.1, −2.9, −1.5.
A table with columns for $dx$, $dy$, $dx\cdot dy$, $dx^2$, $dy^2$ keeps this tidy.
$\sum dx\,dy = -8.76 - 0.432 + 1.116 - 20.764 + 5.76 = -23.08$. $\sum dx^2 = 104.912$ and $\sum dy^2 = 22.56$.
The large negative product comes from the point (7, 2): far right, well below the mean of $y$.
$r = \dfrac{-23.08}{\sqrt{104.912\times22.56}} = \dfrac{-23.08}{48.65} \approx -0.47 \to$ (A) −0.5.
Sign check: high $x$ goes with low $y$ (the point (7, 2)), so $r$ should be negative. That already eliminates (B) and (C). The sample paper published no key; this is our computation.
Warm-up. Find Pearson’s $r$ for the points $(1, 2)$, $(2, 4)$, $(3, 6)$.
Do the points lie on a straight line? Which way does it slope?
They lie exactly on the uphill line $y = 2x$, so $r = 1$.
Warm-up. $y = -2x + 5$ for every data point. What is the correlation between $x$ and $y$?
A perfect straight line gives $r = \pm1$; the sign follows the slope.
A perfect downhill line: $r = -1$.
Find Pearson’s $r$ for $x$ = 1, 2, 3, 4, 5 and $y$ = 2, 4, 5, 4, 5. (Two decimals.)
$\bar x = 3$, $\bar y = 4$. Compute $\sum dx\,dy$, $\sum dx^2$ and $\sum dy^2$.
$dx$: −2, −1, 0, 1, 2; $dy$: −2, 0, 1, 0, 1. $\sum dx\,dy = 4 + 0 + 0 + 0 + 2 = 6$; $\sum dx^2 = 10$; $\sum dy^2 = 6$. $r = 6/\sqrt{60} \approx 0.77$.
Every point satisfies $y = -2x + 7$ exactly. What is $r$?
The points lie exactly on a line. Which way does it slope?
A perfect straight line with negative slope: $r = -1$. The size of the slope (2) doesn’t matter.
The correlation between batters’ heights (in cm) and their strike rates is 0.8. Heights are converted to inches. The new correlation is
Converting units multiplies every height by the same positive number.
$r$ is unit-free and unchanged by multiplying a variable by a positive constant: it stays 0.8.
Which statements are true? (Select all that apply.)
(A) $r = 0$ means $X$ and $Y$ are independent. (B) $r$ is always between −1 and 1. (C) A large $|r|$ proves that $X$ causes $Y$. (D) Swapping the roles of $x$ and $y$ leaves $r$ unchanged.
Recall 2026 Q63 for (A), and look at the formula’s symmetry for (D).
(A) false: zero correlation only rules out a linear trend. (B) true. (C) false: correlation isn’t causation. (D) true: the formula is symmetric in $x$ and $y$.
For five DPL matches, $x$ is the number of sixes and $y$ the number of fours a team hit. The summary is $n = 5$, $\sum x = 30$, $\sum y = 35$, $\sum x^2 = 220$, $\sum y^2 = 285$, $\sum xy = 242$. Find the sample covariance $s_{xy}$ (dividing by $n - 1$) and Pearson’s $r$.
Use the shortcuts $\sum(x_i - \bar x)(y_i - \bar y) = \sum x_iy_i - n\bar x\bar y$ and $\sum(x_i - \bar x)^2 = \sum x_i^2 - n\bar x^2$.
Means: $\bar x = 30/5 = 6$, $\bar y = 35/5 = 7$.
Centred sums: $S_{xy} = 242 - 5\times6\times7 = 32$; $S_{xx} = 220 - 5\times36 = 40$; $S_{yy} = 285 - 5\times49 = 40$.
Covariance: $s_{xy} = 32/4 = 8$. (Dividing by $n$ instead would give 6.4.)
Correlation: $r = \dfrac{32}{\sqrt{40\times40}} = 0.8$. The divisor cancels inside $r$, so $r$ is the same whichever convention you use. Final: $s_{xy} = 8$, $r = 0.8$.
In a DPL match, $X$ is the Haryana Heuristics’ score and $Y$ the Hyderabad Hyperplanes’ score, with $\mathrm{SD}(X) = 6$, $\mathrm{SD}(Y) = 8$ and correlation $\rho(X, Y) = 0.5$. A fantasy league scores the match as $F = 2X - Y + 3$. Then $\mathrm{Var}(F)$ is
- 208
- 160
- 112
- 40
Turn the correlation into a covariance first. For $aX + bY + c$, the cross term is $2ab\,\mathrm{Cov}(X, Y)$, and the constant contributes nothing.
Covariance: $\mathrm{Cov}(X, Y) = \rho\,\mathrm{SD}(X)\,\mathrm{SD}(Y) = 0.5\times6\times8 = 24$.
With $a = 2$, $b = -1$: $\mathrm{Var}(F) = a^2\,\mathrm{Var}(X) + b^2\,\mathrm{Var}(Y) + 2ab\,\mathrm{Cov}(X, Y) = 4\times36 + 64 + 2\times2\times(-1)\times24$.
That is $144 + 64 - 96 = 112$.
(A) ignores the covariance, (B) uses $2\,\mathrm{Cov}$ instead of $2ab\,\mathrm{Cov}$, and (D) forgets to square the 2. Answer: (C) 112.
Random variables $X$ and $Y$ have equal standard deviations and correlation $\rho(X, Y) = 0.6$. Which statements are true? (Select all that apply.)
- $\rho(3X + 2,\ 5 - Y) = -0.6$.
- $\rho(X,\ X + Y) \approx 0.894$.
- (Separate data.) For $x = -2, -1, 0, 1, 2$ and $y = x^2$, Pearson’s $r$ is 0.
- A correlation of 0.6 means a straight line in $X$ explains 60% of the variation in $Y$.
For (B), call the common variance $\sigma^2$ and compute $\mathrm{Cov}(X, X + Y)$ and $\mathrm{Var}(X + Y)$ from the rules for sums. For (C), compute $\sum (x_i - \bar x)(y_i - \bar y)$.
(A) True. A linear change of scale leaves $|r|$ unchanged; exactly one of the two slopes (3 and −1) is negative, so the sign flips: −0.6.
(B) True. With $\mathrm{Var}(X) = \mathrm{Var}(Y) = \sigma^2$ and $\mathrm{Cov}(X, Y) = 0.6\sigma^2$: $\mathrm{Cov}(X, X + Y) = \sigma^2 + 0.6\sigma^2 = 1.6\sigma^2$ and $\mathrm{Var}(X + Y) = 2\sigma^2 + 2\times0.6\sigma^2 = 3.2\sigma^2$. So $\rho = \dfrac{1.6\sigma^2}{\sigma\cdot\sigma\sqrt{3.2}} = \dfrac{1.6}{\sqrt{3.2}} \approx 0.894$.
(C) True. $\bar x = 0$, so $\sum (x_i - \bar x)(y_i - \bar y) = \sum x_i y_i - 5\bar x\bar y = \sum x_i^3 = 0$, giving $r = 0$, even though $y$ is completely determined by $x$. Correlation measures only straight-line association.
(D) False. The share of variation explained by the line is $r^2 = 0.36$, i.e. 36%.
Answer: (A), (B) and (C).
- Sketch or imagine the scatter first; the sign of $r$ is often obvious.
- Lay out $dx$, $dy$, products and squares in columns.
- Look for outliers and curved patterns before trusting $r$.
- Treating $r = 0$ as “no relationship”.
- Thinking a steeper line means a larger $r$. The slope’s size doesn’t matter; only how tightly the points hug a line.
- Inferring causation from correlation.
- Sample covariance averages products of deviations; r normalises it to [−1, 1].
- r = ±1 for an exact line; r is unit-free, unchanged by shifts and positive rescaling, and symmetric in x and y.
- r measures linear association only; it is fragile to outliers and says nothing about causation.
Points lie on a perfect U-shaped parabola, symmetric about $x = 0$. $r$ is
If $r = 0.9$ between $X$ and $Y$, then the correlation between $-X$ and $Y$ is
Which single change to a dataset is most likely to change $r$ a lot?
Data: 3, 5, 5, 9, 18. Which is largest?
Sample covariance of $x$ and $y$ is 6, with SDs 2 and 5. Then $r$ is
A random variable has $E[X] = 4$ and $E[X^2] = 25$. Its standard deviation is