### Binomial Distribution

Suppose that you have a coin that is biased with the probability of getting a Head being 2/3. Let's toss this coin three times and find the probability of getting two heads. Since these are independent events, the temptation is to calculate it in the following way:

P(two heads) = (2/3)(2/3)(1/3) = 4/27   1

Unfortunately, this is not the right answer; in the above calculation we assume - quite wrongly - that the event took place in the sequence of HHT. However, there is no guarantee that it will happen in that order and we make a mistake in our calculation. There are more than one way to two heads from three tosses. They are as follows:

HHT, HTH, THH

The probabilities are as follows:

P(HHT) = (2/3)2(1/3); P(HTH) = (2/3)2(1/3); P(THH) = (2/3)2(1/3);

Since these three events are mutually exclusive, the total probability is the sum of probabilities.

P(two heads) = 3(2/3)(2/3)(1/3) = 12/27 = 4/9   2

As you can see from the above calculations, that the answer in
equation   2 is 3 times equation  1

The number 3 comes from 3C2 - 3C2
(2/3)2 is the square of the probability of success - p2
(1/3) the probability of failure - (1-p)

Therefore, the probability of 2 heads from 3 tosses is given by the following formula:

P(two heads from three tosses) = 3C2(2/3)2(1/3)

In the same way, we can give a general formula for the probability of r successes in n trials, if the probability of success is p, in the following way. It is called the Binomial Distribution

#### X ~ B(n,p);   P( X = r ) = nCr pr (1-p)n-r

Is Binomial a true distribution ?

Let's say the values of success - r - are 0, 1, 2, 3, 4, ...........n

So, the corresponding probabilities - nCr pr (1-p)n-r - are nC0p0(1-p)n, nC1p1(1-p)n-1, nC2p2(1-p)n-2, etc. The following table summarizes the distribution:

tP(X = r)
0nC0p0(1-p)n
1nC1p1(1-p)n-1
2nC2p2(1-p)n-2
3nC3p3(1-p)n-3
--------------
nnCnpn(1-p)0

So, Σ (P X = r) = Σ nCr pr (1-p)n-r =[p + (1-p)]n = 1 ---- from binomial expansion

Since the sum of probabilities adds up to 1, this is a true probability distribution.

#### Check list for Binomial Distribution

1. There must be only two possible outcomes - success or failure
If there are more, they must be grouped as success or failure. For instance, when a die is rolled, there are 6 outcomes; so, to model by Binomial Distribution, you can group them as prime / no prime, multiple of six / not multiple of six, odd / even etc.
2. The probability of either success or failure must remain the same throughout trials
3. The number of trials have a fixed limit

#### Situations where Binomial Distribution model does not work:

1. Rolling a die until a prime number is obtained - this can go on for ever
2. Tossing a fragile coin for a large number of times - the coin will not remain unbiased due to wear and tear and probability of success or failure changes

#### Simulation of Binomial Distribution

The above simulation uses a ball that comes down vertically through a grid of pins. If the ball is deflected right on impact with a pin, it is considered as a *success.* If the deflection is to the left, it is considered as a *failure.* In short, the probability of success or failure is 0.5. The distribution takes the typical symmetrical shape as the number of ball count increases.

You can use the following calculator in the calculations of Binomial Distribution.

#### Binomial Distribution Calculator

pnrP(x = r)P(x < = r)

E.g.1

An unbiased coin is tossed 10 times. Find the following probabilities.
3. Getting fewer than or equal 2 Heads
4. Getting more than 3 Heads
1. P(r = 0) = 10C0 (0.5)0 (0.5)10 = 0.001
2. P(r = 2) = 10C2 (0.5)2 (0.5)8 = 0.0439
3. P(r < = 2) = 10C0 (0.5)0 (0.5)10 + 10C1 (0.5)1 (0.5)9 + 10C2 (0.5)2 (0.5)8 = 0.001 + 0.0098 + 0.439 = 0.0538
4. P(r > 3) = 1- P(r < = 2) = 1- 0.0538 = 0.9462

E.g.2

A fair die is rolled 8 times. The number of multiples of 3 obtained is noted. Find the following probabilities.
1. Getting exactly 2 multiples of 3
2. Getting fewer than 2 of multiples of 3
3. Getting 3 or more than multiples of 3
4. Getting no multiples of 3
1. P(r = 2) = 8C2 (1/3)2 (2/3)6 = 0.2965
2. P(r < 2) = 8C0 (1/3)0 (2/3)8 + 8C1 (1/3)1 (2/3)9 = 0.0576 + 0.1977 = 0.2553
3. P(r > 3) = 1- P(r < = 2) = 1- 0.5518 = 0.4482
4. P(r = 0) = 8C0 (1/3)0 (2/3)8 = 0.0576

Expectation and Variance of Binomial Distribution

If X ~ B(n,p);  E(X) = np;   Var(X) = npq

E.g.

X ~ B(20,0.2)
E(X) = 20 X 0.2 = 4
Var(X) = 20 X 0.2 X 0.8 = 3.2

1. If X ~ B(12,0.3), find the following:
• P(X < = 9)
• P( 4 < X < 7)
2. An unbiased coin is tossed 60 times. Find the following:
• Getting 15% of the tosses as Heads
• Getting between 20% to 30% of Tails
3. A large stock of light bulbs are analyzed by a statistician, of which 5% are known to be faulty. If he picks up 5 bulbs at random, calculate the following probabilities.
• Getting no faulty bulb
• Getting fewer than 4 faulty bulbs
• Getting all faulty bulbs
4. The probability of a certain cricketer hitting a six, in a limited over match, is 0.4. How many balls should he face before hitting seven sixes, with a probability of 0.85 ? How significant is the nature of the
• match being limited over in your calculations ?
• More and more Professional computer exams are conducted on screens in real time with multiple choice questions. Usually the there are 4 answers for each question. Find the probability of getting at least 6 of them right in a 20-questions exam.