**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’)

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

**Binomial distribution practice tests**

**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 r^{th} success occurs on x^{th} 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 r^{th} 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 r^{th} success)

Steps to solve above question

- r
^{th}success occurs on x^{th}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 p
^{r}* q^{n-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****C**_{r-1}

- Hence the probability of getting r
^{th}success on x^{th}trial is- Probability = x-1 C
_{r-1 }*****p^{r }* q^{x-r}

- Probability = x-1 C

If we understand the above concept and steps thoroughly, we will be able to answer questions on probability of r^{th} failure occurring on x^{th} 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**