QED
Probability · step 13 of 13

Indicator random variables

An indicator 1_A takes the value 1 when A occurs and 0 otherwise, so E[1_A] = P(A) — expectation and probability become the same computation. Since 1_A² = 1_A, the variance is P(A)(1 − P(A)). Writing any count as a sum of indicators and applying linearity is the single most productive technique in discrete probability.

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. Define one indicator per eventXᵢ = 1 if the ith thing happens. Be precise about what "the ith thing" is.
  2. Express the count as their sumX = ΣXᵢ. Verify that the sum really counts what you want.
  3. Use E[Xᵢ] = P(event i)The expectation of an indicator is just a probability, so no distribution work is needed.
  4. Add for the expectation; add covariances for the varianceVar(ΣXᵢ) = ΣVar(Xᵢ) + 2ΣCov(Xᵢ,Xⱼ), and the covariances usually do not vanish.

Worked example

A fair die is rolled 60 times. Find the expected number of sixes, using indicators.

  1. Let Xᵢ = 1 if roll i is a six, for i = 1 … 60.
  2. The total number of sixes is X = X₁ + … + X₆₀.
  3. E[Xᵢ] = P(six on roll i) = 1/6.
  4. By linearity, E[X] = 60 × 1/6.

Answer. E[X] = 10 — agreeing with the binomial mean np = 60 × 1/6.

Where marks get dropped

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

Practise this until it is automatic

Unlimited fresh questions

QED generates new indicator random variables 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.

Indicator random variables — frequently asked questions

Why is E[1_A] = P(A)?

Because E[1_A] = 1·P(A) + 0·P(Aᶜ) = P(A). The definition of expectation collapses to the probability.

What is the variance of an indicator?

p(1 − p) where p = P(A), since E[1_A²] = E[1_A] = p and Var = p − p².

Where does this technique shine?

Expected number of fixed points in a permutation, expected collisions in hashing, expected inversions in a random list — all become one line.

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 indicator random variables 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 →