The Bernoulli and Binomial Distributions

STA 211 · Lecture 07

Introduction

The Bernoulli distribution models a single trial with two outcomes. The Binomial distribution models the number of successes in a fixed number of independent Bernoulli trials with constant success probability.

Learning Objectives

You should be able to:

  • identify Bernoulli and binomial experiments;
  • derive their probability functions;
  • calculate means, variances and MGFs;
  • use cumulative and complementary probabilities; and
  • apply the additivity property of binomial variables.

Bernoulli Distribution

Let X=1X = 1 for success and X=0X = 0 for failure. If P(X=1)=pP(X = 1) = p and q=1−pq = 1 - p, then

pX(x)=pxq1−x,x=0,1.p_{X}(x) = p^{x}q^{1 - x},\quad\quad x = 0,1.

The mean and variance are

E(X)=p,E(X) = p,

Var(X)=pq.Var(X) = pq.

The MGF is

MX(t)=q+pet.M_{X}(t) = q + pe^{t}.

Binomial Distribution

A random variable XX has a binomial distribution with parameters nn and pp, written X∼Bin(n,p)X \sim Bin(n,p), if:

  1. there are nn trials;
  2. each trial has two outcomes;
  3. trials are independent; and
  4. the success probability pp is constant.

The PMF is

P(X=x)=(nx)pxqn−x,x=0,1,…,n.P(X = x) = \binom{n}{x}p^{x}q^{n - x},\quad\quad x = 0,1,\ldots,n.

The term (nx)\binom{n}{x} counts the positions of the xx successes; pxqn−xp^{x}q^{n - x} is the probability of any one such pattern.

Binomial probability mass function

Binomial probability mass function

The mean and variance are

E(X)=np,E(X) = np,

Var(X)=npq.Var(X) = npq.

The MGF is

MX(t)=(q+pet)n.M_{X}(t) = \left( q + pe^{t} \right)^{n}.

Useful Probability Forms

Exactly xx successes:

P(X=x)=(nx)pxqn−x.P(X = x) = \binom{n}{x}p^{x}q^{n - x}.

At most rr successes:

P(X≤r)=∑x=0r(nx)pxqn−x.P(X \leq r) = \sum_{x = 0}^{r}\binom{n}{x}p^{x}q^{n - x}.

At least one success:

P(X≥1)=1−P(X=0)=1−qn.P(X \geq 1) = 1 - P(X = 0) = 1 - q^{n}.

More than rr successes:

P(X>r)=1−P(X≤r).P(X > r) = 1 - P(X \leq r).

Example 7.1

A production process has a 5% defect rate. In a random sample of 10 independent items, the probability of exactly 2 defects is

(102)(0.05)2(0.95)8≈0.0746.\binom{10}{2}(0.05)^{2}(0.95)^{8} \approx 0.0746.

The probability of at least one defect is

1−(0.95)10≈0.4013.1 - (0.95)^{10} \approx 0.4013.

Additivity

If X∼Bin(n1,p)X \sim Bin\left( n_{1},p \right) and Y∼Bin(n2,p)Y \sim Bin\left( n_{2},p \right) are independent with the same success probability, then

X+Y∼Bin(n1+n2,p).X + Y \sim Bin\left( n_{1} + n_{2},p \right).

The same pp is essential. If the success probabilities differ, the sum is not generally binomial.

Recurrence Relation

Successive probabilities satisfy

P(X=x+1)P(X=x)=n−xx+1pq.\frac{P(X = x + 1)}{P(X = x)} = \frac{n - x}{x + 1}\frac{p}{q}.

This relation can reduce repetitive calculation and helps locate the mode.

Post-Test

  1. State the four assumptions of a binomial model.
  2. If X∼Bin(12,0.3)X \sim Bin(12,0.3), find E(X)E(X) and Var(X)Var(X).
  3. Find P(X=4)P(X = 4) for the distribution in Question 2.
  4. A fair coin is tossed 8 times. Find the probability of at least 6 heads.
  5. Explain when the sum of two independent binomial variables is binomial.

Selected answers: 2. 3.63.6 and 2.522.52; 3. (124)(0.3)4(0.7)8≈0.2311\binom{12}{4}(0.3)^{4}(0.7)^{8} \approx 0.2311; 4. ∑x=68(8x)2−8=37/256\sum_{x = 6}^{8}\binom{8}{x}2^{- 8} = 37/256.