This post in reply to the Question, How to illustrate the Central Limit Theorem in Maple?

The following is the matter of so-called central limit theorems. We have the sum of random variables S:= ksi[1] + ksi[2] + .. ksi[n]. We know only that the number n is large, the variables are independent or weakly dependent, and each ksi[j] is small with respect to S in a certain sense.

By the  central limit theorems it implies that S is close to the normal distribution.

Here is the procedure which illustrates the Lindeberg-Levi theorem ( see http://en.wikipedia.org/wiki/Central_limit_theorem ):
> with(Statistics):
> CLT := proc (n, X)
for j to n do S[j] := RandomVariable(X) end do;
plot(PDF((sum(S[i]-Mean(RandomVariable(X)), i = 1 .. n))/sqrt(n*Variance(RandomVariable(X))), t), t = -2 .. 2)
end proc;
>CLT(15, Exponential(10));

We see that this is close to plot(PDF(RandomVariable(NormalDistribution(0,1)),t),t=-2..2).
Another approach is to plot the histogram of a sample:
H := proc (n, X, v)
 for j to n do S[j] := RandomVariable(X) end do;
Histogram(Sample((sum(S[i]-Mean(RandomVariable(X)), i = 1 .. n))/sqrt(n*Variance(RandomVariable(X))), v))
end proc;
H(25, Exponential(10), 300);


Please Wait...