Expectation, variance and summary measures
Objectives and prerequisites
Compute expected values, variances and standard deviations; use linearity correctly; distinguish mean, median and mode; and state whether a variance describes a distribution or estimates a population from a sample. Prerequisites: PMF, PDF, CDF, finite sums and basic integrals. Mean, median, mode and standard deviation are explicitly in GATE 2026 CS. Variance is developed as the square of standard deviation; covariance is introduced only to explain when variances add.
1. Expected value is a probability-weighted mean
For discrete X, E[X]=Σₓx p_X(x). For a variable with PDF f, E[X]=∫xf(x)dx over its support, provided the expectation exists. The expectation can lie outside the support: a fair die has mean 3.5 although no roll equals 3.5. It describes a weighted average, not the most likely value or a promised next outcome.
Example: P(X=0)=1/4, P(X=1)=1/2, P(X=2)=1/4 gives E[X]=0(1/4)+1(1/2)+2(1/4)=1. For a function g, E[g(X)]=Σₓg(x)p_X(x), or ∫g(x)f(x)dx. You do not need the full distribution of g(X) if the distribution of X is known. Here E[X²]=0+1/2+4/4=3/2, whereas (E[X])²=1. In general E[g(X)] is not g(E[X]).
For f(x)=2x on [0,1], E[X]=∫₀¹2x²dx=2/3, and E[X²]=∫₀¹2x³dx=1/2. The density weights larger values more, so a mean above the interval midpoint is sensible.
2. Linearity does not need independence
For finite expectations, E[aX+bY+c]=aE[X]+bE[Y]+c regardless of dependence. The proof distributes the sum or integral; it does not factor joint probabilities. In particular E[aX+b]=aE[X]+b.
An indicator I_A equals one when event A occurs and zero otherwise. E[I_A]=P(A). If N counts occurrences of events A₁,…,Aₙ, write N=ΣᵢI_Aᵢ. Then E[N]=ΣᵢP(Aᵢ), even if the events are dependent.
Example: choose three cards uniformly without replacement from a standard 52-card deck with four aces. Let Iᵢ indicate whether draw i is an ace. Each draw has marginal ace probability 4/52, so E[number of aces]=3(4/52)=3/13. The draws are dependent, but linearity still applies. This shortcut finds the mean without deriving every possible ace count probability.
Do not extend this to products: E[XY]=E[X]E[Y] is guaranteed by independence with suitable finite moments, not by linearity. If X=Y is a fair 0/1 variable, E[XY]=E[X²]=1/2, while E[X]E[Y]=1/4.
3. Variance and standard deviation
Var(X)=E[(X−μ)²], with μ=E[X], provided the second moment is finite. Expanding gives Var(X)=E[X²]−μ². Standard deviation σ_X=√Var(X). Variance is nonnegative; it is zero exactly when X equals a constant with probability one. Standard deviation has the original units; variance has squared units.
For the 0,1,2 distribution above, Var(X)=3/2−1=1/2 and σ_X=1/√2. For f(x)=2x on [0,1], Var(X)=1/2−(2/3)²=1/18 and σ_X=1/√18. Small negative variances from rounded moments indicate numerical error; an exact negative variance indicates invalid data or a calculation error.
A shift does not change spread, and scaling squares in variance:
Var(aX+b)=a²Var(X), σ_(aX+b)=|a|σ_X.
For Var(X)=4 and Y=−3X+7, Var(Y)=9×4=36 and σ_Y=6. The added seven changes the mean but not the spread. A negative scale reverses order but cannot make standard deviation negative.
4. When do variances add?
For finite second moments,
Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y),
where Cov(X,Y)=E[XY]−E[X]E[Y]. Independence implies zero covariance, so independent variables have additive variances. Uncorrelated variables also have additive variances, but uncorrelated does not generally imply independent. This distinction is included only to prevent using variance additivity without justification.
Counterexample: let Y=X. Then Var(X+Y)=Var(2X)=4Var(X), not 2Var(X), unless Var(X)=0. The two contributions move together. For independent X,Y, Var(X−Y)=Var(X)+Var(Y): the minus sign is squared, so variances do not subtract.
5. Mean, median and mode answer different questions
The mean is the probability-weighted center. A median m satisfies P(X≤m)≥1/2 and P(X≥m)≥1/2; it need not be unique. For a continuous distribution with strictly increasing CDF near the middle, solve F(m)=1/2. For discrete data, look for enough mass on each side; a formula forcing F(m)=1/2 may have no solution even when a median exists.
For ordered observations 1,2,2,3,12, the arithmetic mean is 20/5=4; the median is the middle value 2; the mode is the most frequent value 2. The large observation 12 pulls the mean upward. For an even-sized dataset, the usual descriptive convention takes the average of the two middle observations as its reported median. For 1,2,8,9 this is 5; any point in [2,8] satisfies the probability-median inequalities for the equally weighted empirical distribution, while the reporting convention selects 5.
A discrete distribution's mode is a value of maximal mass; there can be several. For a continuous density, modes are density maxima under the density representation used in the model; probability at an individual point is still zero. For f(x)=2x on [0,1], mean=2/3, median=1/√2, and the density attains its maximum at x=1. These measures need not agree.
6. Population versus sample variance convention
For an empirical population of n equally weighted observations, variance is (1/n)Σᵢ(xᵢ−x̄)². For an i.i.d. sample from a population with finite variance, the usual unbiased sample-variance estimator uses 1/(n−1) when n>1. These answer different questions. Use the question's stated convention, and do not silently interchange them.
For observations 1,3, the mean is 2 and squared deviations sum to two. Population variance is 2/2=1; the unbiased sample variance is 2/(2−1)=2. For a specified PMF, use its probability weights; no automatic n−1 adjustment belongs in Var(X).
Checklist: normalize probabilities; compute E[X] and E[X²] separately; subtract the square of the mean; take a nonnegative square root for standard deviation; state units and variance convention. Use linearity freely for finite means, but require an appropriate dependence argument before multiplying expectations or adding variances.
Original practice: six single-correct MCQs
These are original questions, not previous-year questions. Choose exactly one option.
EV01. P(X=0)=1/4, P(X=1)=1/2, P(X=2)=1/4. What is Var(X)?
A. 1 B. 3/2 C. 1/2 D. 1/√2
Answer: C
A: This is the mean and also its square, not the variance.
B: This is E[X²] before subtracting the squared mean.
C: E[X²]=3/2 and E[X]=1, so variance is 1/2.
D: This is the standard deviation.
EV02. Var(X)=4 and Y=−3X+7. Find the standard deviation of Y.
A. 6 B. −6 C. 36 D. 13
Answer: A
A: The standard deviation is |−3|√4=6.
B: Standard deviation cannot be negative.
C: This is the variance of Y, not its square root.
D: The added seven does not change spread.
EV03. X and Y have finite means but may be dependent. Which identity always holds?
A. E[XY]=E[X]E[Y] B. Var(X+Y)=Var(X)+Var(Y) C. E[X²]=(E[X])² D. E[X+Y]=E[X]+E[Y]
Answer: D
A: A product generally requires additional assumptions.
B: Finite second moments and zero covariance are needed for this version.
C: The difference is variance, which need not vanish.
D: Linearity of expectation does not require independence.
EV04. For the observations 1,2,2,3,12, what are mean, median and mode respectively?
A. 2,2,4 B. 4,2,2 C. 4,3,2 D. 2,4,2
Answer: B
A: The sum is 20, so the mean is four, not two.
B: Mean=20/5=4; middle value and most frequent value are both two.
C: The middle of five ordered observations is the third value, two.
D: This interchanges mean and median.
EV05. A standard deck has 52 cards and four aces. Three cards are drawn uniformly without replacement. What is the expected number of aces?
A. 1/13 B. 3/52 C. 3/13 D. 12/49
Answer: C
A: This is the ace probability of one draw, not the sum over three draws.
B: This treats the deck as having one ace instead of four.
C: Sum three indicator expectations, each 4/52: 12/52=3/13.
D: Every draw has marginal ace probability 4/52; 49 is not the marginal denominator.
EV06. Treat observations 1 and 3 as an entire equally weighted population. What is its variance?
A. 1 B. 2 C. 4 D. 0
Answer: A
A: Mean is two; squared deviations sum to two; divide by population size two.
B: This is the n−1 sample-variance estimator, not the requested population variance.
C: This is the squared range, not variance.
D: The observations differ, so variance is positive.
Source and scope
Mean, median, mode and standard deviation are named in Section 1 of the official GATE 2026 CS syllabus. Expectation and variance provide their probability foundations. These original examples are partial-topic teaching, not a claim of full Engineering Mathematics coverage.
Official GATE 2026 CS syllabus (verified 2026-10-14).
Sign in to keep your progress. Sign in