# Probability of exactly x heads in n tosses

Problem: I toss a coin 300 times. What is the probability that I get only five heads in a row?

Solution: The probability of exactly 5 heads in 300 tosses is about 8.8*10^-66, according to the Poisson approximation to the binomial distribution (see below). But, those 5 heads can occur anywhere within the sample set. The probability of the outcomes being ordered so that 1 head is in a given spot in the set = 1 / n! where n is the number of tosses, ! (for those who don't know) is the factorial function (n-1 * n-2 * n-3...n-(n-1)). That number is approximately 3*10^-615.

To get the probability, then, of exactly five heads in a row, simply multiply the two numbers together. That gives me 2.64*10^-680.

Q&A
What is the binomial distribution?

The binomial distribution describes the probability of exactly x successes in a series of n trials. The formula for this distribution is: n!/(x! * (n - x)!).

However, when n is too large and x is too small, this formula is not very computationally efficient. Also, your calculator may throw an error if n is greater than 115, due to the fact that the factorial function can't handle numbers that large. In such cases, the Poisson distribution is more useful.

What is the Poisson distribution?

The Poisson distribution is the probability that, for example, a call center who receives a call every 3 minutes on the average will receive a call 2 minutes after another one.

The formula for this distribution is:

(E(n)^x * e^-E(n)) / x!

where E(n) is the long-run average ("expected") number of successes, and e is Euler's number (2.71828...).

Binomial distribution: http://en.wikipedia.org/wiki/binomial_distribution" [Broken]
Poisson distribution:http://en.wikipedia.org/wiki/Poisson_distribution" [Broken]

Last edited by a moderator: