The Binomial Distribution

Category: Probability   Level: 301

P(X = k) = C(4, k) / 24

Four fair coin flips make 16 equally likely sequences. Grouping them by the number of heads gives the counts 1, 4, 6, 4, 1, and dividing by 16 gives the binomial probabilities.

Step through it

Watch it

Animated walkthrough

Step by step

Step 1: Branch on each flip

Each flip splits every path in two: heads up, tails down. After four flips there are 16 paths, all equally likely.

2 × 2 × 2 × 2 = 16

Step 1: Branch on each flip

Step 2: Count heads on each path

Read each path as a sequence and count its heads. HHTT, HTHT, and four others all have exactly 2.

X = number of heads

Step 2: Count heads on each path

Step 3: Stack the paths by heads

Move each sequence into the column for its number of heads. The stacks hold 1, 4, 6, 4, and 1 sequences.

C(4, k): 1, 4, 6, 4, 1

Step 3: Stack the paths by heads

Step 4: Divide by 16

Each sequence has chance 1/16, so each stack's chance is its height over 16. The middle stack wins because there are the most ways to split 2 and 2.

P(X = k) = C(4, k) / 16

Step 4: Divide by 16

Step 5: Read one probability

Exactly two heads happens on 6 of the 16 paths. Find them in the tree and in the tallest stack.

P(X = 2) = 6/16 = 3/8 = 0.375

Step 5: Read one probability

All steps at once

Storyboard

Generate it yourself

cd svg-generator
python3 -m svgmath render binomial-distribution --out /tmp/binomial-distribution

Source: svgmath/diagrams/probability.py