On this page
Many students can find the probability of a single event but freeze when a question asks for "the mean of the number of sixes" or "the variance of X". The idea behind both is short, and the method is the same every time. This post shows you how to build a probability distribution, how to get its mean and variance, and where marks are usually lost.
Is this topic in the JEE and CBSE syllabus?
For JEE, yes. Unit 13 of the NTA Syllabus for JEE (Main) 2026 ends with "Baye's theorem, probability distribution of a random variable". The syllabus line does not spell out mean and variance, but they are the standard way to summarise a distribution, so practise them too.
For CBSE boards, the picture has changed. The CBSE Mathematics curriculum for 2026-27 lists only conditional probability, the multiplication theorem, independent events, total probability and Bayes' theorem for Class XII. The NCERT Class 12 probability chapter (reprint 2026-27) still defines a random variable in a short remark, but the worked sections on distributions are no longer in the book. If you are preparing only for boards, treat this as JEE material. Check the syllabus for your own exam year.
What is a random variable?
NCERT's definition is the one to remember: a random variable is a real-valued function whose domain is the sample space. Toss a coin twice. The sample space is HH, HT, TH, TT. If X is the number of heads, then X(HH) = 2, X(HT) = 1, X(TH) = 1 and X(TT) = 0.
A probability distribution lists every value of X with its probability. Two checks apply to every distribution:
Each probability lies between 0 and 1.
The probabilities add up to exactly 1.
How do you find the mean and variance?
Mean (expected value): E(X) = sum of x × P(x).
Variance: Var(X) = E(X²) − [E(X)]², where E(X²) = sum of x² × P(x).
Standard deviation: the square root of the variance.
Worked example 1. X takes the values 1, 2, 3, 4 with P(X = x) = kx. Find k, the mean and the variance.
Probabilities add to 1: k(1 + 2 + 3 + 4) = 10k = 1, so k = 1/10.
E(X) = (1×1 + 2×2 + 3×3 + 4×4)/10 = 30/10 = 3.
E(X²) = (1×1 + 4×2 + 9×3 + 16×4)/10 = (1 + 8 + 27 + 64)/10 = 100/10 = 10.
Var(X) = 10 − 3² = 1, so the standard deviation is 1.
Worked example 2. A fair die is thrown twice. Let X be the number of sixes.
P(X = 0) = (5/6)(5/6) = 25/36.
P(X = 1) = 2 × (1/6)(5/6) = 10/36, since the six can come on either throw.
P(X = 2) = (1/6)(1/6) = 1/36. Check: 25 + 10 + 1 = 36, so the total is 1.
E(X) = (0 × 25 + 1 × 10 + 2 × 1)/36 = 12/36 = 1/3.
E(X²) = (0 + 1 × 10 + 4 × 1)/36 = 14/36 = 7/18.
Var(X) = 7/18 − (1/3)² = 7/18 − 2/18 = 5/18.
A useful sense check: on average you expect one six in six throws, so one third of a six in two throws is right.
What does the mean tell you in a real question?
The mean is a long-run average, not a value X must take. Worked example 3. You pay 10 rupees to throw a die. You win 30 rupees for a six, 12 rupees for a five and nothing otherwise. Expected winnings = 30 × 1/6 + 12 × 1/6 = 5 + 2 = 7 rupees. Your expected gain is 7 − 10 = −3 rupees per game, so over many games you lose about 3 rupees each time, even though no single game loses exactly 3.
Two rules save time when X is scaled or shifted. For Y = aX + b, E(Y) = aE(X) + b and Var(Y) = a²Var(X). In worked example 1, Y = 3X + 2 has mean 3 × 3 + 2 = 11 and variance 9 × 1 = 9. Adding 2 moves every value but does not change the spread.
Common mistakes and how to avoid them
Keeping an impossible value of k. Suppose P(X = 0) = k, P(X = 1) = 2k² and P(X = 2) = 4k². Then 6k² + k − 1 = 0, which factorises as (3k − 1)(2k + 1) = 0. The root k = −1/2 makes P(X = 0) negative, so only k = 1/3 is allowed. Check: 1/3 + 2/9 + 4/9 = 1.
Writing E(X²) − E(X) for the variance. The second term is the square of the mean.
Using Var(3X) = 3Var(X). Scaling by a multiplies the variance by a².
Confusing the variance of data with the variance of a distribution. For data you average over observations; here you weight by probabilities. Our post on mean, variance and standard deviation for data covers the first kind.
Getting the probabilities wrong before you start. If two-step events trip you up, revise conditional probability and Bayes' theorem and our list of common probability reasoning mistakes.
A practice routine for one week
Day 1: Five "find k" questions. For each, check every probability is between 0 and 1.
Day 2: Build distributions from experiments: coins, dice, drawing balls without replacement. Write the table every time.
Day 3: Mean and variance for each table from day 2. Check the mean against your intuition.
Day 4: Games and expected gain. Decide whether each game is fair (expected gain zero).
Day 5: Mixed timed set of eight, including Y = aX + b questions.
When you get one wrong and cannot see why, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer, so you can compare your table and formulas with a full solution line by line.
Tonight, redo worked example 2 for three throws instead of two, and check that your mean comes out as 1/2.



