Skip to content
LeetQuant
F4 Random Variables and Expectation

F4 · Random Variables and Expectation · Lesson 3 of 8

The Distributions You Need

Binomial, geometric, Poisson, uniform, exponential and normal: their means, variances, and the facts that make problems fast.

25 min

The short list

Interview questions draw on a handful of distributions. Know these by heart:

DistributionModelsMeanVariance
Bernoulli(pp)one yes/no trialppp(1−p)p(1-p)
Binomial(n,pn, p)successes in nn trialsnpnpnp(1−p)np(1-p)
Geometric(pp)trials until the first success1/p1/p(1−p)/p2(1-p)/p^2
Poisson(λ\lambda)count of rare events in a periodλ\lambdaλ\lambda
Uniform(a,ba, b)"anywhere in an interval"(a+b)/2(a+b)/2(b−a)2/12(b-a)^2/12
Exponential(λ\lambda)waiting time at constant rate1/λ1/\lambda1/λ21/\lambda^2
Normal(μ,σ2\mu, \sigma^2)sums of many small effectsμ\muσ2\sigma^2

A fair die is uniform on {1,…,6}\{1, \dots, 6\}: mean 3.53.5, variance 35/12≈2.9235/12 \approx 2.92. The discrete uniform on {1,…,n}\{1, \dots, n\} has variance (n2−1)/12(n^2 - 1)/12.

Facts that do the work

  • Memorylessness. Geometric and exponential waiting times forget the past: P(T>s+t∣T>s)=P(T>t)P(T > s + t \mid T > s) = P(T > t). Having waited 10 minutes for a Poisson bus tells you nothing about the remaining wait.
  • Racing exponentials. If T1∼Exp(λ1)T_1 \sim \text{Exp}(\lambda_1) and T2∼Exp(λ2)T_2 \sim \text{Exp}(\lambda_2) are independent, then min⁡(T1,T2)∼Exp(λ1+λ2)\min(T_1, T_2) \sim \text{Exp}(\lambda_1 + \lambda_2) and T1T_1 comes first with probability λ1/(λ1+λ2)\lambda_1 / (\lambda_1 + \lambda_2).
  • Poisson limit. Binomial(n,pn, p) with nn large and np=λnp = \lambda moderate is close to Poisson(λ\lambda). Sums of independent Poissons are Poisson.
  • Normals are closed under linear maps. If XX and YY are independent normals, aX+bYaX + bY is normal with mean aμX+bμYa\mu_X + b\mu_Y and variance a2σX2+b2σY2a^2\sigma_X^2 + b^2\sigma_Y^2.
  • Lognormal. If ln⁡X∼N(μ,σ2)\ln X \sim N(\mu, \sigma^2) then E[X]=eμ+σ2/2\mathbb{E}[X] = e^{\mu + \sigma^2/2}, larger than the median eμe^\mu.

Worked example

three light bulbs

Three bulbs have independent exponential lifetimes with mean 1000 hours. What is the expected time until the first fails, and until all three have failed?

Show solution

Each fails at rate λ=1/1000\lambda = 1/1000. The first failure is the minimum of three, which is exponential with rate 3λ3\lambda, so it comes after 1000/3≈3331000/3 \approx 333 hours on average.

By memorylessness, the two survivors are then as good as new, so the next failure takes 1000/2=5001000/2 = 500 more hours, and the last 10001000 more. In total

1000(13+12+1)≈1833 hours.1000\Big(\tfrac13 + \tfrac12 + 1\Big) \approx 1833 \text{ hours}.

Worked example

quiet minutes

Trades in a stock arrive as a Poisson process at 3 per minute. What is the probability of no trades in a given minute? Of at least two?

Show solution

The count in one minute is Poisson(3).

P(0)=e−3≈0.050,P(≥2)=1−e−3(1+3)=1−4e−3≈0.801.P(0) = e^{-3} \approx 0.050, \qquad P(\ge 2) = 1 - e^{-3}(1 + 3) = 1 - 4e^{-3} \approx 0.801 .

Knowledge check

A coin lands heads with probability 0.3. What is the variance of the number of heads in 100 flips?

Knowledge check

Buses arrive as a Poisson process, on average every 10 minutes. You have already waited 7 minutes. What is your expected additional wait?

Knowledge check

X∼N(1,4)X \sim N(1, 4) and Y∼N(2,5)Y \sim N(2, 5) are independent (the second parameter is the variance). What is Var⁡(X−2Y)\operatorname{Var}(X - 2Y)?

Practice problems

Finished reading?

Answer the 3 knowledge checks to complete this lesson (0 done).