Probability Basics

The Binomial Distribution with Dice and Coins

Compute the chance of exactly k successes in n independent tries using the binomial formula, with coin and dice examples and a full table checked by hand.

On this page
  1. The question it answers
  2. The formula
  3. Example 1: coins
  4. Example 2: four dice rolls and sixes
  5. The full distribution for four rolls
  6. Reading the shape
  7. The mean and spread
  8. When binomial does not apply
  9. Misreadings to avoid

The question it answers

Suppose you repeat the same simple trial several times and count how many times it succeeds. Flip a coin 5 times and count heads. Roll a die 4 times and count sixes. The binomial distribution gives the probability of each possible count.

It applies when four conditions hold:

  1. There is a fixed number of trials, n.
  2. Each trial has two possible results, called success and failure.
  3. The chance of success, p, is the same every time.
  4. The trials are independent.

Flips of a fair coin and rolls of a fair die fit perfectly. Anything where earlier results change later chances, such as drawing cards without replacement, does not.

The formula

The probability of exactly k successes in n trials is:

P(k) = C(n, k) × p^k × (1 − p)^(n − k)

There are three pieces.

  • p^k is the chance of k successes.
  • (1 − p)^(n − k) is the chance the remaining trials are failures.
  • C(n, k) is the number of different positions the k successes can take among the n trials. This is a combination: n! / (k! × (n − k)!).

Any one specific sequence has probability p^k × (1 − p)^(n − k). The binomial coefficient counts how many such sequences exist, and since they are mutually exclusive, you add them, which here means multiplying by C(n, k).

Example 1: coins

Question. Flip a fair coin 5 times. What is the chance of exactly 3 heads?

  • C(5, 3) = 10 ways to place 3 heads among 5 flips.
  • Each specific sequence has probability (1/2)^5 = 1/32.
  • Total: 10 × 1/32 = 10/32 = 0.3125, or 31.25%.

Check. There are 2^5 = 32 equally likely sequences, and 10 of them contain exactly 3 heads. ✓

The full distribution for 5 flips has counts 1, 5, 10, 10, 5, 1 for 0 to 5 heads, which sum to 32. Those numbers are a row of Pascals triangle, which is no coincidence: binomial coefficients are exactly what that triangle lists.

Example 2: four dice rolls and sixes

Question. Roll a fair die 4 times. What is the chance of exactly 2 sixes?

Here p = 1/6 and 1 − p = 5/6.

  • C(4, 2) = 6.
  • (1/6)² = 1/36.
  • (5/6)² = 25/36.
  • Total: 6 × 1/36 × 25/36 = 150/1296, about 0.1157, or 11.6%.

The full distribution for four rolls

Use the same method for every possible count of sixes.

Sixes (k) C(4, k) Working Probability
0 1 1 × (5/6)⁴ = 625/1296 about 0.4823
1 4 4 × (1/6) × (5/6)³ = 4 × 125/1296 = 500/1296 about 0.3858
2 6 6 × (1/36) × (25/36) = 150/1296 about 0.1157
3 4 4 × (1/216) × (5/6) = 20/1296 about 0.0154
4 1 (1/6)⁴ = 1/1296 about 0.0008

The numerators add to 625 + 500 + 150 + 20 + 1 = 1,296, which is 6⁴, so the probabilities total exactly 1. That check is worth doing every time.

A useful by-product: the chance of seeing a six at least once is 1 − 625/1296 = 671/1296, about 51.8%. That is the complement rule applied to the k = 0 row, and it matches the sum of the other four rows: (500 + 150 + 20 + 1)/1296 = 671/1296. ✓ The same value connects to the classic question about at least one six in four rolls.

Reading the shape

Look at the table. The most likely count is 0 sixes, followed closely by 1. Large counts are very unlikely. The distribution is lopsided because p is small. With p = 1/2, as in the coin case, the shape is symmetric.

As n grows, the distribution tends to bunch around n × p, with a spread that grows more slowly than n. For large n, its outline looks like the bell-shaped normal distribution.

The mean and spread

The average number of successes is n × p. For four dice rolls and sixes, that is 4 × 1/6 = 2/3, about 0.67. This is a long-run average, not a count you can actually observe in one set of four rolls.

The standard deviation is √(n × p × (1 − p)). For the four rolls, √(4 × 1/6 × 5/6) = √(20/36) ≈ 0.75. Observed counts are typically within a couple of standard deviations of the mean, which here means that 0, 1 or 2 sixes cover most of the probability: (625 + 500 + 150)/1296 = 1275/1296, about 98.4%.

When binomial does not apply

  • Cards without replacement. Drawing 5 cards and counting hearts is not binomial, because each draw changes the deck. The right model is the hypergeometric distribution. For a very large pool relative to the draw, binomial is a close approximation.
  • Changing probabilities. If the success chance shifts from trial to trial, as in some game mechanics that raise odds after each failure, the model needs adjusting.
  • Dependent trials. If one result influences the next, the independence condition fails, which is the situation described by dependent events.

Misreadings to avoid

  • A coin flipped 10 times gives exactly 5 heads only C(10, 5)/1024 = 252/1024, about 24.6% of the time. Not getting exactly half is perfectly normal.
  • After a long run of one result, the next trial still has the same probability. Expecting a correction is the gambler’s fallacy, and sequences with surprising streaks are a normal feature of independent trials.
  • Binomial probabilities describe a fair model. They do not make any casino game profitable for the player, and outcomes in the real world remain uncertain. If gambling is a problem for you or someone you know, a local support service can help.

The complete guide to probability basics

Probability Theory for Gamers: A Primer
Read the guide

Keep exploring

Guides from other topics

All topics →