🎯 Expected Value and Variance — Understanding Expectation in Probability

author-img Rishabh October 27, 2025

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.

TypeExampleFormula Type
DiscreteNumber of heads in 3 coin tossesE[X]=∑xP(x)E[X] = \sum xP(x)E[X]=∑xP(x)
ContinuousTime until a bus arrivesE[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

PropertyFormula
LinearityE[aX+b]=aE[X]+bE[aX + b] = aE[X] + bE[aX+b]=aE[X]+b
Sum of variablesE[X+Y]=E[X]+E[Y]E[X + Y] = E[X] + E[Y]E[X+Y]=E[X]+E[Y]
ConstantE[c]=cE[c] = cE[c]=c
Independent scalingE[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

PropertyFormula
ScalingVar(aX+b)=a2Var(X)\text{Var}(aX + b) = a^2\text{Var}(X)Var(aX+b)=a2Var(X)
Sum of Independent VariablesVar(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 independentVar(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

  1. ❌ Forgetting to square deviations for variance.
  2. ❌ Using population formula when sample version needed (n−1).
  3. ❌ Assuming E[XY] = E[X]E[Y] without independence.
  4. ❌ 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

No tags found

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts