Home
Help
Resources
Extensions
FAQ
NetLogo Publications
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

# Galton Box

 If you download the NetLogo application, this model is included. You can also Try running it in NetLogo Web

## WHAT IS IT?

A Galton box is a triangular board that contains several rows of staggered but equally spaced pegs. Balls are dropped from the top, bounce off the pegs and stack up at the bottom of the triangle. The resulting stacks of balls have a characteristic shape.

The model enables you to observe how nature produces the binomial coefficients from Pascal's Triangle and their relation to a Gaussian bell-shaped normal curve. The model can also simulate coin tossing experiments with biased coins which result in skewed distributions

There are many applications for the concepts encompassed in a Galton box. People employed in a wide variety of fields use binomial and normal distributions to make precise calculations about the likelihood of events or groups of events occurring.

## HOW IT WORKS

With the default settings, the model reproduces a traditional Galton box. But you can also adjust the probability of the balls bouncing right or left when it hits a peg to be something other than 50-50.

## HOW TO USE IT

Click the SETUP to set up the rows of the triangle, the number of balls, and other parameters. Click to GO button to begin the simulation.

The PILE-UP? button controls if the balls create piles or simply disappear when they reach the bottom of the triangle. If PILE-UP? is on and the pile of balls reaches the bottom of the triangle, the model will stop. Note: if you are running a trial with a large number of balls you might want to turn PILE-UP? off.

## THINGS TO NOTICE

With a small number of balls it is hard to notice any consistent patterns in the results.

As you increase the number of balls, clear patterns and distributions start to form. By adjusting the CHANCE-OF-BOUNCING-RIGHT you can see how different factors can change the distribution of balls. What types of distributions form when the CHANCE-OF-BOUNCING-RIGHT is set at 20, 50, or 100?

This model is a good example of an independent trials process. Each ball has a probability of falling one way, and its decision is unrelated to that of any of the other balls. The number of rows the balls must fall through affects the amount of variation present in a run of the model.

## THINGS TO TRY

Change the NUMBER-OF-BALLS and NUMBER-OF-ROWS sliders. How does varying numbers alter how balls stack up?

Change the CHANCE-OF-BOUNCING-RIGHT slider as balls have begun to fall. What kinds of ball distributions can you produce?

Change the NUMBER-OF-BALLS slider. What is the best way to produce a standard binomial distribution (or approximate a bell curve)?

Set a CHANCE-OF-BOUNCING-RIGHT then try to predict the resulting stacks of balls. How would you calculate the mean and variances of a given stack for a given setting?

## EXTENDING THE MODEL

Make the balls shade the patches as they fall, so the more balls pass a patch the lighter it gets. This will let the user how frequently different paths are traveled.

Modify the program to allow independent adjustment of each peg, so that they can adjust their own orientation, rather than having all the pegs synchronized.

Change the shape of the board. Maybe flip the triangle upside down. How does this effect how the balls get distributed?

In addition to changing the shape of the board, change the direction balls can go. Maybe allow balls to go in all directions.

Make it so you can select a specific peg. If a ball bounces off that peg, stop the ball. Keep track of how many balls are stopped. What specific insight does this provide about the independent trials process and ball distributions?.

## RELATED MODELS

• Random Walk Left Right
• Binomial Rabbits

## HOW TO CITE

If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.

For the model itself:

Please cite the NetLogo software as: