Central Limit Theorem

Let \normalsize X_{1}, X_{2}, \ldots be a sequence of iid random variables with \normalsize E(X_{i})=\mu and \normalsize 0<Var(X_i)=\sigma^2<\infty. Define \normalsize \bar{X}_n=(1/n)\sum_{i=1}^n X_i. Let \normalsize G_n(x) denote the cdf of \normalsize \sqrt{n}(\bar{X}_n-\mu)/\sigma. Then, for any \normalsize x, \normalsize -\infty<x<\infty,

\lim_{n\rightarrow\infty}G_n(x)=\int_{-\infty}^x \frac{1}{\sqrt{2\pi}}e^{-y^2/2}dy

that is, \normalsize \sqrt{n}(\bar{X}_n-\mu)/\sigma has a limiting standard normal distribution.

Animation

Note that from \normalsize n \geq 15, the P-value becomes large, which indicates that we cannot reject the null hypothesis (the normality of the sample mean). The population distribution of the random variables is exponential distribution \normalsize \mathbf{Exp}(1). For small \normalsize n, we can still observe the characteristic of the exponential distribution: the density is right-skewed. But as \normalsize n grows large, the distribution tends to be symmetrical!

Demonstration of the Central Limit Theorem
loading animation frames... 0%

This animation shows the distribution of the sample mean as the sample size \normalsize n grows. A normality test shapiro.test() is also performed to check whether the sample mean follows the normal distribution.

R code

oopt = ani.options(ani.height = 500, ani.width = 600, outdir = getwd(), nmax = 100,
    interval = 0.1, title = "Demonstration of the Central Limit Theorem",
    description = "This animation shows the distribution of the sample
    mean as the sample size grows.")
ani.start()
par(mar = c(3, 3, 1, 0.5), mgp = c(1.5, 0.5, 0), tcl = -0.3)
clt.ani(type = "h")
ani.stop()
ani.options(oopt)
 
prob/central_limit_theorem.txt · Last modified: 2008/06/10 02:58 by yihui
 
Recent changes RSS feed Creative Commons License Donate to AniWiki Contribute Your Ideas! Driven by DokuWiki