The Binomial Distribution

Definition: A binomial experiment is an experiment that consists of $n$ independent bernoulli trials, each with an identical probability of success. A binomial random variable $X$ is one that counts the number of successes in a binomial experiment.

Problem: Which of the following are binomial random variables?

  1. The sum of three rolled dice
  2. The number of aces picked after drawing 10 cards from the same deck
  3. The number of times that the barrista at starbucks gets my order wrong in 10 visits
  4. The number of times that a flipped coin comes up heads before it comes up tails three times
  5. The number of baskets I score out of 100 shots from the free-throw line

The pmf for a binomial random variable is $$f(x;n,p) = \binom{n}{x}p^x(1-p)^{n-x}.$$ When $n = 1$, this reduces to the pmf for a Bernoulli random variable, and we have seen that this also works when $n = 2$. To derive this pmf for a general value of $n$, we can reason inductively. To do so, we just have to assume that this is the form of the pmf for a binomial random variable with $n-1$ trials, and derive the pmf for a binomial random variable for $n$ trials by adding a Bernoulli random variable with the same probability of success. So, if $Y$ is a binomial random variable with $n-1$ trials and probability of success $p$, and $X$ is a Bernoulli random variable with probability of success $p$, we want to find the pmf for $Z = Y+X$. If $f$ is the pmf for $X$ and $g$ is the pmf for $Y$, then the pmf for $Z$ is \begin{align} h(z) = (g*f)(z) = \sum_{x=0}^{\infty}g(z-x)f(x). \end{align} Notice that $f(x)$ is only not zero for $x=0$ and $x=1$, so we can simplify the sum by only looking at these terms. Expanding gives \begin{align} h(z) &= g(z-0)f(0)+g(z-1)f(1)\\ &=\binom{n-1}{z}p^{z}(1-p)^{n-1-z}(1-p)\\&\quad+\binom{n-1}{z-1}p^{z-1}(1-p)^{n-1-(z-1)}p\\ &= \frac{(n-1)!}{(n-1-z)!z!}p^z(1-p)^{n-z} +\frac{(n-1)!}{(n-1-(z-1))!(z-1)!}p^z(1-p)^{n-z}\\ &= \frac{(n-1)!(n-z)+(n-1)!z}{(n-z)!z!}p^z(1-p)^{n-z}\\ &= \frac{n!}{(n-z)!z!}p^z(1-p)^{n-z}. \end{align}

Calculating the moments for the binomial distribution are significantly easier. If $Y$ is a binomial random variable, then it is the sum of $n$ independent Bernoulli random variables $X$ with success probability $p$. Therefore \begin{align} \mathbb{E}(Y) &= \mathbb{E}(X+X+...+X)\\ &= \mathbb{E}(X)+\mathbb{E}(X)+...+\mathbb{E}(X)\\ &= n\mathbb{E}(X)\\ &= np. \end{align} Similarly \begin{align} \mathbb{V}(Y) = n\mathbb{V}(X) = np(1-p) \end{align}

Example: Suppose there is a $1/100$ probability that any individual egg you buy at the grocery store is cracked.

  1. What is the probability that there is exactly one cracked egg in a carton of 12?
  2. What is the probability that there is at least one cracked egg in a carton of 12?

Exercises

  • Come up with an example of a Binomial experiment. Explain how it meets the criteria to be a Binomial experiment.
  • There are 20 questions on a multiple choice test. Each question has four choices. Suppose Billy didn't study, and decides to guess on every question. What is the probability that Billy passes (gets more than 50% right)? What is the probability he gets more than 80% correct?
  • Tim Hortons' roll up the rim game used to be a big deal. The company advertised 1/6 odds to win a prize on each cup.
    1. What is the probability that you buy 6 coffees from Tim's and don't win anything?
    2. If you buy 20 coffees during the contest, how many prizes should you expect to win?
    3. If you buy 20 coffees during the contest, what is the probability that you win more prizes than you expect to