Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

Law of Large Numbers and Central Limit Theorem

Hello! Welcome to your next lesson in our journey through the mathematical foundations of AI.

In our previous lessons, we've built a solid toolkit for describing random variables and their relationships using concepts like expected value, variance, and covariance. Now, we are going to ask a different, more profound question: what happens when we observe and average many random events? This question lies at the heart of all statistical inference and machine learning—it's how we learn from data.

Today, we will explore two of the most celebrated and fundamental theorems in probability theory: the Law of Large Numbers (LLN) and the Central Limit Theorem (CLT). Your learning outcome is to state the Law of Large Numbers (LLN) and the Central Limit Theorem (CLT) and explain their implications for statistical inference. These theorems provide the theoretical bedrock for why we can be confident that our statistical and machine learning models learn meaningful patterns from data.

1. The Setup: Averaging Random Variables

Both the LLN and the CLT deal with the behavior of the sample mean. Imagine we have a set of random variables, , that are independent and identically distributed (i.i.d.). This is a standard assumption in many statistical models, representing repeated, independent experiments of the same underlying phenomenon (e.g., flipping the same coin times, or drawing data points from the same population).

Let's assume each has a true (population) mean and a finite variance . The sample mean is defined as:

The central question for today is: what can we say about as our sample size gets very large?

2. The Law of Large Numbers: Convergence to the Truth

The Law of Large Numbers (LLN) provides the first part of the answer. Intuitively, it states that as you collect more and more data, the sample mean will get closer and closer to the true population mean. It's the mathematical guarantee behind the "wisdom of the crowd."

To formalize this, we need to understand different types of convergence for random variables. The following video provides a fantastic introduction to the LLN, distinguishes between the "strong" and "weak" versions of the law, and offers a rigorous proof for the Weak Law of Large Numbers (WLLN).

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

This video from Harvard University's Statistics 110 course introduces the Law of Large Numbers, explains its significance, and provides a clear proof of the Weak Law.

Please watch the following two segments: Introduction to LLN (02:07 - 10:47): This part explains the concept of the law, the idea of convergence 'with probability 1', and its profound implications for science and estimation. Pay attention to the distinction between the sample mean (a random variable) and the true mean (a constant). Proof of the Weak Law (10:47 - 14:59): This segment presents the formal statement and a complete proof of the Weak Law of Large Numbers using Chebyshev's inequality. Follow the derivation closely.

2.1 Formal Statement and Proof of the WLLN

As you saw in the video, the Weak Law of Large Numbers (WLLN) states that the sample mean converges in probability to the true mean . Formally, for any small positive number , the probability that the sample mean is further away from the true mean than approaches zero as the sample size goes to infinity.

The proof you saw is elegant and brings together several concepts we've studied. Let's recap the steps:

  1. Find the Expected Value and Variance of the Sample Mean:

    • . The sample mean is an unbiased estimator of the population mean.
    • . Since the are independent, the variance of the sum is the sum of the variances: .
  2. Apply Chebyshev's Inequality:
    Chebyshev's inequality states for a random variable with mean and variance : .
    Let's apply this to , where its mean is and its variance is . We set our threshold :

  3. Take the Limit:
    As , the right-hand side clearly goes to 0.

    This completes the proof.

The video also mentioned the Strong Law of Large Numbers (SLLN), which makes a stronger claim: . This means that for any single, infinitely long experiment, the sequence of sample means is guaranteed to converge to . The weak law only says that for a large but finite , being far from the mean is unlikely. For our purposes, the implications are very similar.

2.2 Implications of the LLN for Inference

The LLN is the foundational principle that makes statistical estimation possible.

  • It justifies using sample statistics to estimate population parameters. For instance, the reason we use the proportion of heads in a large number of coin flips to estimate the coin's true bias is a direct consequence of the LLN.
  • It guarantees consistency. In statistical estimation theory (which we will cover next), an estimator is called consistent if it converges to the true value of the parameter as the sample size grows. The LLN proves that the sample mean is a consistent estimator for the population mean.

3. The Central Limit Theorem: The Shape of the Fluctuation

The LLN tells us that the sample mean converges to the constant . But this doesn't tell us anything about the distribution of for a large but finite . How does it fluctuate around ? The Central Limit Theorem (CLT) provides the remarkable answer.

The CLT states that the distribution of the (properly standardized) sample mean approaches a normal distribution as the sample size increases, regardless of the original distribution of the data. This is arguably the most important theorem in all of statistics.

Let's return to the Harvard video to understand the statement and the rigorous proof of this theorem.

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

The second half of the same lecture dives into the Central Limit Theorem, motivating it as a 'second-order' result compared to the LLN and providing a full proof using moment-generating functions.

Please watch the next two segments of the video: Introduction to CLT (14:59 - 24:33): This part explains how the CLT describes the rate and shape of the convergence of the sample mean. It introduces the concept of convergence in distribution and explains why the \sqrt{n} scaling is crucial. Proof of the CLT (24:33 - 37:40): This is a mathematically dense section that provides a complete proof of the CLT using moment-generating functions (MGFs), Taylor series, and L'Hôpital's Rule. Given your goals, this proof is highly relevant.

3.1 Formal Statement of the CLT

As the video proved, the Central Limit Theorem states that if are i.i.d. random variables with mean and finite variance , then the standardized sample mean converges in distribution to a standard normal distribution:

Here, denotes convergence in distribution. This means the CDF of approaches the CDF of the standard normal distribution.

Equivalently, it's often written in terms of the sum , which has mean and variance :

Central Limit Theorem Definition and Formula
This image provides a concise visual summary of the Central Limit Theorem. It shows how the properly normalized sum of i.i.d. random variables converges in distribution to the standard normal bell curve.

The truly amazing part is that this holds true whether the original s come from a Bernoulli, Poisson, Exponential, or some other complex distribution, as long as the variance is finite.

3.2 Implications of the CLT for Inference

The practical power of the CLT is immense. It is the engine behind most of frequentist statistical inference, particularly hypothesis testing and confidence intervals.

To see exactly how, let's explore how the CLT is used to create "asymptotic pivots," which are quantities we can use to make inferences.

GU4204: Statistical Inference

These lecture notes from Columbia University directly explain how the CLT allows us to construct confidence intervals for a population mean, even when the underlying distribution is not normal.

Please read the section titled 'Asymptotic pivots using the central limit theorem' (pages 48-49). This section explicitly connects the CLT to the construction of approximate confidence intervals for a population mean \mu, which is a core task in statistical inference.

As the reading explains, the CLT allows us to make probabilistic statements about our sample mean. Because we know that for a large , is approximately distributed as , we can use the properties of the standard normal distribution to calculate probabilities and construct confidence intervals.

For example, we know that for a standard normal variable , . By the CLT, this means:

Rearranging this inequality allows us to form an approximate 95% confidence interval for the unknown population mean :

This is a cornerstone of statistical inference. Even if is unknown, for large we can substitute the sample standard deviation without changing the result much.

The CLT also justifies the use of normal approximations for other distributions, like the binomial and Poisson, when is large. The Harvard video demonstrated this with the normal approximation to the binomial, a very common and powerful application.

Test your understanding!

A data scientist is analyzing the daily number of transactions on an e-commerce website. The distribution of daily transactions is unknown, but it is definitely not normal (it's skewed with a long tail). From a year of data (365 days), they calculate a sample mean of transactions and a sample standard deviation of .

The scientist wants to provide a 95% confidence interval for the true average number of daily transactions. Why are they justified in using a formula based on the normal distribution, even though the daily data is not normal? What is the key theorem at play?

Show answer

The data scientist is justified because of the Central Limit Theorem (CLT).

The CLT states that the distribution of the sample mean () will be approximately normal, provided the sample size is sufficiently large. Here, is large enough for the CLT to apply.

Even though the distribution of individual daily transactions () is not normal, the distribution of the average of 365 such days () will be bell-shaped and centered around the true mean . This allows the scientist to use the z-score (like 1.96 for 95% confidence) and the normal distribution framework to construct a valid confidence interval for the true mean number of transactions.

Conclusion

In this lesson, we have explored two pillars of probability theory that bridge the gap between theory and practice. They explain why we can be confident in learning from data.

Key Takeaways:

  • The Law of Large Numbers (LLN): States that the sample mean converges to the population mean as the sample size grows. This provides the justification for estimation.
  • The Central Limit Theorem (CLT): States that the distribution of the standardized sample mean converges to a standard normal distribution , regardless of the original data's distribution. This is the foundation for hypothesis testing and constructing confidence intervals.
  • In short: The LLN tells us where the sample average is going (the true mean), and the CLT tells us the path it takes to get there (it follows a normal distribution).

Preview of the Next Lesson:
With the LLN and CLT as our theoretical foundation, we are now perfectly positioned to formalize the process of estimation. In the next lesson, we will begin our module on Statistical Estimation Theory. We will define what a statistical "estimator" is and introduce the key criteria for judging its quality, such as unbiasedness, consistency (which you now know is guaranteed for the sample mean by the LLN), and efficiency.

Can't find a good explanation? Sign up and we'll make it for you

Sign up