Independent and Identically Distributed Gamma

This web page gives a few examples of the central limit theorem (CLT) in action.

We know the sum of gamma random variables is gamma. The CLT says when the number of terms in the sum is large, this gamma distribution should be approximately normal.

But how large the number of terms in the sum has to be depends on the actual gamma distribution chosen for the terms.

Change the assignments of alpha and n in the first two lines to experiment.

The larger alpha is, the less skewed the distribution of the individual terms is and the smaller n has to be to get good normal approximation. You should be able to see this for yourself, if you experiment.

Independent and Identically Distributed Bernoulli Mixture of Normal

In this example, we use a bimodal distribution for the individual terms. Since there are no brand name bimodal distributions, we make one up, the distribution of X + Y when X has the Bernoulli distribution with success probability p and X has the normal distribution with mean zero and variance σ2.

The distribution of the sum of n IID random variables having this distribution is the distribution of X + Y when X has the Binomial(n, p) distribution and X has the Normal(0, n σ2) distribution.

Change the assignments of p, sigma, and n in the first three lines to experiment.

The closer p is to one-half, the less skewed the distribution of the individual terms is and the smaller n has to be to get good normal approximation. You should be able to see this for yourself, if you experiment.

The wiggliness caused by small sigma is less important.