Shiny dashboard "Statistical foundations of machine learning"

Law of large numbers

Convergence of frequency

The upper figure illustrates the convergence of the frequency (\hat{p}) to the probability $p$.

If the frequency $\hat{p}$ is not near 1 or 0 and then sample size $N$ is sufficiently large then the $1-\alpha$ confidence interval is

$$\hat{p} \pm z_{1-\alpha/2} \sqrt{\frac{\hat{p}(1-\hat{p})}{N}} $$ Green horizonal lines show the confidence interval for $\alpha=0.01$.

Convergence of the difference between number of heads and tails

The lower figure shows that for $p=0.5$ the number of heads does not converge to the number of tails, or equivalently that the difference between those two numbers does not converge to zero.



gbonte/gbcode documentation built on Feb. 27, 2024, 7:38 a.m.