Author: Rishabh Kumar (IIT + ISI | Global Math Mentor)**
Published: October 2025
Category: Probability & Statistics
๐น Introduction
In probability, every random event carries uncertainty โ but we can still measure what happens on average.
Thatโs what expected value (or expectation) tells us.
Expected Value = the โcenter of gravityโ of a random variableโs distribution.
Similarly, variance tells us how much values spread out around that mean.
Together, they describe both location and variability โ the foundation of all statistical analysis.
๐งญ 1๏ธโฃ Random Variables
A random variable assigns a numerical value to each outcome of a random process.
| Type | Example | Formula Type |
|---|---|---|
| Discrete | Number of heads in 3 coin tosses | E[X]=โxP(x)E[X] = \sum xP(x)E[X]=โxP(x) |
| Continuous | Time until a bus arrives | E[X]=โซxf(x)dxE[X] = \int x f(x) dxE[X]=โซxf(x)dx |
โก๏ธ 2๏ธโฃ Expected Value (Mean of a Random Variable)
๐น Definition
If a discrete random variable XXX takes values x1,x2,…,xnx_1, x_2, …, x_nx1โ,x2โ,…,xnโ with probabilities P(X=xi)P(X=x_i)P(X=xiโ), then: E[X]=โi=1nxiP(X=xi)\boxed{E[X] = \sum_{i=1}^n x_i P(X = x_i)}E[X]=i=1โnโxiโP(X=xiโ)โ
For a continuous random variable: E[X]=โซโโโxf(x)โdx\boxed{E[X] = \int_{-\infty}^{\infty} x f(x)\,dx}E[X]=โซโโโโxf(x)dxโ
โ It represents the weighted average of all possible outcomes.
๐น Example 1 โ Discrete Case
A fair die is rolled. Find E[X]E[X]E[X]. X={1,2,3,4,5,6},P(X=i)=16X = \{1, 2, 3, 4, 5, 6\}, \quad P(X=i) = \frac{1}{6}X={1,2,3,4,5,6},P(X=i)=61โ E[X]=โxP(x)=1+2+3+4+5+66=3.5E[X] = \sum xP(x) = \frac{1 + 2 + 3 + 4 + 5 + 6}{6} = 3.5E[X]=โxP(x)=61+2+3+4+5+6โ=3.5
โ The expected value of a fair die roll is 3.5 (even though itโs not a possible outcome).
๐น Example 2 โ Weighted Probabilities
A game gives $10, $5, or $0 with probabilities 0.2, 0.5, 0.3 respectively.
Find expected winnings. E[X]=10(0.2)+5(0.5)+0(0.3)=2+2.5+0=4.5E[X] = 10(0.2) + 5(0.5) + 0(0.3) = 2 + 2.5 + 0 = 4.5E[X]=10(0.2)+5(0.5)+0(0.3)=2+2.5+0=4.5
โ On average, youโd win $4.50 per game.
๐งฎ 3๏ธโฃ Properties of Expectation
| Property | Formula |
|---|---|
| Linearity | E[aX+b]=aE[X]+bE[aX + b] = aE[X] + bE[aX+b]=aE[X]+b |
| Sum of variables | E[X+Y]=E[X]+E[Y]E[X + Y] = E[X] + E[Y]E[X+Y]=E[X]+E[Y] |
| Constant | E[c]=cE[c] = cE[c]=c |
| Independent scaling | E[kX]=kE[X]E[kX] = kE[X]E[kX]=kE[X] |
Expectation is linear โ even if X and Y are dependent.
๐ 4๏ธโฃ Variance โ Measure of Spread
The variance measures how much values of X deviate from their mean. Var(X)=E[(XโE[X])2]\boxed{\text{Var}(X) = E[(X – E[X])^2]}Var(X)=E[(XโE[X])2]โ
It quantifies the dispersion around the expected value.
๐น Expanded Formula
Var(X)=E[X2]โ(E[X])2\text{Var}(X) = E[X^2] – (E[X])^2Var(X)=E[X2]โ(E[X])2
and SD (Standard Deviation)=Var(X)\text{SD (Standard Deviation)} = \sqrt{\text{Var}(X)}SD (Standard Deviation)=Var(X)โ
๐น Example 3 โ Variance of a Die
For fair die: E[X]=3.5E[X] = 3.5E[X]=3.5 E[X2]=12+22+32+42+52+626=916E[X^2] = \frac{1^2 + 2^2 + 3^2 + 4^2 + 5^2 + 6^2}{6} = \frac{91}{6}E[X2]=612+22+32+42+52+62โ=691โ Var(X)=E[X2]โ(E[X])2=916โ(3.5)2=3512โ2.92\text{Var}(X) = E[X^2] – (E[X])^2 = \frac{91}{6} – (3.5)^2 = \frac{35}{12} \approx 2.92Var(X)=E[X2]โ(E[X])2=691โโ(3.5)2=1235โโ2.92 SD=2.92โ1.71\text{SD} = \sqrt{2.92} \approx 1.71SD=2.92โโ1.71
โ On average, outcomes vary about 1.7 units from the mean.
๐ฏ 5๏ธโฃ Properties of Variance
| Property | Formula |
|---|---|
| Scaling | Var(aX+b)=a2Var(X)\text{Var}(aX + b) = a^2\text{Var}(X)Var(aX+b)=a2Var(X) |
| Sum of Independent Variables | Var(X+Y)=Var(X)+Var(Y)\text{Var}(X + Y) = \text{Var}(X) + \text{Var}(Y)Var(X+Y)=Var(X)+Var(Y) |
| If X and Y not independent | Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y)\text{Var}(X + Y) = \text{Var}(X) + \text{Var}(Y) + 2\text{Cov}(X,Y)Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y) |
โ Variance is not linear โ scaling affects it quadratically.
๐น Example 4 โ Linear Transformation
If XโผN(10,42)X \sim N(10, 4^2)XโผN(10,42), find mean and variance of Y=3Xโ5Y = 3X – 5Y=3Xโ5. E[Y]=3E[X]โ5=3(10)โ5=25E[Y] = 3E[X] – 5 = 3(10) – 5 = 25E[Y]=3E[X]โ5=3(10)โ5=25 Var(Y)=32Var(X)=9(16)=144\text{Var}(Y) = 3^2\text{Var}(X) = 9(16) = 144Var(Y)=32Var(X)=9(16)=144
โ Mean = 25, Variance = 144.
๐ 6๏ธโฃ Expectation of Functions of X
If g(X)g(X)g(X) is a function of X, E[g(X)]=โg(xi)P(X=xi)E[g(X)] = \sum g(x_i)P(X=x_i)E[g(X)]=โg(xiโ)P(X=xiโ)
or E[g(X)]=โซg(x)f(x)dxE[g(X)] = \int g(x)f(x)dxE[g(X)]=โซg(x)f(x)dx
๐น Example 5 โ Expected Square
For die roll, E[X2]=916=15.17E[X^2] = \frac{91}{6} = 15.17E[X2]=691โ=15.17
โ Used earlier in variance calculation.
๐ง 7๏ธโฃ Covariance and Independence (Optional Extension)
If X and Y are two random variables: Cov(X,Y)=E[(XโE[X])(YโE[Y])]\text{Cov}(X, Y) = E[(X – E[X])(Y – E[Y])]Cov(X,Y)=E[(XโE[X])(YโE[Y])]
- If independent, Cov(X,Y) = 0
- Variance of sums includes covariance: Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y)\text{Var}(X + Y) = \text{Var}(X) + \text{Var}(Y) + 2\text{Cov}(X,Y)Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y)
๐ 8๏ธโฃ Real-World Applications
- Statistics โ mean, variance, expectation in sampling & distributions
- Finance โ expected returns & risk (variance)
- Data Science โ expected loss, variance of estimator
- IB / A Level / AP โ discrete probability & random variable modeling
Expectation and variance describe the center and spread โ together, they summarize uncertainty completely.
๐น Common Mistakes
- โ Forgetting to square deviations for variance.
- โ Using population formula when sample version needed (nโ1).
- โ Assuming E[XY] = E[X]E[Y] without independence.
- โ Confusing variance with standard deviation.
๐ Why It Matters
Every probability distribution โ normal, binomial, Poisson, exponential โ is defined by its expectation and variance.
They quantify what happens most often and how much things vary.
Without expectation and variance, statistics would have no center or spread โ only chaos.
๐ Learn Beyond the Formula
At Math By Rishabh, expectation is taught as reasoning, not routine.
In the Mathematics Elevate Mentorship Program, youโll:
โ
Derive expectation intuitively from data,
โ
Connect variance to real-world uncertainty,
โ
Solve IB, AP, and A Level problems confidently.
๐ See randomness as structure โ not luck.
๐ Book your personalized mentorship session now at MathByRishabh.com


