Binomial Distribution: Coin Flips and Success Counts
Problem
Flip a coin n = 20 times with probability p of heads. Show P(k heads) = C(n,k) p^k (1−p)^(n−k) for k = 0 to n as a bar chart.
Explanation
What is the binomial distribution?
The binomial distribution answers: "If I repeat an experiment times, each with probability of success, what's the probability of getting exactly successes?"
The formula
where is "n choose k" — the number of ways to pick which of the trials are successes.
Step-by-step example: coin flips,
What is ?
Step 1 — Identify values: , , .
Step 2 — Compute : .
Step 3 — Apply the formula:
So there's about a 17.6% chance of getting exactly 10 heads in 20 flips.
Key properties
- Mean:
- Standard deviation:
- Shape: Symmetric when ; skewed left when ; skewed right when .
When to use the binomial
The binomial applies when: (1) fixed number of trials , (2) each trial has exactly two outcomes (success/failure), (3) constant probability , (4) trials are independent.
Examples: coin flips, defective items in a batch, free throw success rate, true/false quiz guessing.
Try it in the visualization
Adjust and . The bar chart shows for each . The mean line shifts with . Toggle the normal approximation to see how the binomial becomes bell-shaped for large .
Interactive Visualization
Parameters
Got your own math or physics problem?
Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.