You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Example - CLT with Bernoulli Trials (Coin Flips)
649
649
- for this example, we will simulate $n$ flips of a possibly unfair coin
650
-
- $X_i$ be the 0 or 1 result of the $i^{th}$ flip of a possibly unfair coin
650
+
- let $X_i$ be the 0 or 1 result of the $i^{th}$ flip of a possibly unfair coin
651
651
+ sample proportion , $\hat p$, is the average of the coin flips
652
652
+ $E[X_i] = p$ and $Var(X_i) = p(1-p)$
653
653
+ standard error of the mean is $SE = \sqrt{p(1-p)/n}$
654
654
+ in principle, normalizing the random variable $X_i$, we should get an approximately standard normal distribution $$\frac{\hat p - p}{\sqrt{p(1-p)/n}} \sim N(0,~1)$$
655
-
- therefore, we will flip a coin $n$ times, take the sample proportion of heads (successes with probability $p$), subtract off 0.5 (ideal sample proportion) and multiply the result by divide by $\frac{1}{2 \sqrt{n}}$ and compare it to the standard normal
655
+
- therefore, we will flip a coin $n$ times, take the sample proportion of heads (successes with probability $p$), subtract off 0.5 (ideal sample proportion) and multiply the result by $\frac{1}{2 \sqrt{n}}$ and compare it to the standard normal
***95% confidence interval for the population mean $\mu$** is defined as $$\bar X \pm 2\sigma/\sqrt{n}$$ for the sample mean $\bar X \sim N(\mu, \sigma^2/n)$
712
712
* you can choose to use 1.96 to be more accurate for the confidence interval
* **interpretation**: if we were to repeated samples of size $n$ from the population and construct this confidence interval for each case, approximately 95% of the intervals will contain $\mu$
714
+
* **interpretation**: if we were to repeatedly draw samples of size $n$ from the population and construct this confidence interval for each case, approximately 95% of the intervals will contain $\mu$
715
715
* confidence intervals get **narrower** with less variability or
716
716
larger sample sizes
717
717
****Note**: Poisson and binomial distributions have exact intervals that don't require CLT *
0 commit comments