Skip to content
Lesson 4 of 10 · Introductory Statistics

Random variables and the binomial distribution

Describe a random quantity by its distribution, compute expected value, and use the binomial model for counts of successes.

22 min

A random variable X is a number produced by a chance process: the value of a die, the number of heads in 10 tosses. Its probability distribution lists each possible value with its probability; the probabilities add to 1.

The expected value (mean) is the long-run average: E(X) = Σ x · P(x). It need not be a value X can take. The variance measures spread: Var(X) = Σ (x − μ)² P(x), and the standard deviation is its square root.

A game: win 10 with probability 0.2, lose 3 with probability 0.8. E(X) = 10(0.2) + (−3)(0.8) = 2 − 2.4 = −0.4. On average you lose 0.4 per play, even though you sometimes win.

Use it when you count successes in a fixed number of trials. Check four conditions:

  1. 1.A fixed number n of trials.
  2. 2.Each trial has two outcomes: success or failure.
  3. 3.The trials are independent.
  4. 4.The probability of success p is the same every time.

Then X ~ Binomial(n, p) and

P(X = k) = C(n, k) pᵏ (1 − p)ⁿ⁻ᵏ, mean = np, SD = √[np(1 − p)]

where C(n, k) = n!/(k!(n − k)!) is the number of ways to place k successes among n trials.

For "at least one", use the complement: P(X ≥ 1) = 1 − P(X = 0) = 1 − (1 − p)ⁿ.

A basketball player makes 30% of free throws. She takes 5. Find P(exactly 2 makes) and P(at least 1 make).

  1. 1

    n = 5, p = 0.3, k = 2

    Check the conditions: fixed n, two outcomes, independent shots, constant p.

1/4
Try it

For n = 10, p = 0.3 the mean is 3 and the SD is about 1.45. Keep p = 0.5 and raise n to 100: the mean is 50, the SD only 5. The SD grows like √n, much more slowly than the mean. Where is the spread largest for a given n?

10
0.30

Standard deviation of the number of successes

—

Common misconception

“If a coin has come up heads five times in a row, tails is now 'due'.”

Over many tosses heads and tails even out, and it feels like something must pull them back.

What is actually true

Tosses are independent: the coin has no memory. The chance of tails on the next toss is still 1/2. The proportion evens out because new tosses dilute the early streak, not because later tosses compensate.

How to catch yourself

Ask: does the process remember? If not, past results do not change the next one.

  • E(X) = Σ x · P(x): the long-run average.
  • Binomial needs fixed n, two outcomes, independent trials, constant p.
  • P(X = k) = C(n, k) pᵏ(1 − p)ⁿ⁻ᵏ; mean np; SD √[np(1 − p)].
  • 'At least one' is usually 1 − P(none).
  • Independent trials have no memory.
Check yourself

Practice.

1Numeric answer

X ~ Binomial(10, 0.3). Find the mean.

2Numeric answer

X ~ Binomial(10, 0.3). Find the standard deviation (2 decimals).

3Numeric answer

X ~ Binomial(10, 0.3). Find P(X = 3) to 3 decimals.

4Numeric answer

You win 10 with probability 0.2 and lose 3 with probability 0.8. Expected result per play?

5Select all that apply

Which of these is a binomial situation?

  • ANumber of sixes in 20 rolls of a fair die
  • BNumber of cards drawn until the first ace
  • CNumber of defective items in a random batch of 50 where each is defective with probability 0.02, independently
  • DHeight of 10 random people

Practise this lesson, not just read it

In BiliMind the questions above are marked when you answer, the flashcards come back on a schedule, and the rest of Introductory Statistics is planned around your week. Free.