Solved – Does the probability of multiple independent events follow a normal distribution

dicedistributionsprobability

I'm heavily into role-playing systems, scripted a set of utilities in ruby for pen-and-paper games and I sort of understood statistics when I took it, but I could never for the life of me figure out the following:

Given a varying-length series of independent 50/50 probabilities, i.e. 2, 3, 5 or 7 coin tosses, would the total number of successes (heads) have the same probability distribution as a fair roll of a die with number of sides equivalent to the number of coins + 1 (given that coins can produce all failures — a zero)?

This is a comparison, say, between the d20 system used by DnD and the multiple success-check dice used by Abberant. So in other words, would rolling a 20-sided die and flipping 20 coins and counting the heads result in the same probability distribution?

I would be interested in a link that explains and visually represents the difference between distributions of independent events and a single event.

EDIT: I was able to satisfy my basic curiosity with the above script, modified. No hard mathematical answer, but I'm not well-versed in this area anyway. Figured it was worth learning a bit though.

Best Answer

One simple way to think about probabilities is to enumerate all the possibilities and weight them according to their likelihoods, and then you can just count the number of different combinations. (This approach will work when the events are discrete and few in number.)

Let's start with a fair 4-sided die (you'll see the reason for this odd choice soon) and a fair coin. By "fair", I mean that all the possible outcomes are equally likely. That is, the likelihood of getting a 1 is exactly the same as getting a 4, for example, and that the likelihood of getting heads is exactly the same as getting tails. As @MichaelChernick points out, if you were to flip the coin 4 times and count the number of heads, you would find there are 5 possible final counts, so we will equalize the ranges by flipping the coin only 3 times, and subtracting 1 from the result of the die roll. Thus, both will range from 0 to 3. Now we can lay out the possibilities.

For the die:

{0, 1, 2, 3}  

All of which are equally likely, because we've stipulated the die is fair, and so each possible event has a probability of 1/4.

For the coin, it's more complicated. Each individual flip is {H, T}, but we ultimately want to know about the combination of 3 different flips, so we need to lay out the combinatorics and then count the resulting number of heads.

                 flip    
possibility     1  2  3     number of heads
     1:        {H, H, H,           3
     2:         H, H, T,           2
     3:         H, T, H,           2
     4:         H, T, T,           1
     5:         T, H, H,           2
     6:         T, H, T,           1
     7:         T, T, H,           1
     8:         T, T, T}           0

We see here that the number of possibilities grows exponentially with each additional flip. Specifically, it doubles, because there are two possible outcomes of each flip; if we were flipping a 3-sided coin (assuming one could exist) it would triple. If we had thrown a 6-sided die and flipped the coin 5 times, it would have taken 32 lines to lay out all the possible combinations of outcomes. In our case, with three flips, it took $2^3=8$ lines to lay out all of the possibilities.

Now (again) because we stipulated that heads and tails are equally likely, and because we have laid out all the combinations, each possibility is equally likely, having a probability of 1/8. But note that this does not mean that each possible number of heads is equally likely. There are three different ways to end up getting 1 head, and three ways to end up with 2 heads, but only 1 way each of getting 0 or 3 heads. Thus, the probability of getting 0 heads is 1/8, of getting 1 head is 3/8, of getting 2 heads is 3/8, and of getting 3 heads is 1/8. In general, the probability of getting the number of "successes" $k$ (i.e., heads in our case) out of the number of "trials" $n$ (flips), where each trial has a probability of success $p$, will be: $$ p(k)=\frac{n!}{k!(n-k)!}p^k(1-p)^{n-k} $$ As a result of this, "the coin tosses sort of lump in the middle", as you suspect, and as you can clearly see:
enter image description here
These distributions do have things in common (which I think is what is confusing you): they are both discrete, have the same number of possible results (at least under our modified arrangement), and have the same average (more technically expected value). However, as their Wikipedia pages state, they differ in their higher moments; namely their variances (uniform: $(n^2-1)/12$ vs. binomial: $np(1-p)$ ) and kurtoses (uniform: $-(6n^2+6)/(5n^2-5)$ vs. binomial: $(1-6p+6p^2)/(np(1-p))$ ) differ.

On a slightly different note, the title of the question asks about how the distribution of coin flips will compare to the normal distribution, while the body of the question asks about how it compares to a discrete uniform. My answer here has mostly focused on the body of the question, but I should mention that the binomial is sometimes colloquially referred to as the "discrete normal" distribution. One way to think about this is that as the number of coin flips continues on towards infinity, it's binomial distribution will converge to the (continuous) normal distribution.