# Central Limit Theorem with Python

April 14, 2018 The central limit theorem tells us that the sample mean will be approximately normally distributed for large sample sizes, regardless of the distribution from which we are sampling. Suppose we are sampling from a population with mean μ and standard deviation σ. Let Y be a random variable representing the sample mean for n independently drawn observations. The mean of the sampling distribution of the sample mean is equal to the population mean. And the standard deviation of the sampling distribution of Y is equal to:

If the population is normally distributed, then Y is also normally distributed. And if the population is not normal we can use the central limit theorem — the distribution of the sample mean tends toward the normal distribution as the sample size increases, regardless of the distribution from which we are sampling.

Let’s take the population with the logarithmic distribution. And make four experiments. The first time we will take two random values from a population million times and calculate mean, the second time we will take four and last time we will take 10. From charts, you will see that by increasing the number of samples distribution of means looks more like the normal distribution.

Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
view raw 2.2.1.ipynb hosted with ❤ by GitHub

And let’s also try uniform distribution.