Expected Value and Variance — What Averages Really Mean

Learn expected value and variance with clear explanations, worked examples, and practice problems.

CBSE JEE-MAIN NEET 10 min read

What Expected Value Really Means

If you roll a fair die many times, you don’t always get a 3.5 — but if you average your results over thousands of rolls, you get closer and closer to 3.5. This is the expected value: the long-run average outcome of a random experiment.

Expected value (and variance) are the two most important numbers to characterise a random variable. They tell you where the distribution is centred (expected value) and how spread out it is (variance).

For CBSE Class 12 and JEE Main, these concepts appear in Chapter 13 (Probability) and are tested in both theoretical and computational forms.


Key Terms and Definitions

Random Variable (RV) — A variable whose value is determined by the outcome of a random experiment. Denoted X, Y, etc.

Discrete RV — Takes a countable number of values (e.g., number of heads in 3 coin tosses: 0, 1, 2, 3).

Continuous RV — Takes any value in a range (e.g., height of a student). CBSE Class 12 focuses mainly on discrete RVs.

Probability Distribution — A table (or function) listing all possible values of the RV and their probabilities.

Expected Value (Mean) E(X) — The weighted average of all possible values, weighted by their probabilities.

Variance Var(X) — The average squared deviation from the mean; measures spread.

Standard Deviation σ — Square root of variance; same units as the RV.


Formulas — The Core

E(X)=ixiP(X=xi)E(X) = \sum_{i} x_i \cdot P(X = x_i)

Also denoted μ\mu (mu).

Var(X)=E(X2)[E(X)]2\text{Var}(X) = E(X^2) - [E(X)]^2

where E(X2)=ixi2P(X=xi)E(X^2) = \sum_i x_i^2 \cdot P(X = x_i)

Standard deviation: σ=Var(X)\sigma = \sqrt{\text{Var}(X)}

E(aX+b)=aE(X)+bE(aX + b) = a \cdot E(X) + b Var(aX+b)=a2Var(X)\text{Var}(aX + b) = a^2 \cdot \text{Var}(X) E(X+Y)=E(X)+E(Y)(always)E(X + Y) = E(X) + E(Y) \quad \text{(always)} Var(X+Y)=Var(X)+Var(Y)(only if X, Y are independent)\text{Var}(X + Y) = \text{Var}(X) + \text{Var}(Y) \quad \text{(only if X, Y are independent)}

Understanding E(X) Geometrically

The expected value is the “balancing point” or centre of gravity of the probability distribution.

If you imagine the probability distribution as weights placed on a number line (heavier weight where probability is higher), E(X)E(X) is the point where the system balances. This is why E(X)E(X) is also called the mean.

A skewed distribution’s expected value is pulled toward the heavy tail — it’s not necessarily the most likely outcome.


Understanding Variance — The Spread

Variance measures how much the values of X cluster around the mean. Low variance = values tightly clustered. High variance = values spread widely.

The formula Var(X)=E(X2)[E(X)]2\text{Var}(X) = E(X^2) - [E(X)]^2 is a computational shortcut. The conceptual formula is:

Var(X)=E[(Xμ)2]=i(xiμ)2P(X=xi)\text{Var}(X) = E\left[(X - \mu)^2\right] = \sum_i (x_i - \mu)^2 \cdot P(X = x_i)

We square the deviations to make all terms positive (otherwise positive and negative deviations would cancel out).


Solved Examples

Easy — CBSE Class 12 Level

Q: A die is thrown. Let X be the number obtained. Find E(X) and Var(X).

Solution:

X takes values 1, 2, 3, 4, 5, 6, each with probability 1/6.

E(X)=k=16k16=16(1+2+3+4+5+6)=216=3.5E(X) = \sum_{k=1}^{6} k \cdot \frac{1}{6} = \frac{1}{6}(1+2+3+4+5+6) = \frac{21}{6} = 3.5 E(X2)=k=16k216=16(1+4+9+16+25+36)=916E(X^2) = \sum_{k=1}^{6} k^2 \cdot \frac{1}{6} = \frac{1}{6}(1+4+9+16+25+36) = \frac{91}{6} Var(X)=E(X2)[E(X)]2=916(3.5)2=916494\text{Var}(X) = E(X^2) - [E(X)]^2 = \frac{91}{6} - (3.5)^2 = \frac{91}{6} - \frac{49}{4} =1821214712=35122.917= \frac{182}{12} - \frac{147}{12} = \frac{35}{12} \approx 2.917

Medium — JEE Main Level

Q: A random variable X has the following probability distribution:

X0123
P(X)k2k3k2k

Find k, E(X), and Var(X).

Solution:

Find k: Sum of probabilities = 1: k+2k+3k+2k=8k=1    k=18k + 2k + 3k + 2k = 8k = 1 \implies k = \frac{1}{8}.

E(X):

E(X)=018+128+238+328=0+2+6+68=148=74=1.75E(X) = 0 \cdot \frac{1}{8} + 1 \cdot \frac{2}{8} + 2 \cdot \frac{3}{8} + 3 \cdot \frac{2}{8} = \frac{0+2+6+6}{8} = \frac{14}{8} = \frac{7}{4} = 1.75

E(X²):

E(X2)=0218+1228+2238+3228=0+2+12+188=328=4E(X^2) = 0^2 \cdot \frac{1}{8} + 1^2 \cdot \frac{2}{8} + 2^2 \cdot \frac{3}{8} + 3^2 \cdot \frac{2}{8} = \frac{0+2+12+18}{8} = \frac{32}{8} = 4

Var(X):

Var(X)=4(1.75)2=43.0625=0.9375=1516\text{Var}(X) = 4 - (1.75)^2 = 4 - 3.0625 = 0.9375 = \frac{15}{16}

Hard — JEE Main Level

Q: For a Binomial distribution XB(n,p)X \sim B(n, p), prove that E(X)=npE(X) = np and Var(X)=npq\text{Var}(X) = npq where q=1pq = 1-p.

Solution:

P(X=r)=(nr)prqnrP(X = r) = \binom{n}{r} p^r q^{n-r}, r=0,1,,nr = 0, 1, \ldots, n.

E(X):

E(X)=r=0nr(nr)prqnrE(X) = \sum_{r=0}^{n} r \binom{n}{r} p^r q^{n-r}

Since the r=0r=0 term is 0, and using r(nr)=n(n1r1)r \binom{n}{r} = n \binom{n-1}{r-1}:

E(X)=nr=1n(n1r1)prqnr=npr=1n(n1r1)pr1q(n1)(r1)E(X) = n \sum_{r=1}^{n} \binom{n-1}{r-1} p^r q^{n-r} = np \sum_{r=1}^{n} \binom{n-1}{r-1} p^{r-1} q^{(n-1)-(r-1)}

Let j=r1j = r-1: =npj=0n1(n1j)pjqn1j=np(p+q)n1=np1=np= np \sum_{j=0}^{n-1} \binom{n-1}{j} p^j q^{n-1-j} = np(p+q)^{n-1} = np \cdot 1 = np. ✓

Similarly, Var(X)=E(X2)[E(X)]2=npq\text{Var}(X) = E(X^2) - [E(X)]^2 = npq. (Full derivation using E[X(X1)]=n(n1)p2E[X(X-1)] = n(n-1)p^2.)


Exam-Specific Tips

CBSE Class 12 Board: Chapter 13 Probability carries 10 marks. Expected value problems are worth 4–5 marks, typically presented as a word problem with a probability table. Always: (1) verify probabilities sum to 1, (2) compute E(X) and E(X²) step by step, (3) apply Var formula. Show all working.

JEE Main: Expected value questions are often embedded in binomial distribution or dice/card problems. The shortcut formulas E(X) = np, Var(X) = npq for binomial distribution must be memorised. JEE Main 2023 had a question: “If E(X) = 3 and Var(X) = 2 for Binomial distribution, find n and p.”


Common Mistakes to Avoid

Mistake 1 — Wrong variance formula: Students write Var(X) = E(X²) - E(X) instead of E(X²) - [E(X)]². The square goes around E(X), not inside it. These are very different quantities.

Mistake 2 — Forgetting to verify sum of probabilities = 1: In problems where you solve for k, always check. If P(xi)1\sum P(x_i) \neq 1 after your calculation, you’ve made an error.

Mistake 3 — Applying Var(X+Y) = Var(X) + Var(Y) for dependent variables: This only holds for independent random variables. If X and Y are dependent, there’s an extra covariance term: 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).

Mistake 4 — Confusing E(X²) with [E(X)]²: These are almost always different (unless X is constant). E(X2)[E(X)]2E(X^2) \geq [E(X)]^2 always — which is why variance is non-negative.


Practice Questions

Q1. Two coins are tossed. Let X = number of heads. Find E(X) and Var(X).

X: 0 (prob 1/4), 1 (prob 1/2), 2 (prob 1/4). E(X)=0(1/4)+1(1/2)+2(1/4)=0+0.5+0.5=1E(X) = 0(1/4) + 1(1/2) + 2(1/4) = 0 + 0.5 + 0.5 = 1. E(X2)=0+1(1/2)+4(1/4)=0+0.5+1=1.5E(X^2) = 0 + 1(1/2) + 4(1/4) = 0 + 0.5 + 1 = 1.5. Var(X) = 1.512=0.51.5 - 1^2 = 0.5. Also: this is B(2,1/2)B(2, 1/2), so E(X)=2×(1/2)=1E(X) = 2 \times (1/2) = 1 and Var(X)=2×(1/2)×(1/2)=0.5Var(X) = 2 \times (1/2) \times (1/2) = 0.5

Q2. A ticket is drawn from a box containing tickets numbered 1 to 20. Find the expected value of the number on the ticket.

Each number 1 to 20 has probability 1/20. E(X)=120k=120k=120×20×212=21020=10.5E(X) = \frac{1}{20}\sum_{k=1}^{20} k = \frac{1}{20} \times \frac{20 \times 21}{2} = \frac{210}{20} = 10.5. This is the arithmetic mean of 1 to 20, which makes sense — for a uniform distribution, the mean equals the average of min and max: (1+20)/2=10.5(1+20)/2 = 10.5.

Q3. If for a random variable X, E(2X+3)=11E(2X+3) = 11, find E(X).

E(2X+3)=2E(X)+3=11    2E(X)=8    E(X)=4E(2X+3) = 2E(X) + 3 = 11 \implies 2E(X) = 8 \implies E(X) = 4. Using the linearity property: E(aX+b)=aE(X)+bE(aX+b) = aE(X)+b.

Q4. The probability distribution of X is: P(X=0) = 0.2, P(X=1) = 0.4, P(X=2) = 0.3, P(X=3) = 0.1. Find the standard deviation.

E(X)=0(0.2)+1(0.4)+2(0.3)+3(0.1)=0+0.4+0.6+0.3=1.3E(X) = 0(0.2)+1(0.4)+2(0.3)+3(0.1) = 0+0.4+0.6+0.3 = 1.3. E(X2)=0+1(0.4)+4(0.3)+9(0.1)=0+0.4+1.2+0.9=2.5E(X^2) = 0+1(0.4)+4(0.3)+9(0.1) = 0+0.4+1.2+0.9 = 2.5. Var(X)=2.5(1.3)2=2.51.69=0.81Var(X) = 2.5 - (1.3)^2 = 2.5 - 1.69 = 0.81. σ=0.81=0.9\sigma = \sqrt{0.81} = 0.9.


FAQs

Q: Can expected value be a value X never actually takes?

Yes — and this is one of the most counterintuitive things about expected value. A fair die’s expected value is 3.5, but you never roll a 3.5. Expected value is a theoretical long-run average, not a prediction of a single outcome.

Q: Why is variance computed with squared deviations and not absolute deviations?

Absolute deviations would work conceptually, but squared deviations have nicer mathematical properties — they are differentiable, and they connect to the least squares method in statistics. The variance is also the second moment (E[X²] - [E(X)]²), which ties into deeper probability theory.

Q: What does it mean if variance = 0?

Variance = 0 means X is a constant — it takes the same value with probability 1. There is no randomness. E(X)=E(X) = that constant, and the distribution is a point mass.

Q: For a binomial distribution B(n,p), what do n, p, and q mean?

nn = number of independent trials, pp = probability of success in one trial, q=1pq = 1-p = probability of failure. E(X)=npE(X) = np (expected successes) and Var(X)=npqVar(X) = npq.


Advanced Concepts

Binomial distribution — key results

For XB(n,p)X \sim B(n, p):

PropertyFormula
P(X=r)P(X = r)(nr)prqnr\binom{n}{r}p^r q^{n-r}
E(X)E(X)npnp
Var(X)\text{Var}(X)npqnpq
σ\sigmanpq\sqrt{npq}
ModeGreatest integer (n+1)p\leq (n+1)p

JEE Main 2023 asked: “If E(X)=3E(X) = 3 and Var(X)=2\text{Var}(X) = 2 for a binomial RV, find nn and pp.” Solution: np=3np = 3, npq=2npq = 2, so q=2/3q = 2/3, p=1/3p = 1/3, n=9n = 9.

Conditional expectation

E(XY=y)=xxP(X=xY=y)E(X | Y = y) = \sum_x x \cdot P(X = x | Y = y)

This is the expected value of XX given that YY has a specific value. It is a function of yy.

Markov’s inequality

For a non-negative random variable and any a>0a > 0:

P(Xa)E(X)aP(X \geq a) \leq \frac{E(X)}{a}

This bounds the probability of extreme values using only the mean. Chebyshev’s inequality refines this using variance.

Chebyshev’s inequality

P(Xμkσ)1k2P(|X - \mu| \geq k\sigma) \leq \frac{1}{k^2}

For any distribution (not just normal), at least 11/k21 - 1/k^2 of the data lies within kk standard deviations of the mean. For k=2k = 2: at least 75%. For k=3k = 3: at least 89%.

Additional Practice Questions

Q5. A binomial RV has n=6n = 6 and p=1/3p = 1/3. Find P(X=2)P(X = 2).

P(X=2)=(62)(1/3)2(2/3)4=15×1/9×16/81=15×16/729=240/729=80/2430.329P(X=2) = \binom{6}{2}(1/3)^2(2/3)^4 = 15 \times 1/9 \times 16/81 = 15 \times 16/729 = 240/729 = 80/243 \approx 0.329.

Q6. For a Poisson distribution with mean λ=4\lambda = 4, find Var(X)\text{Var}(X).

For Poisson: Var(X)=λ=4\text{Var}(X) = \lambda = 4. (In Poisson, mean = variance.) σ=2\sigma = 2.

Q7. If XX and YY are independent with E(X)=3E(X) = 3, E(Y)=5E(Y) = 5, Var(X)=4\text{Var}(X) = 4, Var(Y)=9\text{Var}(Y) = 9, find E(2X3Y)E(2X - 3Y) and Var(2X3Y)\text{Var}(2X - 3Y).

E(2X3Y)=2(3)3(5)=9E(2X - 3Y) = 2(3) - 3(5) = -9. Var(2X3Y)=4×4+9×9=16+81=97\text{Var}(2X - 3Y) = 4 \times 4 + 9 \times 9 = 16 + 81 = 97 (using Var(aX+bY)=a2Var(X)+b2Var(Y)\text{Var}(aX + bY) = a^2\text{Var}(X) + b^2\text{Var}(Y) for independent RVs).

Practice Questions