Skip to content

A Python-based simulation of Buffon's Needle problem, developed for my CS107 Probability course.

License

mikayelgr/buffons-needle-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Buffon's Needle Simulation in Python

A Python-based simulation of Buffon's Needle problem in probability theory, created for my Probability course. The GitHub repository also includes the slides for this topic, authored by Mr. Mher Martirosyan, in PDF format.

The code features two implementations of the simulation: one based on a standard approach and another experimental version where the projection is computed using the sine function. Benchmark results show that after 100,000 runs with 20,000 needle drops per run, the margin of error for the sine-based implementation is approximately 0.0001% which was an interesting observation.

About

A Python-based simulation of Buffon's Needle problem, developed for my CS107 Probability course.

Topics

Resources

License

Stars

Watchers

Forks