Course contentsShow
← Mathematics
Lesson 2877 of 3,12157. Common DistributionsFree lesson

Expectation and Variance of Binomial Distribution

Derive that E[X] = np and Var(X) = np(1-p) for a binomial random variable X with parameters n and p.

Expectation and Variance of Binomial Distribution

You'll learn: How to derive that a binomial random variable X ~ Binomial(n, p) has expectation E[X] = np and variance Var(X) = np(1-p).

The Core Idea

A binomial random variable counts the number of successes in n independent Bernoulli trials, each with success probability p. Rather than computing expectation and variance directly from the PMF (which gets messy), we can use a clever trick: write X as the sum of n independent Bernoulli random variables.

The Derivation

Let X₁, X₂, ..., Xₙ be independent Bernoulli(p) random variables (each represents one trial). Then:

X = X₁ + X₂ + ... + Xₙ

From our earlier work with Bernoulli distributions, we know:

  • E[Xᵢ] = p for each i
  • Var(Xᵢ) = p(1-p) for each i

Finding the Expectation

Using linearity of expectation:

E[X] = E[X₁ + X₂ + ... + Xₙ] = E[X₁] + E[X₂] + ... + E[Xₙ] = p + p + ... + p = np

This makes intuitive sense: if you flip 10 coins with p = 0.5 each, you expect 5 heads on average.

Finding the Variance

Since the trials are independent, we can add variances:

Var(X) = Var(X₁) + Var(X₂) + ... + Var(Xₙ) = p(1-p) + p(1-p) + ... + p(1-p) = np(1-p)

Notice how variance depends on both n and the "uncertainty" term p(1-p), which is maximized when p = 0.5.

Key Takeaway: For X ~ Binomial(n, p), the expectation is E[X] = np (the average number of successes) and the variance is Var(X) = np(1-p), derived by viewing X as a sum of independent Bernoulli trials.