Skip to content

A simple python program to visually compare simulated vs mathematical probability using random coin tosses.

Notifications You must be signed in to change notification settings

DhivKrish7/coin-toss-probability

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

coin-toss-probability

Just a simple python project to visually compare simulated vs mathematical probability using random coin tosses. It can simulates any number of coin tosses and checks how close the experimental results get to the ideal 0.5 mathematical probability for heads or tails by using matplotlib graphing.

How-to-use

  1. Clone the repository
  2. Run the 'ctpv.py' file
  3. Enter the number of coin tosses you want to simulate (better go above 100)
  4. It gives you a clean graph to see how simulated probability converges to 0.5

Libraries-used

  1. Random
  2. Matplotlib

Useful-links

  1. https://en.wikipedia.org/wiki/Law_of_large_numbers

Thankyou!

https://www.linkedin.com/in/dhivkrish7/

About

A simple python program to visually compare simulated vs mathematical probability using random coin tosses.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages