Introduction to Binomial distribution

One of the important distributions in the study of probability and statistics is the binomial distribution. Consider the process of tossing a fair coin 5 times, what is the probability that we get exactly 3 heads? Or consider throwing a dice 30 times, what is the probability of getting exactly ‘5’ 10 times?

To answer such questions, we need to understand the binomial distribution and its properties.

Binomial distribution is a discrete probability distribution as it deals with the number of trials, successes and failures.

What is a Bernoulli trial?

 The process of tossing a fair coin has only two outcomes, either a head or a tail. Similarly any process that has two possible outcomes is termed as Bernoulli trial.

The outcome of interest is called ‘Success’ and the other outcomes are termed as ‘failure’. For example, if we throw a dice and we are interested in the outcome of getting ‘5’ on the dice, here, getting 5 on dice is success and getting any other number is considered a failure.

Calculating probabilities

Before moving further let us understand the terms we use in this section.

  • Bernoulli trial – Trail with only two possible outcomes (Success and failure)
  • Probability of success in each trial is ‘p’
  • Probability of failure in each trial is ‘q’ (q = 1-p)
  • Variable ‘x’ represents the number of successes
  • ‘n’ is the number of independent Bernoulli trials

Let us try to answer the question of calculating the probability of getting ‘5’ exactly twice when we throw a dice 5 times

  • P(x = 2) where x is the event of getting a ‘5’ in a trial (Getting a 5 is termed as success here)
  • n = 5 (number of trials)
  • p = 1/6 (probability of getting ‘5’)
  • q = 5/6 (Probability of not getting ‘5’)

Bin1.jpg

Bin6.jpg

Formula for finding the probability of getting exactly ‘r’ successes out of ‘n’ independent Bernoulli trials with ‘p’ as probability of success in each trial is given by

bin4

Binomial distribution practice tests

Quiz 1      Quiz 2      Quiz 3

 

Conditions of binomial distribution

The above binomial distribution formula for calculating probabilities is applicable under following conditions

  • The trials are Bernoulli trials; It must have two outcomes, success and failure
  • Trials are independent; one trial do not impact the other
  • Probability of success in each trial is constant

If the above conditions are satisfied, x follows binomial distribution (x is the number of successes)

Negative Binomial distribution

In negative binomial distribution, we get to know the number of successes or the number of failures in advance.

Suppose we know that ‘r’ is the number of successes we want.

What is the probability that the rth success occurs on xth trial? This is same as finding the probability that we need x trials to get exactly ‘r’ successes.

In the above question, we are making trials until we get ‘r’ successes. We are stopping the process when we get rth success. Hence, the outcome of last trial is certain, ‘success’. (but the number of trials is uncertain here!, we continue the number of trials till we get rth success)

Steps to solve above question

  • rth success occurs on xth trial
  • So the number of successes is r and the number of failures is (x-r)
  • Probability for each sequence of possible combination with r successes and n-r failures  is pr * qn-r
  • Number of such possible combinations are calculated as below
    • Last trial outcome is fixed (A success)
    • Apart from last trial, we have x-1 trials, out of which we have to get r-1 successes
    • Hence, the number of possible combinations are x-1 r-1
  • Hence the probability of getting rth success on xth trial is
    • Probability = x-1 C r-1  *  pr  *  qx-r

Bin5.jpg

If we understand the above concept and steps thoroughly, we will be able to answer questions on probability of rth failure occurring on xth trial, probability that r successes occur before k failures etc.

Geometric distribution

Geometric distribution is a special case of negative binomial distribution where we have one success or failure.

For example, questions such as what is the probability that we get first success on 4th trial or the probability of first failure on 4th trail etc. can be answered using geometric distribution. Substituting 1 in the place of r (number of successes) in negative binomial formula will give the formula for geometric distribution.

 

Binomial distribution practice tests

Quiz 1      Quiz 2      Quiz 3