### About

# Galton Board

A Galton board
is a vertical board with *N* rows of pegs onto which a ball is dropped. Each
time a ball hits a peg, it has a probability *p* of bouncing to the left and a
probability of 1*-p* of bouncing to the right.The simulation's histogram shows the
distribution of final x-coordinates as each ball leaves the board and is collected into
bins.

The simulation gives rise to the binomial distribution if the probabilities of left and right bounces are equal. At first there does not seem to be any pattern but after many trials the familiar "bell curve" shape begins to emerge.

### Exercises:

- When there are N pegs on the bottom row, the probability of the ball landing at the
nth peg (where the 0th peg is located to the far left in the diagram and the Nth peg
is at the far right) is given by the Binomial distribution:

P_{N}(n) = (N!/n!(N-n)!)p^{n}(1-p)^{N-n}.

Run the simulation on "high speed" for a while to build the histogram and compare the fraction of balls that arrive at a given peg with the probability given by the Binomial distribution. - If you have EJS installed, add an additional custom method
to display the results of the Binomial distribution on the histogram for comparison.
Note that for large values of the factorial (greater than 10!), you should use the
Stirling approximation (or some other way of handling the large values of factorials
since 25! uses 26 digits: see Computer Science wiki):

lnN! = NlnN - N + ln(2πN)Compare the simulation to the Binomial distribution.^{1/2}

### References

Wikipedia: http://en.wikipedia.org/wiki/Galton_board

### Credits:

The Galton Board Model was created by Wolfgang Christian using the Easy Java Simulations (EJS) version 4.1 authoring and modeling tool.The exercises were written by Anne Cox.

You can examine and modify a compiled EJS model if you have Easy Java/JavaScript Simulations (EjsS) installed. Information about EjsS is available at: <http://www.um.es/fem/Ejs/> and in the OSP comPADRE collection <http://www.compadre.org/OSP/>.

### Translations

Code | Language | Translator | Run | |
---|---|---|---|---|

### Software Requirements

Android | iOS | Windows | MacOS | |

with best with | Chrome | Chrome | Chrome | Chrome |

support full-screen? | Yes. Chrome/Opera No. Firefox/ Samsung Internet | Not yet | Yes | Yes |

cannot work on | some mobile browser that don't understand JavaScript such as..... | cannot work on Internet Explorer 9 and below |

### Credits

Wolfgang Christian; Loo Kang Wee

### end faq

### Sample Learning Goals

[text]

### For Teachers

This is a simulation of a Galton Board, a vertical board with n rows of pegs onto which a ball is dropped. Every time the ball hits a peg, it has a probability p of bouncing to the left, and a probability 1-p of bouncing to the right.

Research

[text]

### Video

The Galton Board by D!NG

### Version:

- http://weelookang.blogspot.sg/2016/02/vector-addition-b-c-model-with.html improved version with joseph chua's inputs
- http://weelookang.blogspot.sg/2014/10/vector-addition-model.html original simulation by lookang

### Other Resources

[text]