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.
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
Read each path as a sequence and count its heads. HHTT, HTHT, and four others all have exactly 2.
X = number of 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
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
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
cd svg-generator python3 -m svgmath render binomial-distribution --out /tmp/binomial-distribution
Source: svgmath/diagrams/probability.py