The random variable \(X\) has a binomial distribution with parameters \(n\) and \(p\), where \(n=16\) and
\(p=\frac12\). Show, using an approximation in terms of the standard normal
density function $\displaystyle
\tfrac{1}{\sqrt{2\pi}} \, \e ^{-\frac12 x^2}
$, that \[
\P(X=8) \approx \frac 1{2\sqrt{2\pi}}
\,.
\]
By considering a binomial distribution with parameters \(2n\) and \(\frac12\), show that
\[
(2n)! \approx \frac {2^{2n} (n!)^2}{\sqrt{n\pi}} \,.
\]
By considering a Poisson distribution with parameter \(n\), show that
\[
n! \approx \sqrt{2\pi n\, } \, \e^{-n} \, n^n \,.
\]
Each day, I have to take \(k\) different types of medicine, one tablet of each. The tablets are identical in appearance. When I go on holiday for \(n\) days, I put \(n\) tablets of each type in a container and on each day of the holiday I select \(k\) tablets at random from the container.
In the case \(k=3\), show that the probability that I will select one tablet of each type on the first day of a three-day holiday is \(\frac9{28}\). Write down the probability that I will be left with one tablet of each type on the last day (irrespective of the tablets I select on the first day).
In the case \(k=3\), find the probability that I will select one tablet of each type on the first day of an \(n\)-day holiday.
In the case \(k=2\), find the probability that I will select one tablet of each type on each day of an \(n\)-day holiday, and use Stirling's approximation
\[
n!\approx \sqrt{2n\pi} \left(\frac n\e\right)^n
\]
to show that this probability is approximately \(2^{-n} \sqrt{n\pi\;}\).
Solution:
The probability the first is different to the second is \(\frac68\), the probability the third is different to both of the first two is \(\frac37\) therefore the probability is \(\frac{6}{8} \cdot \frac37 = \frac9{28}\)
Whatever pills we are left with on the last day is essentially the same random choice as we make on the first day, therefore \(\frac9{28}\)
The probability the first is different to the second is \(\frac{2n}{3n-1}\), the probability the third is different to both of the first two is \(\frac{n}{3n-2}\) therefore the probability is \(\frac{2n^2}{(3n-1)(3n-2)}\).
[We can also view this as \(\frac{(3n) \cdot (2n) \cdot n}{(3n) \cdot (3n-1) \cdot (3n-2)}\)]
Suppose describe the pills as \(B\) and \(R\) and also number them, then we must have a sequence of the form:
\[ B_1R_1 \, B_2R_2 \, B_3R_3 \, \cdots \, B_{n}R_n \]
However, we can also rearrange the order of the \(B\) and \(R\) pills in \(n!\) ways each, and also the order of the pairs in \(2^n\) ways. There are \((2n)!\) orders we could have taken the pills out therefore the probability is
\begin{align*}
&& P &= \frac{2^n (n!)^2}{(2n)!} = \frac{2^n}{\binom{2n}{n}} \\
&&&\approx \frac{2^n \cdot 2n \pi \left ( \frac{n}{e} \right)^{2n}}{\sqrt{2 \cdot 2n \cdot \pi} \left ( \frac{2n}{e} \right)^{2n}} \\
&&&= \frac{2^n \sqrt{n \pi} \cdot n^{2n} \cdot e^{-2n}}{2^{2n} \cdot n^{2n} \cdot e^{-2n}} \\
&&&= 2^{-n} \sqrt{n \pi}
\end{align*}
There is a nice way to think about this question using conditional probability. Suppose we are drawing out of an infinitely supply of \(R\) and \(B\) pills, then each day there is a \(\frac12\) chance of getting different pills. Therefore over \(n\) days there is a \(2^{-n}\) chance of getting different pills. Conditional on the balanced total we see that
\begin{align*}
&& \mathbb{P}(\text{balanced every day} |\text{balanced total}) &= \frac{\mathbb{P}(\text{balanced every day})}{\mathbb{P}(\text{balanced total})}
\end{align*}
We have already seen the term that is balanced total is \(\frac{1}{2^{2n}}\binom{2n}{n}\), but we can also approximate the balanced total using a normal approximation. \(B(2n, \tfrac12) \approx N(n, \frac{n}{2})\) and so:
\begin{align*}
\mathbb{P}(X = n) &\approx \mathbb{P}\left (n-0.5 \leq \sqrt{\tfrac{n}{2}} Z + n \leq n+0.5 \right) \\
&= \mathbb{P}\left (- \frac1{\sqrt{2n}} \leq Z \leq \frac{1}{\sqrt{2n}} \right) \\
&= \int_{- \frac1{\sqrt{2n}}}^{\frac1{\sqrt{2n}}} \frac{1}{\sqrt{2\pi}} e^{-x^2/2} \d x \approx \frac{2}{\sqrt{2n}} \frac{1}{\sqrt{2\pi}} \\
&\approx \frac{1}{\sqrt{n\pi}}
\end{align*}
Let \(x=10^{100}\), \(y=10^{x}\), \(z=10^{y}\),
and let
$$
a_1=x!, \quad a_2=x^y,\quad a_3=y^x,\quad a_4=z^x,\quad
a_5=\e^{xyz},\quad a_6=z^{1/y},\quad a_7 = y^{z/x}.
$$
Use Stirling's approximation
\(n! \approx \sqrt{2 \pi}\, {n^{n+{1\over2}}\e^{-n}}\), which is valid for
large \(n\), to show that
\(\log_{10}\left(\log_{10} a_1 \right) \approx 102\).
Arrange the seven numbers \(a_1\), \(\ldots\) , \(a_7\) in ascending
order of magnitude, justifying your result.