# The Central Limit Theorem

The Central Limit Theorem

The Central Limit Theorem is an important result in statistics that states that subject to certain conditions, averages of multiple random variables tend to follow a normal distribution.

May 13, 2017—Stephen Wolfram

## Discovering the Central Limit Theorem

Discovering the Central Limit Theorem

Let’s “discover” the Central Limit Theorem empirically, by looking at collections of random numbers.

Make a list of 10 random real numbers between -1 and 1:

In[]:=

RandomReal[{-1,1},10]

Out[]=

{-0.0771015,-0.366985,-0.339309,0.828772,-0.0314546,0.258496,-0.626615,0.903993,0.337799,-0.719367}

These random numbers are uniformly distributed, so if we make a histogram of them, it’ll be flat.

Make a histogram of 1000 random numbers between -1 and 1:

In[]:=

Histogram[RandomReal[{-1,1},1000]]

Out[]=

With 100,000 numbers the histogram is almost exactly flat:

In[]:=

Histogram[RandomReal[{-1,1},100000]]

Out[]=

Now let’s start finding means of collections of numbers.

This finds the mean of 10 random real numbers:

In[]:=

Mean[RandomReal[{-1,1},10]]

Out[]=

-0.112097

Here is a list of 10 such means:

In[]:=

Table[Mean[RandomReal[{-1,1},10]],10]

Out[]=

{-0.112467,0.0172069,0.0826008,0.134617,-0.220979,-0.0600067,-0.14143,0.171051,-0.13263,0.0301039}

Here is the distribution of 1000 such means:

In[]:=

Histogram[Table[Mean[RandomReal[{-1,1},10]],1000]]

Out[]=

Here is the distribution for 100,000 means:

In[]:=

Histogram[Table[Mean[RandomReal[{-1,1},10]],100000]]

Out[]=

The distribution for the means is not flat; instead it’s a bell-shaped curve.

It’s easier to see the shape of the curve if we use smaller bins; here width 0.01:

In[]:=

Histogram[Table[Mean[RandomReal[{-1,1},10]],100000],{.01}]