summaryrefslogtreecommitdiff
path: root/source/know/concept/binomial-distribution
diff options
context:
space:
mode:
authorPrefetch2022-10-27 20:40:09 +0200
committerPrefetch2022-10-27 20:40:09 +0200
commit6e70f28ccbd5afc1506f71f013278a9d157ef03a (patch)
treea8ca7113917f3e0040d6e5b446e4e41291fd9d3a /source/know/concept/binomial-distribution
parentbcae81336764eb6c4cdf0f91e2fe632b625dd8b2 (diff)
Optimize last images, add proof template, improve CSS
Diffstat (limited to 'source/know/concept/binomial-distribution')
-rw-r--r--source/know/concept/binomial-distribution/index.md33
1 files changed, 11 insertions, 22 deletions
diff --git a/source/know/concept/binomial-distribution/index.md b/source/know/concept/binomial-distribution/index.md
index 1193a93..dc75221 100644
--- a/source/know/concept/binomial-distribution/index.md
+++ b/source/know/concept/binomial-distribution/index.md
@@ -44,11 +44,8 @@ $$\begin{aligned}
}
\end{aligned}$$
-<div class="accordion">
-<input type="checkbox" id="proof-mean"/>
-<label for="proof-mean">Proof</label>
-<div class="hidden" markdown="1">
-<label for="proof-mean">Proof.</label>
+
+{% include proof/start.html id="proof-mean" -%}
The trick is to treat $$p$$ and $$q$$ as independent until the last moment:
$$\begin{aligned}
@@ -62,8 +59,8 @@ $$\begin{aligned}
\end{aligned}$$
Inserting $$q = 1 - p$$ then gives the desired result.
-</div>
-</div>
+{% include proof/end.html id="proof-mean" %}
+
Meanwhile, we find the following variance $$\sigma^2$$,
with $$\sigma$$ being the standard deviation:
@@ -74,12 +71,8 @@ $$\begin{aligned}
}
\end{aligned}$$
-<div class="accordion">
-<input type="checkbox" id="proof-var"/>
-<label for="proof-var">Proof</label>
-<div class="hidden" markdown="1">
-<label for="proof-var">Proof.</label>
-We use the same trick to calculate $$\overline{n^2}$$
+
+{% include proof/start.html id="proof-var" -%}
(the mean squared number of successes):
$$\begin{aligned}
@@ -106,8 +99,8 @@ $$\begin{aligned}
\end{aligned}$$
By inserting $$q = 1 - p$$, we arrive at the desired expression.
-</div>
-</div>
+{% include proof/end.html id="proof-var" %}
+
As $$N \to \infty$$, the binomial distribution
turns into the continuous normal distribution,
@@ -119,11 +112,8 @@ $$\begin{aligned}
}
\end{aligned}$$
-<div class="accordion">
-<input type="checkbox" id="proof-normal"/>
-<label for="proof-normal">Proof</label>
-<div class="hidden" markdown="1">
-<label for="proof-normal">Proof.</label>
+
+{% include proof/start.html id="proof-normal" -%}
We take the Taylor expansion of $$\ln\!\big(P_N(n)\big)$$
around the mean $$\mu = Np$$:
@@ -211,8 +201,7 @@ $$\begin{aligned}
\end{aligned}$$
Taking $$\exp$$ of this expression then yields a normalized Gaussian distribution.
-</div>
-</div>
+{% include proof/end.html id="proof-normal" %}
## References