← All notesMaths AA · Random variables, binomial and normal distributions⬇ Download PDF
IB DP Maths AA · Topic 4 Statistics and probability · SL 4.7–4.9, 4.12 · AHL 4.14 · ~8 min read

Random variables, binomial and normal distributions

Discrete random variables and expected value, fair games, the binomial distribution with its mean and variance, the normal distribution, standardising with z-scores and inverse normal problems, and for HL: variance of discrete variables, E(aX + b), Var(aX + b) and continuous random variables with probability density functions.

Discrete random variablesExpected valueFair gamesBinomial distributionNormal distributionz-scoresInverse normalVariance & linear transformations (HL)
RSby Riyaz Sir
mentorriyaz.in
No tag = SL and HLHL ONLY HL students onlyFORMULA BOOKLET given in the examM1A1 how marks are awardedhighlight = comes up again and againTest yourself at the end

In 30 seconds

  • A discrete random variable has a table of values and probabilities that add to 1. Its expected value is E(X) = Σ x P(X = x).
  • Binomial X ~ B(n, p): a fixed number n of independent trials, each a success with the same probability p. Mean np, variance np(1 − p).
  • Normal X ~ N(μ, σ2): a symmetric bell curve for continuous data. Use the GDC for probabilities; use z = (x − μ)/σ when μ or σ is unknown.
  • HL: Var(X) = E(X2) − [E(X)]2; E(aX + b) = aE(X) + b and Var(aX + b) = a2Var(X); a continuous variable has a pdf f(x) with total area 1.

By the end you can

  • Find probabilities and expected values for discrete random variables, and decide whether a game is fair.
  • Recognise binomial situations and find binomial probabilities, mean and variance.
  • Find normal probabilities and use inverse normal calculations.
  • Standardise with z-scores to find an unknown mean or standard deviation.
  • Find the variance of a discrete variable and use E(aX + b) and Var(aX + b). HL
  • Use a pdf to find probabilities, the mean, variance, median and mode of a continuous random variable. HL

1Discrete random variables

xP(X = x)10.120.230.340.40.10.20.30.4ΣP = 1E(X) = Σx P(X = x) = 3
The bars must add to 1; the expected value is the balance point.
E(X) = Σ x P(X = x) FORMULA BOOKLET
the long-run average value
Worked example

X takes the values 1, 2, 3, 4 with P(X = x) = kx. Find k and E(X).

  1. k + 2k + 3k + 4k = 1 ⇒ k = 0.1 M1A1
  2. E(X) = 1(0.1) + 2(0.2) + 3(0.3) + 4(0.4) M1
  3. = 3 A1
  • Fair game: the expected gain (winnings minus the cost to play) is 0.
Worked example

A game costs $3. You roll a fair die: a 6 wins $10, a 5 wins $5, anything else wins nothing. Is the game fair?

  1. E(winnings) = 10(16) + 5(16) = 2.5 M1A1
  2. E(gain) = 2.5 − 3 = −$0.50, so it is not fair (it favours the organiser) R1

2The binomial distribution

xP0123456789100.10.2X ~ B(10, 0.3), mean np = 3red: P(X ≤ 2) = 0.383tallest bar at x = 3
B(10, 0.3): the shape peaks near the mean np = 3.
P(X = r) = nCr pr(1 − p)n − r
r successes in n trials; in exams the GDC does this for you
E(X) = np, Var(X) = np(1 − p) FORMULA BOOKLET
mean and variance
  • The four conditions: a fixed number of trials; two outcomes (success or failure); constant p; independent trials. Say which one fails if a situation isn't binomial.
Worked example

X ~ B(10, 0.3). Find P(X = 3), P(X ≤ 2) and P(X ≥ 3).

  1. P(X = 3) = 10C3(0.3)3(0.7)7 = 0.267 A1
  2. P(X ≤ 2) = 0.383 (binomial cdf) A1
  3. P(X ≥ 3) = 1 − 0.383 = 0.617 A1
Worked example

The probability that a seed grows is 0.2. Five seeds are planted. Find the probability that at least one grows.

  1. P(none) = 0.85 = 0.32768 M1
  2. P(at least one) = 1 − 0.32768 = 0.672 A1
Common mistakeTreating "at least 3" as P(X > 3). For a discrete variable, P(X ≥ 3) = 1 − P(X ≤ 2). Write the inequality out every time before you press any buttons.

3The normal distribution

1461541621701781861940.628μ = 170height (cm)X ~ N(170, 8²)P(160 < X < 175)= 0.62868% within μ ± σSymmetric about μ; total area = 1.
The shaded area is the probability. Sketch it every time: it stops most sign errors.
  • Facts: symmetric about μ; about 68% of values are within μ ± σ, 95% within μ ± 2σ and 99.7% within μ ± 3σ.
Worked example

Heights are normally distributed, X ~ N(170, 82) cm. Find P(X > 180), P(160 < X < 175) and the height exceeded by only 10% of people.

  1. P(X > 180) = 0.106 A1
  2. P(160 < X < 175) = 0.628 A1
  3. P(X < k) = 0.9 ⇒ k = 180 cm (inverse normal) M1A1
z = x − μσ FORMULA BOOKLET
standardising: Z ~ N(0, 1)
Worked example

X ~ N(60, σ2) and P(X < 50) = 0.2. Find σ.

  1. inverse normal: z = −0.8416 M1
  2. 50 − 60σ = −0.8416 M1
  3. σ = 11.9 A1
Exam tipThe GDC's inverse normal works with the area to the left by default. For "the top 5%", use area 0.95 (or change the tail setting).
Common mistakeEntering the variance instead of the standard deviation. N(170, 64) means σ = 8. The GDC asks for σ.

4Variance and linear transformations HL

Var(X) = E(X2) − [E(X)]2 FORMULA BOOKLET
E(X2) = Σ x2P(X = x)
E(aX + b) = aE(X) + b, Var(aX + b) = a2Var(X) FORMULA BOOKLET
adding b moves the distribution but doesn't spread it
Worked example

For X above (P(X = x) = 0.1x, x = 1, 2, 3, 4), find Var(X) and Var(5X − 2).

  1. E(X2) = 0.1 + 0.8 + 2.7 + 6.4 = 10 M1
  2. Var(X) = 10 − 32 = 1 A1
  3. Var(5X − 2) = 25 × 1 = 25 A1

5Continuous random variables HL

xf(x)01230.51area 0.5median 2.38f(x) = x²/9, 0 ≤ x ≤ 3total area = 1E(X) = 2.25
Probability is area under the pdf. The median splits the area in half.
∫ f(x) dx = 1 over the domain, P(a < X < b) = ∫ab f(x) dx
a pdf is never negative
E(X) = ∫ x f(x) dx, Var(X) = ∫ x2 f(x) dx − μ2 FORMULA BOOKLET
same ideas as the discrete case, with ∫ for Σ
Worked example

f(x) = kx2 for 0 ≤ x ≤ 3 (and 0 elsewhere). Find k, E(X), the median and Var(X).

  1. ∫03 kx2 dx = 9k = 1 ⇒ k = 19 M1A1
  2. E(X) = ∫03 x39 dx = 8136 = 2.25 A1
  3. median m: m327 = 0.5 ⇒ m = 2.38 M1A1
  4. E(X2) = ∫03 x49 dx = 5.4, so Var(X) = 5.4 − 2.252 = 0.3375 A1
  • Mode of a continuous variable: where f(x) is greatest (the maximum of the pdf, which may be at an end of the domain). Here the mode is 3.
GDC (calculator) methodPaper 2: use binompdf for P(X = r), binomcdf for P(X ≤ r), normalcdf for a range, and invNorm for a value. Write the distribution and the probability statement (for example X ~ B(10, 0.3), P(X ≤ 2)) before the answer.
Linking questionThe rules here rest on the probability ideas in Statistics and probability. Continuous random variables use definite integrals (Integration and kinematics), and the binomial coefficients are the nCr numbers from the binomial theorem (Sequences, series and the binomial theorem).
Idea for your IA / explorationTest whether a real data set (heights, exam scores, reaction times) is close to normal by comparing its percentages within μ ± σ and μ ± 2σ with 68% and 95%, or model a real game of chance and compute its expected value.

Test yourself — cover the answers first

Quick check

  1. E(X) of a fair six-sided die?
  2. X ~ B(20, 0.4). Find E(X).
  3. X ~ B(20, 0.4). Find Var(X).
  4. X ~ N(50, 4²). What percentage is roughly above 58?
  5. Find z for x = 65 when μ = 50 and σ = 5.
  6. HL Var(X) = 4. Find Var(3X + 1).

Exam-style

  1. Scores are normal with mean μ and SD σ. 10% score below 40 and 20% score above 70. Find μ and σ.
  2. HL X has pdf f(x) = 34x(2 − x) for 0 ≤ x ≤ 2. Find P(X < 0.5) and state E(X) without integrating.
Show answers
  1. 3.5
  2. 8
  3. 4.8
  4. about 2.5%
  5. 3
  6. 36
  7. 40 − μσ = −1.2816 and 70 − μσ = 0.8416
    subtract: 30 = 2.1232σ ⇒ σ = 14.1
    μ = 58.1
  8. ∫00.5 34(2x − x2) dx = 34(0.25 − 124) = 532 = 0.156
    the pdf is symmetric about x = 1, so E(X) = 1
Practise this chapter
Next chapterDifferentiation →
Stuck on a question?

Send it to me on WhatsApp. I read every message.

Want regular help? Send this to your parent →
Share with a friendAsk Riyaz Sir

Independent notes written by Riyaz Sir. Not produced, endorsed or approved by the International Baccalaureate Organization. Syllabus codes refer to the IB DP subject guides.