 Back to main page

### Demo of Central Limit Theorem

The central limit theorem states that, in some situations, when independent random variables are added, their sum tends towards a normal distribution even if the variables themselves are not normally distributed. We can illustrate this with dices. With a single dice, the propability of getting each value is equal. The single dice follows a uniform distribution. If we have two dices and calculates the sum, the probability of getting each possible sum is however different. We can only get a sum of 2 if we roll two 1's, but there are more combinations for getting a sum of 6. The table below shows the number of combinations for rolling two six-sided dices (resulting in a sum between 2 and 12). If we plot the number of combinations in a bar chart (seen to the right), the distribution almost resembles a normal distribution. If we increase the number of dices, the distribution will more and more approach the normal distribution.

Sum N Combinations
2 1 1,1
3 2 1,2 2,1
4 3 2,2 1,3 3,1
5 4 2,3 3,2 1,4 4,1
6 5 2,4 4,2 3,3 1,5 5,1
7 6 3,4 4,3 2,5 5,2 1,6 6,1
8 5 3,5 5,3 4,4 2,6 6,2
9 4 4,5 5,4 3,6 6,3
10 3 5,5 4,6 6,4
11 2 5,6 6,5
12 1 6,6 In this demonstration we will use five six-sided dices, each dice following a uniform distribution, resulting in sums between 6 and 30. The number of times each sum is drawn is shown in a bar chart. Note that the x-axis is shifted to the left so the bar chart is centered around x = 0.

Each time you click the Update button, 1000 random samples will be drawn. Each random sample consists of rolling the five dices and calculate the sum, and increase the number of times the sum is drawn in the bar chart. The more samples that are drawn, the more the distribution will look like the normal distribution even if each dice follows another (uniform) distribution. This is what the Central Limit Theorem tells us.

 Samples drawn: 0