๐ŸŽฏ Expected Value and Variance โ€” Understanding Expectation in Probability

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

Leave a Comment

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

Scroll to Top