The Galton board

In 1889, Sir Francis Galton built a contraption: balls drop through pegs, bouncing randomly left or right at each level. What shape do you think forms at the bottom?

What do you think?
What shape do you think the pile of balls forms when they collect at the bottom?
Galton Board
Speed:
Total balls: 0

Distribution (0 balls)

0
0
0
1
0
2
0
3
0
4
0
5
0
6
0
7
0
8
0
9
0
10
Observed
Theoretical

Drop some balls and watch the distribution form. Each ball makes a series of independent left-right choices.

The Bernoulli distribution

Before we understand the full Galton board, let's start with the simplest possible random event: a single coin flip.

A Bernoulli trial is any experiment with exactly two outcomes: success (1) or failure (0). Think of it as the atomic unit of randomness.

Bernoulli Distribution

A random variable XX has a Bernoulli distribution with parameter pp if:

  • P(X=1)=pP(X = 1) = p (success)
  • P(X=0)=1pP(X = 0) = 1 - p (failure)

We write XBern(p)X \sim \text{Bern}(p).

The expected value:

What do you think?
A coin has 70% chance of heads. If we encode Heads=1 and Tails=0, what's E[X]?
Enter a decimal, e.g. 0.42

The variance is Var(X)=p(1p)\text{Var}(X) = p(1-p), which is maximized when p=0.5p = 0.5 (maximum uncertainty).

For Bern(0.5), what's the variance? Use: Var(X) = p(1-p) (decimal, e.g. 0.42)

The binomial distribution

Now, what happens when we repeat a Bernoulli trial nn times and count the successes?

What do you think?
You flip a fair coin 10 times. Which outcome is more likely: exactly 5 heads or exactly 10 heads?

Watch it happen — each row adds another independent Bernoulli trial, and the sum builds toward the Binomial:

Sum of Bernoullis
0
1
2
3
4
5
6
7
8
9
10
Number of heads (out of 10)
Binomial Distribution

If XX counts the number of successes in nn independent Bernoulli(pp) trials, then:

P(X=k)=(nk)pk(1p)nkP(X = k) = \Large\binom{n}{k} p^k (1-p)^{n-k}

We write XBin(n,p)X \sim \text{Bin}(n, p).

The formula has three parts:

  • (nk)\binom{n}{k}: How many ways to choose which trials are successes (see combinations)
  • pkp^k: Probability of kk successes
  • (1p)nk(1-p)^{n-k}: Probability of (nk)(n-k) failures
Binomial Formula Breakdown
The Question
P(X = 3) = ?
In 10 trials with 40% success rate, what's the probability of exactly 3 successes?
1/5

Back to the Galton board

Now we can understand what's happening on the Galton board:

What do you think?
On a Galton board with 10 rows, a ball bounces right 7 times. Which bin does it land in?
Enter a whole number

Each ball makes nn independent choices. If going right counts as "success":

  • Final position = number of rightward bounces
  • Each ball's position follows Bin(n,0.5)\text{Bin}(n, 0.5)

The bell curve forms when you add up many independent random choices. This is the Central Limit Theorem in action.

For a board with 8 rows and p=0.5, which bin is most likely? (whole number)

Key formulas

For XBin(n,p)X \sim \text{Bin}(n, p):

PropertyFormula
Expected ValueE[X]=npE[X] = np
VarianceVar(X)=np(1p)\text{Var}(X) = np(1-p)

Intuition: Each of the nn trials contributes pp on average to the expected value.

For Bin(50, 0.6), what's E[X]? (whole number)
For Bin(100, 0.5), what's Var(X)? (whole number)

What's next

In the next lesson, we'll explore how the binomial distribution's shape changes with different parameters, and learn to work with cumulative probabilities.