Skip to content

hadber/bellcurve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

This is a simple python script to simulate a Galton board and generate a normal (Gaussian) distribution. You can find more about the Galton board on Wikipedia or by watching this excellent Vsauce video.

How does it work?

There are two files: bellcurve.py and sd.py. The first of the two is used to generate the data by simulating a ball dropped in a Galton board. The paramaters can be tweaked by changing the TOTAL_BALLS and TOTAL_LINES which change the amount of balls simulated respectively the amount of lines. The second script shows the probability to have CONSECUTIVE_START up to MAX_CONS balls go in the same direction (left or right) consecutively (example: right-right-right -> three times right).

Requirements

You need matplotlib to visualize the data. If you do not wish to do so, feel free to remove the plot functions.

Examples

About

galton board simulation in python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages