QED
Probability · step 4 of 13

Random variables & expected value

A discrete random variable assigns a number to each outcome, and its distribution lists the values with their probabilities, which must sum to 1. The expected value E[X] = Σ x·P(X = x) is the long-run average, and it need not be an attainable value — the expected roll of a die is 3.5, which no face shows.

Unlimited questions · marked criterion by criterion · no card needed

Method: how to approach it

The order below is what examiners expect to see, and each step carries its own marks.

  1. Build the probability distributionList every value X can take and its probability. Check the probabilities sum to 1 before going further.
  2. Compute E[X] as a weighted sumMultiply each value by its probability and add. Keep fractions exact.
  3. Use E[g(X)] = Σ g(x)P(X = x)For a function of X, weight g(x) rather than x. Note E[X²] ≠ (E[X])².
  4. Exploit linearityE[aX + b] = aE[X] + b, and E[X + Y] = E[X] + E[Y] whether or not X and Y are independent.

Worked example

X is the number of heads in two fair coin tosses. Find the distribution and E[X].

  1. Outcomes HH, HT, TH, TT each with probability 1/4.
  2. P(X=0) = 1/4, P(X=1) = 2/4, P(X=2) = 1/4. These sum to 1 ✓.
  3. E[X] = 0(1/4) + 1(1/2) + 2(1/4).
  4. = 0 + 0.5 + 0.5.

Answer. E[X] = 1 — matching np = 2 × 1/2 for a binomial.

Where marks get dropped

These are the specific errors that cost credit on random variables & expected value questions — QED's rubric penalises each of them separately.

Practise this until it is automatic

Unlimited fresh questions

QED generates new random variables & expected value problems on demand at warm-up, exam and challenge level, so you can drill this one skill until it stops costing you marks.

Marked like an examiner

Every answer is scored against a point-by-point rubric with partial credit, so you see exactly which step of the method broke down — not just a tick or a cross.

Answer in real notation

A one-tap symbol palette, a visual equation editor and a truth-table builder — or photograph your handwritten working and QED converts it to LaTeX.

Saved to your library

Every question you generate is kept and re-takeable as a timed exam, and your Probability mastery is tracked so you know when this is exam-ready.

Random variables & expected value — frequently asked questions

Must the expected value be attainable?

No. A fair die has E[X] = 3.5, and the expected number of children per family is famously non-integer. It is an average, not a prediction.

Does E[XY] = E[X]E[Y]?

Only when X and Y are independent. The general identity involves the covariance: E[XY] = E[X]E[Y] + Cov(X,Y).

What is linearity of expectation good for?

It holds without independence, so complicated sums become easy. Splitting a count into indicator variables and summing their expectations is the standard trick.

The rest of Probability

Events, conditional probability, random variables. Each subtopic below has its own method, worked example and mark-losing traps.

Ready to make random variables & expected value exam-proof?

Generate your first questions free — no card, no setup, no personal data stored. Practise until the method is second nature.

Start practising free →