https://github.com/oniani/quincunx
Multithreaded quincunx simulations
https://github.com/oniani/quincunx
central-limit-theorem multithreading quincunx rust rust-lang statistics
Last synced: 10 months ago
JSON representation
Multithreaded quincunx simulations
- Host: GitHub
- URL: https://github.com/oniani/quincunx
- Owner: oniani
- License: mit
- Created: 2024-12-30T03:57:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-30T03:58:25.000Z (over 1 year ago)
- Last Synced: 2025-02-14T13:07:21.023Z (over 1 year ago)
- Topics: central-limit-theorem, multithreading, quincunx, rust, rust-lang, statistics
- Language: Rust
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Quincunx
A [quincunx][quincunx] is a device for statistical experiments that demonstrates the
[Central Limit Theorem (CLT)][clt]. Specifically, it shows that, with sufficient sample size, the
[binomial distribution][binomial] can approximate the [normal distribution][normal].
## Running Experiments
```console
$ cargo run --release -- 11 1000 ./plot/1000.png
```
## Results
| 10 Particles | 100 Particles | 1000 Particles |
| :-----------------: | :-------------------: | :---------------------: |
| ![10 Particles][10] | ![100 Particles][100] | ![1000 Particles][1000] |
Results clearly show that as the number of particles increases, the distribution gets more normal.
This is a visual proof of CLT which states that as the number of samples increases:
1. The mean gets closer to the center
2. The spread decreases
3. The distribution gets approximately normal
## License
[MIT License][license]
[quincunx]: https://en.wikipedia.org/wiki/Galton_board
[clt]: https://en.wikipedia.org/wiki/Central_limit_theorem
[binomial]: https://en.wikipedia.org/wiki/Binomial_distribution
[normal]: https://en.wikipedia.org/wiki/Normal_distribution
[10]: ./plot/10.png
[100]: ./plot/100.png
[1000]: ./plot/1000.png
[license]: LICENSE