Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 38

Monte Carlo Estimation: Law of Large Numbers and Central Limit Theorem

Recommended resources

Introduction

In our previous lessons, we delved deep into the world of deterministic transport methods, culminating in the implementation of a multigroup S solver. These methods solve the Boltzmann equation for the average behavior of a vast population of particles. We now pivot to an entirely different, and in many ways more intuitive, approach: Monte Carlo simulation. Instead of solving a complex equation for an averaged quantity, we will simulate the probabilistic life stories of individual particles and then, by observing many such stories, deduce the average behavior.

This lesson lays the essential theoretical groundwork for this new approach. Our goal is to explain the Law of Large Numbers and the Central Limit Theorem in the context of Monte Carlo estimation. These two pillars of probability theory provide the mathematical justification for the entire Monte Carlo method. They answer the fundamental questions: Why can we trust the average of random simulations to give us the correct physical answer, and how can we quantify the uncertainty in that answer?


From Integrals to Averages

At its heart, a Monte Carlo calculation is a method for computing a definite integral. As we've seen, many physical quantities, like the scalar flux or reaction rates, can be expressed as integrals over phase space (energy, angle, position). Let's say we want to compute a quantity which is the expected value of some function , where is a random variable drawn from a probability density function :

The Monte Carlo method's proposal is stunningly simple:

  1. Generate a large number, , of independent samples from the distribution .
  2. Evaluate the function at each sample: .
  3. Approximate the true mean with the sample mean, :

In particle transport, represents the complete history of the -th simulated particle, and is the contribution of that particle to the quantity we are scoring (e.g., the dose deposited in a voxel). The sample mean is our final calculated dose.

This naturally leads to two critical questions:

  1. Does actually approach the true value as we increase ?
  2. For a finite , how close is to ? Can we put an error bar on our estimate?

The Law of Large Numbers answers the first question, and the Central Limit Theorem answers the second.


The Law of Large Numbers: Why Monte Carlo Works

The Law of Large Numbers (LLN) provides the fundamental guarantee for the Monte Carlo method. It states, simply, that the sample mean converges to the true mean as the number of samples approaches infinity. This ensures that by running more particle histories, we are indeed getting closer to the physically correct answer.

The following video from Harvard's Statistics 110 course gives a fantastic and rigorous explanation of the LLN. It also provides a short proof of the "weak" version of the law, which is quite accessible given your background.

Lecture 29: Law of Large Numbers and Central Limit Theorem | Statistics 110

This video from the Harvard University channel explains the Law of Large Numbers and provides a concise proof. Pay close attention to the intuitive explanation using coin flips and the "swamping" concept, which is a powerful way to think about how convergence happens.

First, watch the initial setup, which defines the concepts of i.i.d. (independent and identically distributed) random variables and the sample mean: the setup. Next, focus on the core explanation of the LLN, which uses the familiar example of coin flips to build intuition: LLN explanation. Finally, watch the derivation of the "weak" Law of Large Numbers using Chebyshev's inequality. This is a satisfyingly direct proof that shows why the theorem holds: the proof.

As the video shows, the proof relies on the fact that the variance of the sample mean is proportional to . As , the variance goes to zero, meaning the distribution of the sample mean becomes an infinitely sharp spike at the true mean . The LLN gives us confidence that our simulation is not a fool's errand; it will eventually converge to the right answer.


The Central Limit Theorem: Quantifying the Uncertainty

The LLN is reassuring, but in any real simulation, is finite. We need to know more than just "it converges eventually." We need to know how fast it converges and what the distribution of our estimate looks like for a large but finite . This is where the Central Limit Theorem (CLT) comes in.

The CLT is one of the most remarkable results in all of mathematics. It states that, for almost any underlying probability distribution with a finite variance, the distribution of the sample mean will approach a normal (Gaussian) distribution as gets large.

The practical implications of this are profound:

  1. Distribution Shape: We know the shape of the probability distribution for our final answer—it's a Gaussian bell curve centered on the true mean .
  2. Convergence Rate: The theorem specifies the variance of this Gaussian. The variance of the sample mean is , where is the variance of the underlying distribution of a single sample. This means the standard deviation of our estimate, often called the standard error, is .

This dependence is the single most important characteristic of a standard Monte Carlo simulation's convergence. To reduce the statistical uncertainty in our result by a factor of 2, we must run 4 times as many particle histories. To reduce it by a factor of 10, we need 100 times the computational effort.

Let's return to the Harvard video to see the CLT explained and proven. The proof uses moment-generating functions (MGFs) and Taylor series, which should be familiar territory. The key idea is to show that the MGF of the standardized sample mean converges to the MGF of a standard normal distribution.

Lecture 29: Law of Large Numbers and Central Limit Theorem | Statistics 110

This part of the lecture introduces the CLT as providing the rate of convergence and the shape of the distribution of the sample mean.

Watch the section that introduces the CLT and contrasts it with the LLN, emphasizing its role in describing the rate of convergence: introducing CLT. Pay attention to the formal statement of the theorem and its powerful implications: regardless of the original distribution, the standardized mean converges to a standard normal: statement of CLT. I highly recommend you watch the following section, which provides a full proof of the CLT. The strategy is to show that the moment-generating function of the standardized sum converges to the MGF of a normal distribution. Focus on understanding the strategy rather than every algebraic step: the proof.

The image below provides striking visual confirmation of the CLT's core prediction. It's a log-log plot showing the empirically measured standard error from a Monte Carlo simulation as a function of the number of simulations, .

A log-log plot demonstrating the convergence of the standard error in a Monte Carlo simulation. The empirical standard error (blue dots) closely follows the theoretical \(1/\sqrt{N}\) trend (red dashed line), which appears as a straight line with a slope of -0.5 on this plot.

As you can see, the data points fall almost perfectly on the theoretical line representing . This is the CLT in action.

To solidify these concepts in the context of practical estimation, the following reading from a textbook on Monte Carlo methods is very helpful. It formally defines the sample mean and variance and shows how the CLT is used to construct confidence intervals—the "error bars" on our results.

Chapter 2 Basics of direct Monte Carlo

This excerpt provides a more formal statistical perspective on Monte Carlo estimation.

Please read the section titled "Error estimation" up to the start of Theorem 2. This part introduces the sample mean \hat{\mu}_n as an unbiased estimator of the true mean \mu and derives its variance, \sigma^2/n. Then, continue reading from Theorem 2 to the end of the section, focusing on how the CLT is used to construct confidence intervals for the estimate.

This reading connects the abstract theorem to the practical task of reporting a result like Dose = 1.05 ± 0.02 Gy, where the ± 0.02 is derived directly from the standard error predicted by the Central Limit Theorem.


Conclusion

In this lesson, we have established the statistical bedrock of the Monte Carlo method. You now understand not just that it works, but precisely why and how it works.

Key Takeaways:

  • Monte Carlo simulation estimates a physical quantity by computing the sample mean of many random particle histories.
  • The Law of Large Numbers (LLN) guarantees that this sample mean converges to the true physical mean as the number of histories goes to infinity.
  • The Central Limit Theorem (CLT) provides a more detailed picture for a finite number of histories. It tells us that the distribution of our estimated mean is approximately Gaussian, and that its standard error decreases proportionally to .
  • This convergence rate is a fundamental property of standard Monte Carlo. Improving simulation efficiency often boils down to finding ways to reduce the variance , a topic we will explore in depth later in the course under "variance reduction."

Preview of the Next Lesson:
We have the "why," but we still need the "how." To run a simulation, we need a way to generate random numbers that follow specific probability distributions—for example, the exponential distribution for particle path lengths or the Klein-Nishina distribution for scattering angles. In our next lesson, we will learn our first major sampling technique: inverse transform sampling.