People land (stumble) on my blog the most to learn Monte Carlo simulation. It's a numerical method for solving real-world problems, especially those for which we don't know the exact solution. It's also a great way to learn coding and use math to further understand a problem.
Let me show you 4 examples, best to be read in sequence. The codes on my blog are in Matlab, but you can also find them in Python and R on GitHub.
1. Craps
Skills covered:
- Random number generation
- If-else statement
- While and for loops
- Conditional probability
2. Penney's Game
Skills covered:
- Arrays
- String operations
- User-defined function
- Conway's algorithm
3. Buffon's Needle
Skills covered:
- Ceiling and floor functions
- Min and max functions
- Trigonometry & calculus
- Affine transformation
- Vectorization (parallelization)
- Polymorphism
4. How Big Is Your Heart?
Skills covered:
- Dimensional analysis
- Boundary value analysis
- Size-dependent simulation
Top comments (2)
Thank you for the articles, they are very informative, yet simple.
The second link leads to the first post, btw.
Hi, Maria. I'm glad that you found them helpful. Thanks for letting me know about the incorrect link, it's fixed now. :)