--- tags: introduction to probability, statistics --- ([home](https://github.com/alexhkurz/introduction-to-probability/blob/master/README.md)) # Sampling Distribution of Sample Proportion [sample-proportion.R](https://github.com/alexhkurz/introduction-to-probability/blob/master/src/sample-proportion.R) is essentially the same program as the one at [Khanacademy - Sampling distribution of sample proportion part 2](https://www.khanacademy.org/math/ap-statistics/sampling-distribution-ap/sampling-distribution-proportion/v/sampling-distribution-of-sample-proportion-part-2?modal=1), see there for explanations. Modify the program to run your own experiments. **Remark:** The distribution of sample proportions is $X_n\sim B(n,p)/n$, where $B(n,p)$ is the binomial distribution. [^bernoulli] [^bernoulli]: For example, $p$ is the probability of drawing a green ball in an urn and $n$ is the sample size. Then the limit of $X_n$ for $n\to\infty$ is normal. This does not directly follow from the central limit theorem as we discussed it, since $X_n\sim B(n,p)/n$ is not taking a mean over *identical* independent distributions.