This is where things get quite complicated. More complicated that anything we have dealt with thus far. Read on if you dare, for ahead lays the dark and dangerous world of calculus and real analysis. Even worse, there are no pictures! You have been warned...
We will be attempting to find a closed form for \[ \mathbb{P}(\text{Falling in} | p) = \sum_{n=0}^{\infty} \frac{2n!}{n!(n+1)!}\cdot p\big(p(1-p)\big)^n \] And then we will plug in \(p=\frac{1}{3}\) into the equation in order to find the probability of falling in with the problem statement we were given. First, let's play around with this series a bit, just to get a feel for it. We can show that the series converges using the ratio test:
\(\mathbb{P}(\text{Falling in} | p)\) converges for \(p \in [0,1]\)
We can show that the series converges using the ratio test:
\begin{align*}
\lim\limits_{n\rightarrow \infty} \left|\frac{F_{n+1}}{F_n} \right|&= \lim\limits_{n\rightarrow \infty}\left|\frac{\frac{\left(2(n+1)\right)!}{(n+1)!(n+2)!}\cdot p\big(p(1-p)\big)^{n+1}}{\frac{2n!}{n!(n+1)!}\cdot p\big(p(1-p)\big)^n} \right|\\
&= \lim\limits_{n\rightarrow \infty}\left|\frac{\big(2(n+1)\big)!}{(n+2)!}\cdot \frac{n!}{2n!}\cdot \big(p(1-p)\big)\right| \\
&= \lim\limits_{n\rightarrow \infty}\left|\frac{(2n+2)(2n+1)(2n)!}{(n+2)(n+1)n!}\cdot \frac{n!}{2n!}\cdot \big(p(1-p)\big) \right|\\
&= \lim\limits_{n\rightarrow \infty}\left|\frac{(2n+2)(2n+1)}{(n+2)(n+1)}\cdot \big(p(1-p)\big) \right|\\
&= \lim\limits_{n\rightarrow \infty}\left|\frac{2(2n+1)}{(n+2)}\cdot \big(p(1-p)\big) \right|\\
&= \lim\limits_{n\rightarrow \infty}\left|\frac{4+\frac{2}{n}}{1+\frac{2}{n}}\cdot \big(p(1-p)\big) \right|\\
&= \left|4p(1-p) \right|\\
\end{align*}
Now, the ratio test states that the series converges if \( \lim\limits_{n\rightarrow \infty} \left|\frac{F_{n+1}}{F_n}\right|\lt 1\). We can note quite clearly that for \(p=\frac{1}{3}\), \(\left|4\cdot\frac{1}{3}\left(1-\frac{1}{3}\right)\right|=\frac{4}{3}\cdot\frac{2}{3}=\frac{6}{9}\lt 1\), and thus at least in the base case we were given we know the series converges.
But since we strive for greatness, we seek convergence in the general case as well. First note that \(\left|4p(1-p)\right|\) is positive for \(1\lt p \lt 1\), and zero if \(p=0\) or \(p=1\). Therefore in the values that we care about, \(\left|4p(1-p)\right|=4p(1-p)\). Next we will find the maximum of \(4p(1-p)\) in the range of \(0\leq p \leq 1\). To do this, we will first find the critical points of this function's first derivative:
\begin{align*}
\frac{d}{dp} \left[4p(1-p)\right] &= 0 \\
\frac{d}{dp} \left[-4p^2 +4p\right] &= 0 \\
-2p +4 &= 0 \\
p = \frac{1}{2}
\end{align*}
Therefore, there is a critical point at \(p=\frac{1}{2}\). Plugging this value into the original function, we get \(4p(1-p)=4\frac{1}{2}\left(1-\frac{1}{2}\right)=1\). Thus the function has a maximum of 1, at \(p=\frac{1}{2}\). From our earlier work, this means that \(\mathbb{P}(\text{Falling in} | p)\) converges for \(p\neq \frac{1}{2}\). For \(p = \frac{1}{2}\) the ratio test is inconclusive, so we will need to use other methods to see if the series converges at \(p = \frac{1}{2}\).
\begin{align*}
\mathbb{P}\left(\text{Falling in} | p=\frac{1}{2}\right) &= \sum_{n=0}^{\infty} \frac{2n!}{n!(n+1)!}\cdot \left(\frac{1}{2}\right)\left(\left(\frac{1}{2}\right)\left(1-\left(\frac{1}{2}\right)\right)\right)^n \\
&= \sum_{n=0}^{\infty} \frac{1}{2}\cdot \frac{2n!}{n!(n+1)!}\cdot \left(\frac{1}{4}\right)^n \\
\end{align*}
From this point, we will use Raabe's Test to prove that the above series converges. Raabe's Tests seeks to find
\[
\rho = \lim\limits_{n\rightarrow \infty} n\left(\frac{a_n}{a_{n+1}}-1\right)
\]
where \(a_n\) is the sequence. Plugging in the value from our series,
\begin{align*}
\rho &= \lim\limits_{n\rightarrow \infty} n\left(\frac{\frac{1}{2}\cdot \frac{2n!}{n!(n+1)!}\cdot \left(\frac{1}{4}\right)^n}{\frac{1}{2}\cdot \frac{2(n+1)!}{(n+1)!(n+2)!}\cdot \left(\frac{1}{4}\right)^{n+1}}-1\right)\\
&= \lim\limits_{n\rightarrow \infty} n\left(\frac{ \frac{2n!}{n!} }{ \frac{2(n+1)!}{(n+2)!}\cdot \left(\frac{1}{4}\right)}-1\right)\\
&= \lim\limits_{n\rightarrow \infty} n\left(4\frac{(2n)!}{(2n+2)!}\cdot\frac{(n+2)!}{n!}-1\right)\\
&= \lim\limits_{n\rightarrow \infty} n\left(4\frac{(n+2)(n+1)}{(2n+2)(2n+1)}-1\right)\\
&= \lim\limits_{n\rightarrow \infty} n\left(2\frac{n+2}{2n+1}-1\right)\\
&= \lim\limits_{n\rightarrow \infty} \frac{(2n^2+4n) - (2n^2+n)}{2n+1}\\
&= \lim\limits_{n\rightarrow \infty} \frac{3n}{2n+1}\\
&= \frac{3}{2}\\
\end{align*}
Raabe's Test states that the series converges if \(\rho>1\), and since \(\frac{3}{2}\gt 1\), our series must converge as well. Therefore, our series converges for all values of \(0\leq p \leq 1\).
For an arbitrary probability, \(p:\;0\leq p \leq 1\), of stepping towards the pool, the total probability of falling in can be expressed as
\[
\boxed{
\mathbb{P}(\mathrm{falling\; in} | p) =
\left\{
\begin{matrix}
\frac{p}{1-p}, & p \lt \frac{1}{2}\\
1, & p \geq \frac{1}{2}
\end{matrix}
\right.
}
\]
To show this, we will first need to prove some (seemingly) unrelated lemmas.
Now, we are prepared to complete our proof. Original credits for the method of solution to Leibovici (2020) and Wikipedia contributors (2019b). We will define a new function as follows: \begin{align*} \text{Let } \mathbb{P}(\mathrm{falling\; in } | p) &= \sum_{n=0}^{\infty}\frac{(2n)!}{n!(n+1)!} \cdot p\big(p(1-p)\big)^n \\ &= \sum_{n=0}^{\infty} \binom{2n}{n} \cdot \frac{p\big(p(1-p)\big)^n}{n+1} \\ &= p\cdot\left(\sum_{n=0}^{\infty} \binom{2n}{n} \cdot \frac{\big(p(1-p)\big)^n}{n+1} \right)\\ &= p\cdot T(x)\\ \text{where } T(x) &= \sum_{n=0}^{\infty} \binom{2n}{n} \cdot \frac{x^{n}}{n+1}\,\notag\\ \text{and } x &= p(1-p)\\ \end{align*} Now, recall that in Lemma 5, we showed that \begin{align*} \frac{1}{\sqrt{ 1 - 4x }} &= \sum_{n=0}^{\infty} \binom{2n}{n} x^n \;,\\ \text{and we have defined } T(x) &= \sum_{n=0}^{\infty} \binom{2n}{n} \cdot \frac{x^{n+1}}{n+1}\;. \end{align*} It's so close!!! In a moment of inspiration, we can recognize that if we take the derivative of \(T(x)\) with respect to \(x\), we will have the equation of our binomial expansion! This means \[ \frac{d}{dx}T(x) = \frac{d}{dx} \sum_{n=0}^{\infty} \binom{2n}{n} \cdot \frac{x^{n+1}}{n+1} \;. \] Assuming \(T(x)\) is uniformly convergent, we can interchange the differentiation and summation to get \begin{align*} T'(x) &= \sum_{n=0}^{\infty} \frac{d}{dx}\binom{2n}{n} \cdot \frac{x^{n+1}}{n+1} \\ &= \sum_{n=0}^{\infty} \binom{2n}{n} \cdot \frac{\frac{d}{dx}x^{n+1}}{n+1} \\ &= \sum_{n=0}^{\infty} \binom{2n}{n} \cdot \frac{(n+1)x^{n}}{n+1} \\ &= \sum_{n=0}^{\infty} \binom{2n}{n} \cdot x^n\;.\\ \text{Thus, from Lemma 5, } T'(x) &= \frac{1}{\sqrt{ 1 - 4x }} \\ \end{align*} and so we have a closed form expression! Now, we just need to get back to \(T(x)\), and plug in our new closed from expression into the total probability of falling in. We can accomplish this by integrating both sides of \(T(x)\). We will choose to use the definite integration form (\(\int_{0}^{x}f(t)dt\)) to solve for the constant of integration. Then, \begin{align*} \int_{0}^{x}T'(t)dt &= \int_{0}^{x}\frac{1}{\sqrt{ 1 - 4t }} dt\;,\\ T(x) - T(0) &= \frac{1}{2}-\frac{1}{2}\sqrt{1-4x}\;.\\ \text{Since \(T(0)=0\), } T(x) &= \frac{1-\sqrt{1-4x}}{2}. \end{align*} And therefore, plugging in the closed form expression of \(T(x)\) to the probability of falling in, we get, \[ \mathbb{P}(\mathrm{falling\; in } | p) = p\cdot \left( \frac{1-\sqrt{1-4x}}{2x} \right)\;. \] Plugging in \(x=p(1-p)\) and simplifying the terms under the square root we find that \begin{align*} \mathbb{P}(\text{falling in } | p) &= \frac{1-\sqrt{1-4p(1-p)}}{2(1-p)} .\\ &= \frac{1-\sqrt{4p^2-4p+1}}{2(1-p)} . \end{align*} Now this is where things get a little weird. With the term under the square root, we could factor out a factor of 4 (which is \(2^2\)) from every term to get \(2^2(p^2-p+\frac{1}{4})\). Now, this gives us a quadratic expression which happens to be a perfect square, such that we can rewrite that expression as \(2^2(p-\frac{1}{2})^2= (2(p-\frac{1}{2}))^2\). And now for the weirdness. First, we need to recognize that \((p-\frac{1}{2})^2 = (\frac{1}{2}-p)^2\). The reason that this matters is that we exist in the domain of probability, so we require that all of our values exist exclusively between 0 and 1. Consider that with \((p-\frac{1}{2})^2\) if \(p\lt\frac{1}{2}\), this value would be negative and with \((\frac{1}{2}-p)^2\) if \(p>\frac{1}{2}\), it will also be negative. Both cases are problematic, but we can get around this in the short term by introducing absolute values to the squared term. Bringing these thoughts together, we can again simplify \(f(p)\) as follows: \begin{align*} \mathbb{P}(\text{falling in } | p) &= \frac{1-\sqrt{4p^2-4p+1}}{2(1-p)} \\ &= \frac{1-\sqrt{(|2p-1|)^2}}{2(1-p)} \\ &= \frac{1-|2p-1|}{2(1-p)} \\ \end{align*} and now the absolute value signs become a hindrance... *sigh* Worth a shot.
Let's now go ahead and make this function piecewise where each piece only considers the values of \(2p-1\) or \(1-2p\) that are valid for their respective expression. This gives us \begin{align*} \mathbb{P}(\text{falling in } | p) &= \left\{ \begin{matrix} \frac{1-(1-2p)}{2(1-p)} & \ni p \lt \frac{1}{2}\\ \frac{1-(2p-1)}{2(1-p)} & \ni p \geq \frac{1}{2} \end{matrix} \right.\\ \text{First lets simplify the bottom expression: } \mathbb{P}(\text{falling in } | p) &= \left\{ \begin{matrix} \frac{1-(1-2p)}{2(1-p)} & \ni p \lt \frac{1}{2}\\ \frac{1-2p+1)}{2(1-p)} & \ni p \geq \frac{1}{2} \end{matrix} \right.\\ \mathbb{P}(\text{falling in } | p) &= \left\{ \begin{matrix} \frac{1-(1-2p)}{2(1-p)} & \ni p \lt \frac{1}{2}\\ \frac{2-2p)}{2(1-p)} & \ni p \geq \frac{1}{2} \end{matrix} \right.\\ \mathbb{P}(\text{falling in } | p) &= \left\{ \begin{matrix} \frac{1-(1-2p)}{2(1-p)} & \ni p \lt \frac{1}{2}\\ 1 & \ni p \geq \frac{1}{2} \end{matrix} \right. \end{align*} Now lets ask briefly, 'does this actually make sense?' In this case it does. If the robot was as likely, or more likely to step towards the pool than she was to step away than it certainly makes sense that they are certain (100% likely) to fall into the pool. Now to simplify the top expression: \begin{align*} \mathbb{P}(\text{falling in } | p) &= \left\{ \begin{matrix} \frac{1-1+2p}{2(1-p)} & \ni p \lt \frac{1}{2}\\ 1 & \ni p \geq \frac{1}{2} \end{matrix} \right.\\ \mathbb{P}(\text{falling in } | p) &= \left\{ \begin{matrix} \frac{2p}{2(1-p)} & \ni p \lt \frac{1}{2}\\ 1 & \ni p \geq \frac{1}{2} \end{matrix} \right.\\ \text{And so we have found that } \mathbb{P}(\text{falling in } | p) &= \left\{ \begin{matrix} \frac{p}{1-p} & \ni p \lt \frac{1}{2}\\ 1 & \ni p \geq \frac{1}{2} \end{matrix} \right. . \end{align*}
For \(n \in \mathbb{N}\),
\[
\binom{2n}{n} = (-1)^n \cdot 2^{2n} \cdot \binom{-1/2}{n}\,.
\]
Credit for this proof goes to Nicolas (2015).
First, we shall note the definition of the binomial coefficient and simplify terms:
\begin{align*}
\binom{-1/2}{n} &= \frac{1}{n!}\left(-\frac{1}{2}\right)\left(-\frac{3}{2}\right)\dots\left(-\frac{2n-1}{2}\right) \\
&= \frac{(-1)^n}{n!}\left(\frac{1}{2}\right)\left(\frac{3}{2}\right)\dots\left(\frac{2n-1}{2}\right) \\
&= \frac{(-1)^n}{n!}\left(\frac{1}{2^n}\right)(1)(3)\dots(2n-1)
\end{align*}
Next, we multiply the numerator and denominator by \((2)(4)\dots (2n)=2^n\cdot n!\), to get
\begin{align*}
\binom{-1/2}{n} &= \frac{(-1)^n}{n!}\left(\frac{1}{2^n}\right)\left(\frac{1}{2^n\cdot n!}\right)(1)(2)(3)(4)\dots(2n-1)(2n)\\
&= \frac{(-1)^n}{n!}\left(\frac{1}{2^n}\right)\left(\frac{1}{2^n\cdot n!}\right)(2n)!\\
&= (-1)^n\left(\frac{1}{2^n}\right)\left(\frac{1}{2^n}\right)\frac{(2n)!}{n!\cdot n!}\\
&= (-1)^n\left(\frac{1}{2^{2n}}\right)\frac{(2n)!}{n!\cdot n!}\\
&= (-1)^n\left(\frac{1}{2^{2n}}\right)\binom{2n}{n}\\
\end{align*}
Solving for \(2n\) choose \(n\) we find
\[
\binom{2n}{n} = (-1)^{n}\cdot 2^{2n}\cdot\binom{-1/2}{n}
\]
For \(x \in \mathbb{R} : x\lt-\frac{1}{4}\),
\begin{equation}
\frac{1}{\sqrt{ 1 - 4x }} = \sum_{n=0}^{\infty} \binom{2n}{n} x^n
\end{equation}
First we recall the definition of the binomial series expression \autocite{wiki:binomial},
\begin{equation}
(1+x)^{n} = \sum_{k=0}^{\infty} \binom{n}{k} x^k
\end{equation}
Now, consider the left side of the first equation above, which could be rewritten as \((1-4x)^{-1/2}\). By applying the binomial expansion, we find that
\begin{align*}
(1-4x)^{-1/2} &= \sum_{n=0}^{\infty} \binom{-\frac{1}{2}}{n} (-4x)^n \;,
&= \sum_{n=0}^{\infty} \binom{-\frac{1}{2}}{n}(-1)^n \cdot 2^{2n} \cdot x^n \,.
\end{align*}
From Lemma 4, we can rewrite \(\binom{-\frac{1}{2}}{n}(-1)^n \cdot 2^{2n}\) as \(\binom{2n}{n}\) to simplify the equation to its final form of
\[
(1-4x)^{-1/2} = \sum_{n=0}^{\infty} \binom{2n}{n} x^n
\]
Now, we are prepared to complete our proof. Original credits for the method of solution to Leibovici (2020) and Wikipedia contributors (2019b). We will define a new function as follows: \begin{align*} \text{Let } \mathbb{P}(\mathrm{falling\; in } | p) &= \sum_{n=0}^{\infty}\frac{(2n)!}{n!(n+1)!} \cdot p\big(p(1-p)\big)^n \\ &= \sum_{n=0}^{\infty} \binom{2n}{n} \cdot \frac{p\big(p(1-p)\big)^n}{n+1} \\ &= p\cdot\left(\sum_{n=0}^{\infty} \binom{2n}{n} \cdot \frac{\big(p(1-p)\big)^n}{n+1} \right)\\ &= p\cdot T(x)\\ \text{where } T(x) &= \sum_{n=0}^{\infty} \binom{2n}{n} \cdot \frac{x^{n}}{n+1}\,\notag\\ \text{and } x &= p(1-p)\\ \end{align*} Now, recall that in Lemma 5, we showed that \begin{align*} \frac{1}{\sqrt{ 1 - 4x }} &= \sum_{n=0}^{\infty} \binom{2n}{n} x^n \;,\\ \text{and we have defined } T(x) &= \sum_{n=0}^{\infty} \binom{2n}{n} \cdot \frac{x^{n+1}}{n+1}\;. \end{align*} It's so close!!! In a moment of inspiration, we can recognize that if we take the derivative of \(T(x)\) with respect to \(x\), we will have the equation of our binomial expansion! This means \[ \frac{d}{dx}T(x) = \frac{d}{dx} \sum_{n=0}^{\infty} \binom{2n}{n} \cdot \frac{x^{n+1}}{n+1} \;. \] Assuming \(T(x)\) is uniformly convergent, we can interchange the differentiation and summation to get \begin{align*} T'(x) &= \sum_{n=0}^{\infty} \frac{d}{dx}\binom{2n}{n} \cdot \frac{x^{n+1}}{n+1} \\ &= \sum_{n=0}^{\infty} \binom{2n}{n} \cdot \frac{\frac{d}{dx}x^{n+1}}{n+1} \\ &= \sum_{n=0}^{\infty} \binom{2n}{n} \cdot \frac{(n+1)x^{n}}{n+1} \\ &= \sum_{n=0}^{\infty} \binom{2n}{n} \cdot x^n\;.\\ \text{Thus, from Lemma 5, } T'(x) &= \frac{1}{\sqrt{ 1 - 4x }} \\ \end{align*} and so we have a closed form expression! Now, we just need to get back to \(T(x)\), and plug in our new closed from expression into the total probability of falling in. We can accomplish this by integrating both sides of \(T(x)\). We will choose to use the definite integration form (\(\int_{0}^{x}f(t)dt\)) to solve for the constant of integration. Then, \begin{align*} \int_{0}^{x}T'(t)dt &= \int_{0}^{x}\frac{1}{\sqrt{ 1 - 4t }} dt\;,\\ T(x) - T(0) &= \frac{1}{2}-\frac{1}{2}\sqrt{1-4x}\;.\\ \text{Since \(T(0)=0\), } T(x) &= \frac{1-\sqrt{1-4x}}{2}. \end{align*} And therefore, plugging in the closed form expression of \(T(x)\) to the probability of falling in, we get, \[ \mathbb{P}(\mathrm{falling\; in } | p) = p\cdot \left( \frac{1-\sqrt{1-4x}}{2x} \right)\;. \] Plugging in \(x=p(1-p)\) and simplifying the terms under the square root we find that \begin{align*} \mathbb{P}(\text{falling in } | p) &= \frac{1-\sqrt{1-4p(1-p)}}{2(1-p)} .\\ &= \frac{1-\sqrt{4p^2-4p+1}}{2(1-p)} . \end{align*} Now this is where things get a little weird. With the term under the square root, we could factor out a factor of 4 (which is \(2^2\)) from every term to get \(2^2(p^2-p+\frac{1}{4})\). Now, this gives us a quadratic expression which happens to be a perfect square, such that we can rewrite that expression as \(2^2(p-\frac{1}{2})^2= (2(p-\frac{1}{2}))^2\). And now for the weirdness. First, we need to recognize that \((p-\frac{1}{2})^2 = (\frac{1}{2}-p)^2\). The reason that this matters is that we exist in the domain of probability, so we require that all of our values exist exclusively between 0 and 1. Consider that with \((p-\frac{1}{2})^2\) if \(p\lt\frac{1}{2}\), this value would be negative and with \((\frac{1}{2}-p)^2\) if \(p>\frac{1}{2}\), it will also be negative. Both cases are problematic, but we can get around this in the short term by introducing absolute values to the squared term. Bringing these thoughts together, we can again simplify \(f(p)\) as follows: \begin{align*} \mathbb{P}(\text{falling in } | p) &= \frac{1-\sqrt{4p^2-4p+1}}{2(1-p)} \\ &= \frac{1-\sqrt{(|2p-1|)^2}}{2(1-p)} \\ &= \frac{1-|2p-1|}{2(1-p)} \\ \end{align*} and now the absolute value signs become a hindrance... *sigh* Worth a shot.
Let's now go ahead and make this function piecewise where each piece only considers the values of \(2p-1\) or \(1-2p\) that are valid for their respective expression. This gives us \begin{align*} \mathbb{P}(\text{falling in } | p) &= \left\{ \begin{matrix} \frac{1-(1-2p)}{2(1-p)} & \ni p \lt \frac{1}{2}\\ \frac{1-(2p-1)}{2(1-p)} & \ni p \geq \frac{1}{2} \end{matrix} \right.\\ \text{First lets simplify the bottom expression: } \mathbb{P}(\text{falling in } | p) &= \left\{ \begin{matrix} \frac{1-(1-2p)}{2(1-p)} & \ni p \lt \frac{1}{2}\\ \frac{1-2p+1)}{2(1-p)} & \ni p \geq \frac{1}{2} \end{matrix} \right.\\ \mathbb{P}(\text{falling in } | p) &= \left\{ \begin{matrix} \frac{1-(1-2p)}{2(1-p)} & \ni p \lt \frac{1}{2}\\ \frac{2-2p)}{2(1-p)} & \ni p \geq \frac{1}{2} \end{matrix} \right.\\ \mathbb{P}(\text{falling in } | p) &= \left\{ \begin{matrix} \frac{1-(1-2p)}{2(1-p)} & \ni p \lt \frac{1}{2}\\ 1 & \ni p \geq \frac{1}{2} \end{matrix} \right. \end{align*} Now lets ask briefly, 'does this actually make sense?' In this case it does. If the robot was as likely, or more likely to step towards the pool than she was to step away than it certainly makes sense that they are certain (100% likely) to fall into the pool. Now to simplify the top expression: \begin{align*} \mathbb{P}(\text{falling in } | p) &= \left\{ \begin{matrix} \frac{1-1+2p}{2(1-p)} & \ni p \lt \frac{1}{2}\\ 1 & \ni p \geq \frac{1}{2} \end{matrix} \right.\\ \mathbb{P}(\text{falling in } | p) &= \left\{ \begin{matrix} \frac{2p}{2(1-p)} & \ni p \lt \frac{1}{2}\\ 1 & \ni p \geq \frac{1}{2} \end{matrix} \right.\\ \text{And so we have found that } \mathbb{P}(\text{falling in } | p) &= \left\{ \begin{matrix} \frac{p}{1-p} & \ni p \lt \frac{1}{2}\\ 1 & \ni p \geq \frac{1}{2} \end{matrix} \right. . \end{align*}