4.8. Central Limit Theorem¶
We know that many random variables naturally fit the normal distribution model. It turns out that random variables from other distributions can be mapped to a normal distribution by the central limit theorem.
From a population that has mean and variance
,
draw
sampling sets, each of size
. The central limit
theorem says that when
is large, the distribution of the sample
means and sample sums is approximately normal regardless of the underlying
population distribution.
For each sampling of random variable
,
, let
be the sample mean, and let
be the sample sum.
We also define variable as follows.
Then we can define normal distributions from ,
,
and
.
Let’s see this in action. We will start with, representing
the six sides of a die, so we use a discrete uniform distribution.
We will put the data in a
matrix so that each column
will be a sampling. Then we can find the mean and sum of each column to
get new random variables with normal distributions.
>> n = 100;
>> X = randi(6, n); % 100 x 100
>> X_bar = mean(X); % 1 x 100
>> mu = mean(X(:))
mu =
3.4960 % 3.5 expected
>> sigma = std(X(:))
sigma =
1.7025 % 35/12 = 2.92 expected
% Make Z ~ N(0, 1)
>> Z = (X_bar - mu)/(sigma/sqrt(n));
>> mean(Z)
ans =
-1.9895e-15
>> var(Z) % Z ~ N(0,1)
ans =
0.9791