Central Limit Theorem: Let X1, X2, ... be a sequence of iid random variables with a finite mean μ and finite variance σ^2, and let Sn be the sum of the first n random variables in the sequence: Sn = X1 + X2 + ... + Xn.
(a) Let Xi be a uniform continuous random variable taking values in the interval (0,3). Write a MATLAB program to plot the pdf and cdf of Sn. Consider n = 1, 2, 3, 4, 5, 10, 20, 40 and compare your results.
(b) Calculate analytically the mean and the variance of Xi and of Sn in part (a).
(c) Write a MATLAB program to generate a Gaussian random variable with the same mean and variance as Sn. Superimpose this plot with the plots from part (a).
(d) Repeat parts (a)-(c) with Xi representing a toss of a fair 6-sided die
(e) Repeat parts (a)-(c) with Xi representing a toss of an unfair 6-sided die with even sides twice as likely as odd sides
Use t = 10^4 samples in the above.