3
$\begingroup$

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.

$\endgroup$
3
  • 3
    $\begingroup$ In case you're still interested, the outcome of rolling a 20-sided die is uniform over all faces of the die, so the probability of observing any individual face is $\frac{1}{20}$. However, the number of heads on 20 coin flips follows a binomial distribution where the probability of $k$ heads is $\binom{20}{k}\left(\frac{1}{2}\right)^{20}$. $\endgroup$ Commented Sep 2, 2012 at 6:45
  • $\begingroup$ Thanks! I noticed it wasn't really even but I wanted to know what was really going on. $\endgroup$
    – Alex Nye
    Commented Sep 2, 2012 at 7:33
  • 3

2 Answers 2

5
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ Thank you. A fantastic answer. I ended up reading a bit more on how to code a function for a random number on a normal distribution and used it in the roleplay utilities. Bell Curves just feel so right. $\endgroup$
    – Alex Nye
    Commented Sep 3, 2012 at 7:38
  • $\begingroup$ Gung's points out that although the distributions look similar they are different and as I explained the probability space is different. One deals with the number rolled from a single die whuile the other represents the sum of several outcomes from coin tossing. Also -1 for the die distribution. Even if there were a 4 sided die as in the example. Dice nornally do not have 0 as a number on the side. Also I think it would be more appropriate to compare the actual result from a 6 sided die with six tosses of a fair coin. Notice that even in Gung's example the moments are different. $\endgroup$ Commented Sep 3, 2012 at 11:25
  • $\begingroup$ @MichaelChernick, I recognize that dice don't have a 0. My idea was to equalize the ranges by subtracting 1 from the result of the die roll. Thus, eg, if you rolled a 1, then subtracted 1, your result would be 0. OTOH, if you rolled a 4, then subtracted 1, the result would be 3. Also, the reason I didn't use a 6-sided die is that the coin flips would have required 32 lines to lay out all the possibilities, & I'm just too lazy for that. $\endgroup$ Commented Sep 3, 2012 at 12:27
1
$\begingroup$

The answer is no. The outcomes aren't even the same.

To address the new question if you take a six sided die a roll it once you get a uniform distribution on the integers from 1 to 6. That means each outcome has probability 1/6 and the expected value is 3.5. If you toss 6 coins at random (or equivalently one coin 6 times you get a binomial distribution for the number of heads with parameters n=6 and p=1/2. the expected number of heads is 6/2 =3. Another difference is that you can get 0 heads. So for the number of heads the possible outcomes are 0,1,2,3,4,5,and 6 while the die has possible count 1,2,3,4,5, and 6.

$\endgroup$
1
  • 1
    $\begingroup$ So do the coin tosses sort of lump in the middle around the half-way point of the number of coins? That's my intuition from what I've seen but I'm looking for hard numbers. $\endgroup$
    – Alex Nye
    Commented Sep 2, 2012 at 4:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.