A random variable compresses an experiment into a number, and the distribution table records how often each of those numbers arrives. Every quantity in this lesson â mean, variance, standard deviation, cumulative function â is a summary of that single table, so the marks come from building the table correctly and from interpreting the summaries rather than from memorising the formulas that compress them.
From the Experiment to the Distribution Table
Start with the sample space and fix the number being recorded, because a distribution built on the wrong assignment is wrong in every summary that follows. For two tossed coins with counting heads, the space is , the readings of are , , , and grouping the equally likely outcomes gives probabilities , , . Two conditions then certify the table: every entry must lie between and , and the entries must total exactly . A table reading , , fails the second test immediately, which usually means an outcome was counted twice or left out. Experiments with weighted outcomes break the habit of simply counting equally likely cases. If a bag holds 3 red and 7 blue balls and counts red balls in two draws made with replacement, the entries come from multiplication rather than listing: , , , and the three do total , so the table stands.
Mean (Expected Value)
The mean is the balance point of the table rather than one of its readings. For the distribution used below, values , , , with probabilities , , , , the mean is , a number the variable never actually takes. Repeat the experiment a thousand times and the total should settle near , which is what the law of large numbers turns that balance point into a statement about long runs. Placing the mean also tells you where the table's weight sits: here more than half the probability () lies on the two central values, which is why the mean falls between and rather than nearer either end.
Variance
where .
The variance measures typical squared wander around the balance point, and it must be computed from the second moment, not by averaging squared distances after subtracting an approximate mean by eye. Squaring before averaging is what makes the shortcut exact. The quantity is also never negative: cannot drop below zero for any distribution, so a hand calculation that produces a negative variance has an arithmetic error somewhere â most often probabilities that do not total , or a value of copied without its square.
Standard Deviation
For the running example the standard deviation is , and because it is a square root it carries the same unit as itself. That makes it directly readable against the table: values of and sit within one standard deviation of the mean , while and lie about two standard deviations away. The pair therefore covers the heart of the distribution, and widening to two standard deviations covers every value the table assigns. When a question asks which of two distributions is more scattered, compare standard deviations rather than variances, since the comparison stays in the original units.
Example: Find Mean and Variance
Find the mean and variance of:
| 0 | 1 | 2 | 3 | |
|---|---|---|---|---|
| 0.1 | 0.3 | 0.4 | 0.2 |
Properties of Mean
Linearity is what makes the mean cheap to compute: split the random variable into parts, average each part separately, and recombine. If for the table above, then , a number you can obtain either from the formula or by transforming the table first and summing again. The property also explains why adding a constant changes only the centre: the whole distribution slides, and its average slides with it by exactly that amount.
Properties of Variance
The square on the multiplier is the mark-losing detail. For the same transformation , the variance becomes while the mean moves to ; the added constant contributes nothing to the spread, because shifting a distribution cannot make it any more scattered than it was. Two quick sanity checks follow from the formulas: the mean of lies between times the smallest and times the largest value of (adjusted for the sign of ), and the variance must stay non-negative after every transformation, so a negative result means the arithmetic, not the property, is at fault.
Example: Find Probability Distribution
Two coins are tossed. Let be the number of heads. Find the probability distribution of .
The same table gives , so the variance is and the standard deviation is . The spread sits below one unit, which matches a variable that can only wander from to around a mean pinned at the centre.
Cumulative Distribution Function
For the four-value table above the function climbs in four steps: , , , , and it holds each level until the next value of arrives. Range probabilities come from differences, so , which agrees with adding and directly. The convention matters: because includes its right endpoint, subtracting two values of counts the right endpoint and excludes the left one, and matching that convention to the wording of a question is where range probabilities are usually lost.
Checking a Distribution in Python
Both the table construction and its summaries can be reproduced mechanically, which turns a doubtful hand calculation into a quick referee. The first script builds the two-coin distribution from the outcomes themselves and reports the totals.
from itertools import product
outcomes = list(product('HT', repeat=2))
p = {0: 0.0, 1: 0.0, 2: 0.0}
for o in outcomes:
p[o.count('H')] += 1 / len(outcomes)
mean = sum(x * pr for x, pr in p.items())
var = sum(x * x * pr for x, pr in p.items()) - mean ** 2
print("distribution:", {k: round(v, 4) for k, v in sorted(p.items())})
print("sums to :", round(sum(p.values()), 10))
print("mean :", mean, " variance:", round(var, 4))
The output reads {0: 0.25, 1: 0.5, 2: 0.25}, a total of exactly , a mean of and a variance of , matching the worked example above digit for digit.
The second script works from the four-value table, prints the cumulative staircase, and recovers a range probability as a difference.
values = [0, 1, 2, 3]
probs = [0.1, 0.3, 0.4, 0.2]
def F(t):
return sum(p for x, p in zip(values, probs) if x <= t)
for t in (-1, 0, 0.5, 1, 2, 3, 4):
print(f"F({t}) = {F(t):.2f}")
print("P(0 < X <= 2) =", round(F(2) - F(0), 2))
print("mean =", round(sum(x * p for x, p in zip(values, probs)), 4))
Every jump in the printed staircase lands exactly on a value the variable can take, the height of each jump equals the probability assigned there, and the flat stretch between and shows where no probability accumulates.
How CBSE Frames Distribution Questions
Three-mark items give a compact experiment â two coins, a single die, a bag drawn twice â and ask for the table, the mean and the variance in that order, with marks attached to listing the values, assigning probabilities that total one, and only then to the final numbers. Four-mark items add a cumulative part: build first, then read a probability such as off it as a difference of two values. Two traps account for most lost marks â treating the mean as an attainable outcome, and multiplying the variance by instead of when a random variable is transformed. The fastest self-checks are that the probabilities total one, that the mean falls between the smallest and largest value of , and that the standard deviation comes out as the square root of a positive number.
Common Mistakes
Handing in a probability table whose entries do not total exactly one
Fix: Add the entries before anything else; a table reading 0.3, 0.3, 0.3 fails immediately and usually means an outcome was counted twice or missed out.
Reporting the mean as a value the random variable can take
Fix: The mean 1.7 for the table 0, 1, 2, 3 is the balance point for long-run averages, while X itself only ever reads 0, 1, 2 or 3.
Scaling the variance by a instead of a squared in a transformation
Fix: Var(aX + b) equals a squared times Var(X), so Y = 4X + 2 has variance 16 times 0.81, that is 12.96, even though its mean moves to 8.8.
Key Takeaways
- A valid discrete distribution has every entry between zero and one and entries totalling exactly one, and it is built from the sample space before any summary is taken
- The mean is the balance point of the table and never needs to be one of its readings, while the variance is computed from the second moment and can never be negative
- E(aX + b) equals a times E(X) plus b, but Var(aX + b) equals a squared times Var(X), because shifting does not spread a distribution while scaling does
- The cumulative function is a non-decreasing staircase whose jumps are the probabilities themselves, and range probabilities are differences of two of its values