We can use luck to solve puzzles. 
We can use luck to solve hard puzzles. 

Imagine you want to find the area of a strange shape. You could throw many grains of sand on the ground. 

A man named Stanisław Ulam helped create this way. He was inspired by a casino in Monaco. He saw his uncle enjoy gambling there. 
Scientists use this method in many ways. It helps them study physics and biology. It can even help predict risks for nuclear power plants. 
Computers do most of the work today. They run many tests very quickly. This is helpful for complex math. However, these tests can take a lot of power. The more tests you run, the better your answer becomes. 
Even though it uses luck, it is a very important tool. It has helped make many new breakthroughs in science.
Imagine you need to find the size of a strange shape. You could throw many grains of sand over the shape. 

This method follows a very specific pattern to work. First, you define the area where your guesses will happen. Next, you pick random points from that area. Then, you do a math test on each point to see where it lands. Finally, you group all those results together to find an answer. 
A mathematician named Stanisław Ulam helped create the modern version. He was inspired by his uncle's love of gambling at a casino. The casino was the famous Monte Carlo in Monaco. 
Today, scientists use this method in many different fields. It is used in physics to study fluids and gases. Engineers use it to predict if a plane or a rocket might fail. It also helps people in finance understand business risks. Experts use it in biology and even in artificial intelligence. It is one of the most important ideas of the 20th century. It has led to many great scientific breakthroughs.
Computers do most of the heavy lifting for these simulations. They can run many tests much faster than people can. However, these tests can sometimes take a lot of computer power. 
Monte Carlo methods are a broad class of computational algorithms. They use repeated random sampling to obtain numerical results. This approach uses randomness to solve deterministic problems. A deterministic problem is one where the outcome is fixed by specific rules. Monte Carlo methods are essential for solving problems that are too complex for standard mathematical analysis. They provide approximate solutions through simulation. 
The process follows a specific, repeatable pattern. First, you must define a domain of possible inputs. Next, you generate these inputs randomly from a probability distribution. This distribution determines how likely each input is to occur. After generating an input, you perform a deterministic computation on the output. Finally, you aggregate all these individual results to find a single estimate. This aggregation often involves calculating a sample mean, which is the average of all results. 
There are three main problem classes where these methods are applied. The first is optimization, which involves finding the best solution among many choices. The second is numerical integration, used to calculate areas or volumes under curves. The third is non-uniform random variate generation. This helps model phenomena with significant input uncertainties. For example, engineers use these methods for risk assessments in nuclear power plants.
The history of these methods is tied to both gambling and nuclear physics. The name comes from the Monte Carlo Casino in Monaco. Mathematician Stanisław Ulam was inspired by his uncle's gambling habits. In the 1930s, Enrico Fermi experimented with these ideas to study neutron diffusion. However, Fermi did not publish his work at that time. In the late 1940s, Ulam developed the modern Markov Chain Monte Carlo method. He was working on nuclear weapons projects at the Los Alamos National Laboratory. 
These methods are incredibly significant in modern science. They are used in physics to simulate fluids and disordered materials. In systems engineering, they predict failures in aircraft design or oil exploration. These predictions are often better than human intuition. In finance, they help calculate business risks. The method is even applied to social sciences like sociology and psychology. It is considered one of the most influential ideas of the 20th century. 
A classic example is approximating the value of pi. You can draw a quadrant inside a unit square. If you scatter points uniformly over the square, you can count how many land inside the quadrant. The ratio of points inside the quadrant to the total points gives an estimate. You then multiply this ratio by four to find pi. This works because the ratio of the areas is related to pi. The approximation improves as you add more random points to the square.
Despite their power, Monte Carlo methods face several challenges. There is a constant trade-off between accuracy and computational cost. Getting a very precise answer requires a massive number of samples. This can lead to a very high runtime for complex problems. There is also the "curse of dimensionality," which makes high-dimensional problems harder. Additionally, the reliability of the results depends on the quality of random number generators. Researchers must carefully verify and validate their results to ensure they are correct.
🖼️ Images & Media (5)
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
What is Nepedia?
A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.