The Binomial Distribution

Hi there. In this probability and statistics post, I go over the binomial distribution.


Pixabay Image Source

 

Success Or Failure


The binomial distribution is for computing probabilities for the number of successes out of a number of repeated trials. In each trial, the outcome is either a success or a failure. The concept of success and failure is defined by the experimenter(s). In a fair coin flip, flipping a heads can be considered a "success" while getting a tails is a "failure". The other way around can be done too where a tails is a "success" and a heads is a "failure".

 

The Binomial Distribution


Let's define some variables before getting into the formula.

  • Denote X as a binomial random variable with n trials with its probability of success and probability of failure in each trial.

  • Denote n as the number of (independent Bernoulli) trials in the binomial experiment. (If n = 1 then this experiment simplifies into a single Bernoulli trial.)

  • Let p be the probability of "success" in a trial. This probability is the same in every trial.

  • Let q be the probability of "failure" in a trial. This probability is also the same in every trial. Some people don't use q for the probability of failure. They may use 1 - p instead.

 

The probability of obtaining k successes out of n trials is given by:

Note that = . This represents the number of ways we can choose k objects from n different objects.


Pixabay Image Source

 

Mean & Variance Of The Binomial Distribution


The mean of the binomial distribution is given by np. This is the product of the number of trials and the probability of success.

The variance for binomial distribution is given by np(1 - p) or npq. This is the product of the number of trials, the probability of success and the probability of failure.

For those interested in the proofs of obtaining the mean and variance of the binomial distribution, you can look at a resource such as this. The proofs involves expected values, factorials, index shifting in sums, and the sum of probabilities equaling one property.


Pixabay Image Source

 

Examples


Example One - Coin Flipping

Consider a fair coin with an equal probability of getting heads or tails. This makes the calculations easier.

The probability of getting two heads out of five flips is given by:

There is a 31.25% chance of flipping 2 heads out of five flips. (This is the same probability for 2 tails out of 5 flips on a fair coin.)

The result from 5 choose 2 comes from the numbers of ways of choosing 2 heads from 5 coin flips.

 

Example Two - Rolling A Die Multiple Times

In this second example, consider a fair six sided die from the numbers 1 to 6 (inclusive). Each number has a 1/6 chance of showing up from a roll. The die is rolled four times. What is the probability of rolling a 2 two times out of the four rolls?

 

The success here is rolling a two with a probability of one-sixth. Anything other than a two is consider a "failure".

 

Example Three - Random Selection Of A Marble In A Bag With Replacement

You select a marble at random from a bag of marbles. There are 3 red marbles, 2 green marbles and 2 blue marbles in the bag. After selecting the first marble you put it back and select a second marble at random.

What is the chance that you get 1 green marble or two green marbles in the two picks?

To obtain the answer you can compute the probability of getting one green marble and the probability of selecting two green marbles from two draws.

Here is the probability for one green marble out of two picks.

Here is the probability of selecting two green marbles from two picks.

Combining these probabilities together gives the probability of selecting one green marble or two green from two picks. The answer here is 24/49 which is about 48.98%.

Note that it is important that we have sampling with replacement to keep the probability of "success" the same in each trial/draw. If there was sampling without replacement where the marble is not put back after the first draw then that is a different case.


Pixabay Image Source

 

Thank you for reading.

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Ecency