Random Variables and Expectation
On this page
Direct answer
A random variable assigns a number to each outcome, and its expectation is the long-run average: for a discrete variable, E(X) = Σ x·p(x), with probabilities summing to 1. Variance is E(X²) − (E(X))², and Var(aX + b) = a²Var(X), so a shift moves the centre but never the spread. Linearity needs no independence, which is why the indicator method works.
What you must remember
- Distribution check: a probability table is valid only when every p(x) ≥ 0 and the probabilities sum to 1; JEE problems often hide an unknown constant k that this sum fixes.
- Expectation: E(X) = Σ x·p(x); for a fair die E(X) = 3.5, which need not be a possible outcome.
- Variance and SD: Var(X) = E(X²) − [E(X)]² is never negative, and σ = √Var(X); for Bernoulli(p), Var = p(1 − p) ≤ 1/4.
- Shift and scale: Var(aX + b) = a²Var(X); adding 5 leaves the variance unchanged, while multiplying by 5 scales variance by 25 and SD by 5.
- Independence: E(XY) = E(X)E(Y) needs independence, or at least zero covariance, and the variance sum rule needs the same condition.
- Indicator method: for "expected number of" questions, write X as a sum of indicators, so E(I) = P(event) and linearity does the rest.
- Ordering facts: SD never exceeds (maximum − minimum)/2, and the mean deviation about the mean never exceeds the SD.
Worked distribution: two balls drawn without replacement
Take a bag with 3 red and 2 black balls, draw two without replacement, and let X count the reds. The method is to build the distribution, check it, then compute E(X) and E(X²) separately.
- Build the distribution: P(X = r) = C(3, r)·C(2, 2 − r)/C(5, 2), giving P(X = 0) = 1/10, P(X = 1) = 6/10 and P(X = 2) = 3/10.
- Check the total: the three probabilities sum to 1, so the table is valid before any expectation is taken.
- Find the mean: E(X) = 0(1/10) + 1(6/10) + 2(3/10) = 1.2.
- Find the second moment: E(X²) = 0(1/10) + 1(6/10) + 4(3/10) = 1.8.
- Subtract in order: Var(X) = E(X²) − (E(X))² = 1.8 − 1.44 = 0.36.
- Cross-check the mean: without replacement the mean is n × K/N = 2 × 3/5 = 1.2, the hypergeometric analogue of np.
Reversing the subtraction in step 5 is how negative variances appear on answer scripts.
Where the marks are lost
JEE Main stays at the table level, while JEE Advanced hides the distribution inside a game or a process.
- Trap: using E(XY) = E(X)E(Y) for dependent variables Correct: the product rule needs independence, so check that condition before multiplying expectations.
- Trap: answering a variance question with E(X²) alone Correct: Var(X) = E(X²) − [E(X)]² needs the subtraction, and omitting it gives a wrong numerical answer with no partial credit.
- Trap: thinking a shift changes the spread, or that scaling by a leaves variance unchanged Correct: a shift leaves variance as it is, and scaling by a multiplies variance by a².
- Trap: expecting the number of letters in their correct envelopes to depend on n Correct: each letter matches with probability 1/n, so the expectation is exactly 1 for any n.
Frequently asked questions
How do you find an unknown constant in a probability distribution?
Impose the condition that all probabilities sum to 1. If P(X = x) is proportional to x for x = 1 to n, then k(1 + 2 + ... + n) = 1 gives k = 2/(n(n + 1)), and every probability follows.
What is the fastest formula for the mean when sampling without replacement?
The expected number of successes is n × K/N when n items are drawn from N items containing K successes. It is the exact analogue of np for binomial sampling.
Why is Var(aX + b) = a²Var(X) and not a²Var(X) + b?
Variance measures deviations from the mean. Adding b shifts every value and the mean by the same amount, so the deviations are unchanged, while scaling by a multiplies each deviation by a and the variance by a².
When does E(XY) = E(X)·E(Y) hold?
The product rule holds when X and Y are independent, and uncorrelated variables are enough as well. For dependent variables the identity generally fails and must not be assumed.
What is the expected number of letters in their correct envelopes after a random rearrangement?
The expected number is exactly 1 for any number of letters n. Each letter has probability 1/n of matching its envelope, and expectations add even when the events are dependent.