diff options
author | Prefetch | 2021-06-02 13:28:53 +0200 |
---|---|---|
committer | Prefetch | 2021-06-02 13:28:53 +0200 |
commit | cc295b5da8e3db4417523a507caf106d5839d989 (patch) | |
tree | d86d4898ac3fddceecff67dff047a3aa4aef784b /content/know/concept/binomial-distribution | |
parent | aab299218975a8e775cda26ce256ffb1fe36c863 (diff) |
Introduce collapsible proofs to some articles
Diffstat (limited to 'content/know/concept/binomial-distribution')
-rw-r--r-- | content/know/concept/binomial-distribution/index.pdc | 72 |
1 files changed, 49 insertions, 23 deletions
diff --git a/content/know/concept/binomial-distribution/index.pdc b/content/know/concept/binomial-distribution/index.pdc index 70cc897..e644164 100644 --- a/content/know/concept/binomial-distribution/index.pdc +++ b/content/know/concept/binomial-distribution/index.pdc @@ -22,7 +22,7 @@ that $n$ out of the $N$ trials succeed: $$\begin{aligned} \boxed{ - P_N(n) = \binom{N}{n} \: p^n (1 - p)^{N - n} + P_N(n) = \binom{N}{n} \: p^n q^{N - n} } \end{aligned}$$ @@ -41,8 +41,20 @@ $$\begin{aligned} The remaining factor $p^n (1 - p)^{N - n}$ is then just the probability of attaining each microstate. -To find the mean number of successes $\mu$, -the trick is to treat $p$ and $q$ as independent: +The expected or mean number of successes $\mu$ after $N$ trials is as follows: + +$$\begin{aligned} + \boxed{ + \mu = N p + } +\end{aligned}$$ + +<div class="accordion"> +<input type="checkbox" id="proof-mean"/> +<label for="proof-mean">Proof</label> +<div class="hidden"> +<label for="proof-mean">Proof.</label> +The trick is to treat $p$ and $q$ as independent until the last moment: $$\begin{aligned} \mu @@ -54,16 +66,26 @@ $$\begin{aligned} = N p (p + q)^{N - 1} \end{aligned}$$ -By inserting $q = 1 - p$, we find the following expression for the mean: +Inserting $q = 1 - p$ then gives the desired result. +</div> +</div> + +Meanwhile, we find the following variance $\sigma^2$, +with $\sigma$ being the standard deviation: $$\begin{aligned} \boxed{ - \mu = N p + \sigma^2 = N p q } \end{aligned}$$ -Next, we use the same trick to calculate $\overline{n^2}$ -(the mean of the squared number of successes): +<div class="accordion"> +<input type="checkbox" id="proof-var"/> +<label for="proof-var">Proof</label> +<div class="hidden"> +<label for="proof-var">Proof.</label> +We use the same trick to calculate $\overline{n^2}$ +(the mean squared number of successes): $$\begin{aligned} \overline{n^2} @@ -79,7 +101,7 @@ $$\begin{aligned} &= N p + N^2 p^2 - N p^2 \end{aligned}$$ -Using this and the earlier expression for $\mu$, we find the variance $\sigma^2$: +Using this and the earlier expression $\mu = N p$, we find the variance $\sigma^2$: $$\begin{aligned} \sigma^2 @@ -88,18 +110,26 @@ $$\begin{aligned} = N p (1 - p) \end{aligned}$$ -Once again, by inserting $q = 1 - p$, we find the following expression for the variance: +By inserting $q = 1 - p$, we arrive at the desired expression. +</div> +</div> + +As $N \to \infty$, the binomial distribution +turns into the continuous normal distribution: $$\begin{aligned} \boxed{ - \sigma^2 = N p q + \lim_{N \to \infty} P_N(n) = \frac{1}{\sqrt{2 \pi \sigma^2}} \exp\!\Big(\!-\!\frac{(n - \mu)^2}{2 \sigma^2} \Big) } \end{aligned}$$ -As $N$ grows to infinity, the binomial distribution -turns into the continuous normal distribution. -We demonstrate this by taking the Taylor expansion of its -natural logarithm $\ln\!\big(P_N(n)\big)$ around the mean $\mu = Np$: +<div class="accordion"> +<input type="checkbox" id="proof-normal"/> +<label for="proof-normal">Proof</label> +<div class="hidden"> +<label for="proof-normal">Proof.</label> +We take the Taylor expansion of $\ln\!\big(P_N(n)\big)$ +around the mean $\mu = Np$: $$\begin{aligned} \ln\!\big(P_N(n)\big) @@ -108,7 +138,7 @@ $$\begin{aligned} D_m(n) = \dv[m]{\ln\!\big(P_N(n)\big)}{n} \end{aligned}$$ -We use Stirling's approximation to calculate all these factorials: +We use Stirling's approximation to calculate the factorials in $D_m$: $$\begin{aligned} \ln\!\big(P_N(n)\big) @@ -163,7 +193,7 @@ $$\begin{aligned} = - \frac{1}{\sigma^2} \end{aligned}$$ -The higher-order derivatives tend to zero for large $N$, so we discard them: +The higher-order derivatives tend to zero for $N \to \infty$, so we discard them: $$\begin{aligned} D_3(n) @@ -184,13 +214,9 @@ $$\begin{aligned} = \ln\!\Big( \frac{1}{\sqrt{2\pi \sigma^2}} \Big) - \frac{(n - \mu)^2}{2 \sigma^2} \end{aligned}$$ -Thus, as $N$ goes to infinity, the binomial distribution becomes a Gaussian: - -$$\begin{aligned} - \boxed{ - \lim_{N \to \infty} P_N(n) = \frac{1}{\sqrt{2 \pi \sigma^2}} \exp\!\Big(\!-\!\frac{(n - \mu)^2}{2 \sigma^2} \Big) - } -\end{aligned}$$ +Taking $\exp$ of this expression then yields a normalized Gaussian distribution. +</div> +</div> ## References |