- Practice
- About 22 min
- 5 practice questions
Special discrete distributions: one point, two point, Bernoulli and binomial
Recognise the one point, two point, Bernoulli and binomial distributions, use the binomial formula P(X = x) = ⁿCₓ pˣ qⁿ⁻ˣ, and use their means and variances, including finding n and p from a given mean and variance.
If something looks wrong, please tell us.
By the end of this lesson you can
- State the pmf, mean and variance of the one point, two point and Bernoulli distributions.
- Check the three conditions for a binomial random variable.
- Compute binomial probabilities, including "at least" and "at most" ones.
- Use mean np and variance npq to find n and p.
Some distributions turn up so often that they have names and ready-made formulas. In this lesson we build up from the simplest, where all probability sits at one point, to the binomial distribution, which counts successes in repeated independent trials.
One point and two point distributions
One point: X has a one point distribution if P(X = x₀) = 1 for some x₀. Its cdf is 0 for x < x₀ and 1 for x ≥ x₀. Mean E(X) = x₀ × 1 = x₀, and Var(X) = x₀² − x₀² = 0: no spread at all.
Two point: X takes the value x₁ with probability p and x₂ with probability q = 1 − p, where 0 < p < 1. Mean E(X) = px₁ + qx₂. Variance: E(X²) − [E(X)]² = px₁² + qx₂² − (px₁ + qx₂)² = p(1 − p)x₁² + q(1 − q)x₂² − 2pqx₁x₂ = pq(x₁² − 2x₁x₂ + x₂²) = pq(x₂ − x₁)². In the symmetric case p = q = 1/2, the mean is (x₁ + x₂)/2 and the variance is (x₂ − x₁)²/4.
Bernoulli distribution
A Bernoulli trial is an experiment with exactly two outcomes, success or failure (head or tail, defective or good). The idea is named after the Swiss mathematician Jacob (Jacques) Bernoulli (1654–1705). Define X(success) = 1 and X(failure) = 0 with P(X = 1) = p and P(X = 0) = q = 1 − p, 0 < p < 1. Then X ~ Ber(p) and f(x) = pˣ(1 − p)^(1 − x), x = 0, 1. E(X) = 1·p + 0·q = p, E(X²) = p, so Var(X) = p − p² = pq. Note that the mean p is never actually observed, since X is always 0 or 1.
Binomial distribution
A discrete random variable X is a binomial random variable if it counts the number of successes in n repeated trials where (i) the trials are independent and n is finite, (ii) each trial has only two outcomes, success or failure, and (iii) the probability p of success is the same in every trial. Then X ~ B(n, p) and
P(X = x) = ⁿCₓ pˣ qⁿ⁻ˣ, x = 0, 1, 2, …, n, where q = 1 − p. Mean μ = np, variance σ² = npq.
Why the formula works. One particular order of x successes and n − x failures has probability pˣqⁿ⁻ˣ by independence, and there are ⁿCₓ ways to choose which trials are the successes. The probabilities add to 1 because Σ ⁿCₓ pˣqⁿ⁻ˣ = (p + q)ⁿ = 1ⁿ = 1, which is the binomial expansion, hence the name. When p = q = 1/2, P(X = x) = ⁿCₓ(1/2)ⁿ with mean n/2 and variance n/4, and the distribution is symmetrical.
The family of special discrete distributions
-
One point
P(X = x₀) = 1
- Mean x₀, variance 0
-
Two point
Values x₁, x₂ with p, q
- Mean px₁ + qx₂
- Variance pq(x₂ − x₁)²
-
Bernoulli Ber(p)
Two point with x₁ = 1, x₂ = 0
- Mean p, variance pq
-
Binomial B(n, p)
Successes in n independent Bernoulli trials
- P(X = x) = ⁿCₓ pˣqⁿ⁻ˣ
- Mean np, variance npq
Worked example 1: free throws
A player scores a free throw with probability 0.7, independently, and takes 5 shots. X ~ B(5, 0.7), q = 0.3. P(X = 3) = ⁵C₃(0.7)³(0.3)² = 10 × 0.343 × 0.09 = 0.3087. P(X ≥ 4) = ⁵C₄(0.7)⁴(0.3) + (0.7)⁵ = 5 × 0.2401 × 0.3 + 0.16807 = 0.36015 + 0.16807 = 0.52822. Mean = 5 × 0.7 = 3.5 and variance = 5 × 0.7 × 0.3 = 1.05.
Worked example 2: n and p from the mean and variance
A binomial variable has mean 4 and variance 3. Then np = 4 and npq = 3, so q = npq/np = 3/4, p = 1/4 and n = 4/p = 16. So X ~ B(16, 1/4), P(X = 0) = (3/4)¹⁶ and P(X ≥ 1) = 1 − (3/4)¹⁶. (If a question gives a variance larger than the mean, no binomial distribution fits, because q < 1 forces npq < np.)
Worked example 3: "at most" by the complement
Seeds germinate independently with probability 0.9 and 8 are sown. Find the probability that at most one fails to germinate. Let X = number that germinate, X ~ B(8, 0.9). At most one failure means X ≥ 7: P(X = 7) + P(X = 8) = 8(0.9)⁷(0.1) + (0.9)⁸ = 0.8 × 0.4782969 + 0.43046721 = 0.38263752 + 0.43046721 ≈ 0.813.
Worked example 4: finding p from a relation
For X ~ B(4, p), P(X = 1) = P(X = 2). Then 4pq³ = 6p²q². Dividing by 2pq² (p, q ≠ 0): 2q = 3p, so 2(1 − p) = 3p and p = 2/5. Check: P(X = 1) = 4(0.4)(0.6)³ = 0.3456 and P(X = 2) = 6(0.16)(0.36) = 0.3456.
Key takeaways: a Bernoulli variable records one success or failure (mean p, variance pq); a binomial variable counts successes in n independent trials with constant p, with P(X = x) = ⁿCₓpˣqⁿ⁻ˣ, mean np and variance npq. For "at least one" use 1 − P(X = 0). Draws without replacement change p from trial to trial, so they are not binomial.
Check your understanding
-
1. X has a Bernoulli distribution with mean 0.3. What is its variance?
- 0.09
- 0.3
- 0.7
- 0.21
Show answer
Answer: D. For Ber(p), mean = p = 0.3 and variance = pq = 0.3 × 0.7 = 0.21.
-
2. X ~ B(10, 0.4). What is the variance of X?
- 2.4
- 4
- 6
- 0.24
Show answer
Answer: A. Variance = npq = 10 × 0.4 × 0.6 = 2.4. (The mean np would be 4.)
-
3. X ~ B(4, 1/2). What is P(X = 2)?
- 1/2
- 1/4
- 3/8
- 1/16
Show answer
Answer: C. P(X = 2) = ⁴C₂(1/2)⁴ = 6/16 = 3/8.
-
4. A binomial distribution has mean 6 and variance 4.2. What is n?
- 30
- 20
- 14
- 10
Show answer
Answer: B. q = 4.2/6 = 0.7, so p = 0.3 and n = 6/0.3 = 20.
-
5. Which situation does NOT give a binomial random variable?
- Tossing a coin 8 times and counting heads
- Rolling a die 5 times and counting sixes
- Drawing 3 cards one after another without replacement and counting aces
- Testing 10 bulbs, each defective independently with probability 0.05
Show answer
Answer: C. Without replacement, the chance of an ace changes after each draw, so the trials are neither independent nor of constant probability. The other three are independent trials with a fixed probability of success.
Sign in to keep track of the lessons you finish.