Binomial Distribution

09.08.2018 |

Episode #4 of the course Theory of probability by Polina Durneva

 

Hello!

So far, we have discussed topics such as the probability of mutually exclusive and not mutually exclusive events, the probability of dependent and independent events, conditional probability, and Bernoulli distribution. Today, we will talk about another discrete probability distribution: Binomial distribution. This distribution is closely associated with Bernoulli distribution, and you will see why!

 

What Is Binomial Distribution?

Just to remind you, Bernoulli distribution is used when you have two outcomes: success (denoted as 1) or failure (denoted as 0). For example, you want to flip a fair coin and find the probability of getting heads. In this case, getting heads is a success, and such event would be denoted as 1. The probability of success is 1/2, since the coin is fair. This is a typical example of Bernoulli distribution. We have also found that the expected value, or the mean, of Bernoulli distribution equals to the probability of success (in our previous example, it would be 0.5). Variance, which shows how spread out our data is, for Bernoulli distribution, equals to the probability of success multiplied by the probability of failure (in our example, it would be 0.5 * 0.5 = 0.25).

Binomial distribution is based on the Bernoulli distribution. The main difference is that Binomial distribution is used when you have more than one trial. For example, you want to know the probability of getting heads 6 times while flipping a fair coin 10 times. In this case, you have 10 trials (each of which would have Bernoulli distribution), and you want to know the probability of getting 6 successes.

There exist three main assumptions for Binomial distribution:

1. The number of trials need to be fixed. It is important because changing the number of trials will require different Binomial distributions. If you flip a coin once, the probability of success (either heads or tails) is 1/2. However, you flip this coin 100 times, the probability of success is almost 1.

2. All the events are independent. It means that getting heads on your first trial has no impact on your next trial, and so on.

3. The probability of success and failure is fixed. If the probability of success is 50%, then during any following trials, the probability of success will remain 50%.

 

Formula for Binomial Distribution

There exists a simple formula you can use to calculate the probability of getting x successes out of n trials. The formula takes the following form: (n! / ((n – x)! * x!)) * px * (1 – p)n-x.

Let’s proceed to an example to better understand the formula. Assume that you want to know the probability of getting 6 heads in 10 trials. First, you need to count the number of ways you can get 6 heads in 10 trials. This is a combinatorics problem, and the solution can be found through nCx = (n! / ((n – x)! * x!)) = (10! / ((10 – 6)! * 6!)) = 210 ways. (nCx shows the number of ways to choose x objects from a set of n objects without repetition and when order doesn’t matter. In our example, there are 210 ways to choose 6 objects from 10 objects.)

Then, you multiply the probabilities, since you have the independent events (6 successes and 4 failures): 0.56 * (1 – 0.5)10-6 = 0.00098. Multiplying this value by 210, you get about 0.2058, or close to 21%. It means that the probability of getting 6 heads in 10 trials is 21%.

 

Expected Value of Binomial Distribution

The expected value is the number of successes you get on average when having n trials. To calculate the expected value of Binomial distribution, you need to multiply the number of trials by the probability of success. For instance, if you flip a coin 1,000 times, the expected value of getting heads would be 1,000 * 0.5 = 500, meaning that you would get 500 heads on average if you flip a coin 1,000 times.

 

Variance of Binomial Distribution

The variance of Binomial distribution can be calculated by multiplying the variance of an individual trial by the number of trials. The variance of an individual trial is the variance of Bernoulli distribution. Using our previous example, this value is 0.5 * 0.5 = 0.25. Then, you need to multiply it by the number of trials, say 1,000. Then, the variance is 250.

That’s it for today! Tomorrow, we will talk about Poisson distribution!

Bye,

Polina

 

Share with friends