# Central Limit Theorem

**The Central Limit Theorem** states that if you take sufficiently large random samples from the population with replacement (whose values are summed), then the distribution of the sample means will be approximately normally distributed.

I know that this works, but I don’t know the theory on why it works. The teacher says the proof is done with Moment-Generating Functions.

This is so powerful because $X_{n}$ can model ANY distribution., For example, if $X∼Bin(n,p)$ then $X∼N(np,np(p−1))$ → wait is this CLT?

If $X_{1},X_{2},…,X_{n}∼Poi(λ)$, then $X_{n}∼N(λ,nλ )$

### Proof

I asked for a proof in class for the CLT which the teacher gave, except I don’t understand it…

Let $X_{1},X_{2},…,X_{N}$ be i.i.d r.v.s. with $E(X_{i})=μ$, $Var(X_{i})=σ_{2}$

Let $z=n σ X−μ $, where $X=n1 ∑_{i=1}X_{i}$ We will show that $lim_{n→∞}M_{z}(t)=e_{2t}$: Let $Y_{i}=σX_{i}−μ $ $z=n σ Y−μ $, $Y_{i}$ is i.i.d with $E(Y_{i})=0$, $Var(Y_{i})=1$

Then, we use the Moment-Generating Function $M_{Z}(t)=E[e_{t}]=π_{i=1}E[e_{tny}]=[M_{y_{i}}n t ]_{n}$ Taking the limits, we have (2nd step to 3rd step jump is by Taylor Approximation, it seems by magic) $lim_{n→∞}M_{Z}(t)=lim_{n→∞}[M_{y_{i}}(n t )]_{n}=lim_{n→∞}[1+0+n2t ]_{n}=e_{2t}$

The central limit theorem is super interesting! Learned it while at Ericsson. Based around the Ericsson. Based around the Law of Large Numbers.

In my laymanns terms, take any distribution and randomly sample from it. Say if you sample at least 30 times, and you take the sum of those sampled values. Then repeat that process like 1000 times. If you plot the sums of those samples, it will follow a Normal Distribution.

### The Continuity Correction

To convert discrete to continuous, we can apply a continuity correction to have a better approximation…? $P(X=4000)=P(3999.5<X<4000.5)$

### To generate a Random Normal Number

Obtained from Xixian at Ericsson. I still don’t know enough to understand why this works.

Suppose $x_{1}$, $x_{2}$, and $x_{N}$ are independent samples chosen from the uniform distribution with the mean $μ$ and variance $σ_{2}$. Let $y$ $y=N ∗σ )(∑_{i=1}x_{i}−N∗μ) $

Where

- $σ$ is the real Variance
- $μ$ is the real mean of the distribution, NOT of the sample. (I made this fatal mistake in the implementation)

Then $y$ is a random variable with a standard normal distribution if $N$ is sufficient large, e.g, $N=30$ is usually the number used