✖

Binomial distribution

Imagine a test with five questions. Each question has four options and exactly one of them is correct. You did not revise for the test at all, so you simply guess every question. What is the probability that you get exactly two questions right? This is exactly what the binomial distribution is for.

With a single question it would be easy. One option out of four is correct, so we get it right with probability 14 and wrong with probability 34. The catch is that there are five questions, and we want two to go well and three not to.

One particular order

First we focus on one particular order. Say we get the first two questions right and the remaining three wrong. We write this as CCWWW (correct, correct, wrong, wrong, wrong).

The questions are independent – getting the first question right neither helps nor harms the second. So we can multiply the probabilities for the individual questions:

P(CCWWW)=14⋅14⋅34⋅34⋅34

We gather the repeated factors into powers:

P(CCWWW)=(14)2⋅(34)3

Then we evaluate the powers:

P(CCWWW)=116⋅2764=271024

But this is only one of the possibilities. The two correct answers can also appear in the order CWCWW, WWWCC and so on. Each such order has the same probability, 271024, because it again contains two factors of 14 and three factors of 34, just in a different order, and the order of the factors does not matter when multiplying.

And how many such orders are there? From the five questions we choose the two that will be correct, and it does not matter in which order we choose them. These are exactly combinations:

(52)=5!3!⋅2!=10

So there are ten different orders, and each has probability 271024. The individual orders are mutually exclusive, so we add their probabilities, that is, we multiply by ten:

P(exactly two correct)=10⋅271024=2701024≈0.26

So by guessing, you get exactly two questions right with a probability of roughly 26%. It is tempting to calculate only (14)2⋅(34)3 and forget about the ten orders. The result would be ten times smaller than it should be.

The formula

The same method works for any number of questions and any probability. In general, each question is called a trial and each correct answer a success. We denote the number of successes by the random variable X, and the binomial distribution is then the probability distribution of this variable. If you only want the formula, the probability that exactly k out of n trials are successful is

P(X=k)=(nk)⋅pk⋅(1−p)n−k,

where p is the probability of success in a single trial. The power pk corresponds to the k successes, the power (1 − p)n − k to the remaining n − k failures, and the binomial coefficient (nk) tells us in how many orders this can happen.

Our test has n = 5, k = 2 and p=14. Substituting:

P(X=2)=(52)⋅(14)2⋅(34)3=2701024

We get the same result as before – the formula is really just a shorthand for the method in the previous section.

Be careful: the formula only works under certain conditions. Four things must hold:

  • the number of trials n is fixed in advance,
  • the trials are independent of one another,
  • the probability of success p is the same in every trial,
  • each trial has only two outcomes: success or failure.

Guessing in a test satisfies all four conditions. But as soon as you knew the answer to some of the questions, the probability of success would differ from question to question and the formula would stop being valid.

At least

In practice we are often interested not in “exactly two” but in “at least one”. What is the probability that we get at least one question right by guessing? We could do it by calculating P(X = 1), P(X = 2) and so on up to P(X = 5), and adding everything up. A quicker route goes through the complementary event. The opposite of “at least one correct” is “all wrong”. Getting nothing right means getting five wrong in a row:

P(X=0)=(34)5=2431024

We subtract the result from one:

P(X≥1)=1−(34)5=1−2431024=7811024

We get at least one question right with a probability of about 76%. That sounds promising, but with one correct answer out of five you will not pass the test.

Suppose that to pass the test we need at least three correct answers. The complement would not help us here, since it would also have three terms, so we add up the three cases directly. First, three correct:

P(X=3)=(53)⋅(14)3⋅(34)2=10⋅164⋅916=901024

Four correct:

P(X=4)=(54)⋅(14)4⋅34=5⋅1256⋅34=151024

Finally, all five correct:

P(X=5)=(14)5=11024

Adding up:

P(X≥3)=90+15+11024=1061024≈0.10

By guessing, we pass the test with a probability of roughly 10%. So revising is worth it.

If we use the same formula to work out P(X=1)=4051024 as well, we have all six possibilities and can draw them. Above each bar is the numerator of the fraction; the denominator is always 1,024. The red bars to the right of the dashed line correspond to the cases in which we pass the test:

The probability of getting exactly k questions out of five right by guessing, with the numerators of the fractions above the bars and denominator 1,024

Now we can check that we have not made a mistake in the calculations. All the numerators must add up to 1,024, because some number of correct answers is certain to occur:

243+405+270+90+15+1=1024

It checks out. The graph also shows that the most likely outcome is getting one question right. On average we get n⋅p=5⋅14=1.25 questions right, which is exactly what we would expect: a quarter of five.

Chapters: Probability, Complementary event, Binomial distribution, Conditional probability, Probability of winning a 6 from 49 lottery (Sportka), Probability of winning the Eurojackpot