--- tags: introduction to probability, statistics --- # The Central Limit Theorem ([home](https://github.com/alexhkurz/introduction-to-probability/blob/master/README.md)) (under construction) The program [central-limit-biased-die.R](https://github.com/alexhkurz/introduction-to-probability/blob/master/central-limit-biased-die.R) defines various probability distributions, such as `die_2` [^die2] and two parameters sample_size number_of_samples The best way to understand what all this means is to run the program. (To learn quickly, formulate for yourself what plot you expect the program to output before your run it.) **Activity:** - Set `sample_size=1` and `number_of_samples=1`. Increase `number_of_samples`. - Observe how the plot (sampling distribution) gives better and better approximations of the probability distribution of the die. - Set `sample_size=1` and `number_of_samples = 10000`. Increase `sample_size`. - What do you observe about how the plot changes? - How does the width of the plot change when `sample_size` increases? - If you start with a skewed distribution, how does the skew change when when `sample_size` increases? Does the skew change if you keep `sample_size` fixed and increase `number_of_samples` instead? **Remark:** Let $\overline X_n$ be the distribution corresponding to `sample_size` $n$. Increasing `number_of_samples` has the effect that the sampling distribution approximates better the distribution $\overline X_n$. Increasing `sample_size` has the effect that $\overline X_n$ resembles more a Gaussian. [^die2]: `die_2 = c(5/20,5/20,4/20,3/20,2/20,1/20)` is a die biased towards outcomes 1 and 2 with 6 being the least likely. In detail, outcomes 1 and 2 each have probability $5/20=1/4$, outcome 3 has probability $4/20=1/5$, etc. If you wonder where the outcomes are defined in the program, it happens in line 25 where it says `x = c(1,2,3,4,5,6)`. ## References For background we used Khanacademy's AP Statistics on [The central limit theorem](https://www.khanacademy.org/math/ap-statistics/sampling-distribution-ap/what-is-sampling-distribution/v/introduction-to-sampling-distributions).