Just click on the green flag and watch. This project illustrates how the Monte Carlo Method is used to approximate a solution to a probability problem (see Notes and Credits) when the exact (theoretical) solution can not be found. The 'counter' variable counts the number of sticks with length > 0.5. The 'Trials' variable counts the total number of trials. The probabilty of length > 0.5 is computed by divinding the Counter variable by the Trials variable.
The Monte Carlo Method is a tool mathematicians and scientists use when an exact solution to a problem can't be found. The problem is simulated using a computer program and the results of the program are taken as the 'solution' to the problem. Many years ago I stated this problem in a mathematics class: Given a unit square (a square with side length = 1), what is the probability that the length of the line connecting two randomly selected points is greater than one-half? To this day, none of us have been able to arrive at a 'theoretical' solution. we can only give the 'experimental' solution, arrived at by using the Monte Carlo method used in this project. Can you offer a theoretical solution?