Is it true that $\lim_{m\to\infty} \sum_{k=0}^{\frac{m-1}{2}} {m\choose{k}}(a^{k+1}(1-a)^{m-k}+a^k(1-a)^{m-k+1})=\min(a,1-a)$? Calculating a certain limit that depends on two parameter $m$ and $a$, where $m\in \mathbb{N}$ is a odd number and $a\in[0,1]$, I found that the result is given by the following expression:
$$f_m(a):=\sum_{k=0}^{\frac{m-1}{2}} {m\choose{k}}\left(a^{k+1}(1-a)^{m-k}+a^{m-k}(1-a)^{k+1}\right).$$
Being an unpleasant expression and being interested in those values for large values of $m$, I tried to calculate $$\lim_{n\to+\infty} f_{2n+1}(a).$$
However, I failed, so I put that expression in matlab and plot it for different values of $n$. What it comes out is that $f_{2n+1}(a)$ seems to approach $\min(a,1-a)$. 
Does anyone has an idea of why this is the case?
 A: We have $f_{2n+1}(a)=ag_n(1-a)+(1-a)g_n(a)$, where
$$g_n(a)=\sum_{k=0}^{n}\binom{2n+1}{k}a^{2n+1-k}(1-a)^k.$$
Using the "coefficient-of" notation, we deduce
\begin{align}
g_n(a)&=\sum_{k=0}^{n}[x^{2n+1-k}](1-a+ax)^{2n+1}
\\&=[x^{2n+1}]\sum_{k=0}^{n}x^k(1-a+ax)^{2n+1}
\\&=[x^{2n+1}]\frac{x^{n+1}-1}{x-1}\big(1+a(x-1)\big)^{2n+1}
\\&=[x^{2n+1}]\frac{x^{n+1}-1}{x-1}\left[\big(1+a(x-1)\big)^{2n+1}-1\right]
\\&=[x^{2n+1}](x^{n+1}-1)\sum_{k=0}^{2n}\binom{2n+1}{k}a^{2n+1-k}(x-1)^{2n-k}
\\&=\sum_{k=0}^{\color{red}{n}}\binom{2n+1}{k}a^{2n+1-k}[x^n](x-1)^{2n-k}
\\&=\sum_{k=0}^{n}(-1)^{n-k}\binom{2n+1}{k}\binom{2n-k}{n}a^{2n+1-k}
\\&=(2n+1)\binom{2n}{n}\sum_{k=0}^{n}(-1)^{n-k}\binom{n}{k}\frac{a^{2n+1-k}}{2n+1-k}
\\&=\color{blue}{(2n+1)\binom{2n}{n}\int_0^ax^n(1-x)^n\,dx}
\end{align}
(we could avoid this derivation just by noting that $g_n(a)$ is $a^{n+1}$ times a polynomial of degree $n$ in $a$, satisfying $g_n(a)+g_n(1-a)=1$, which is unique by Lagrange-Sylvester interpolation, and the final expression also meets these conditions).
Now it is easy to see that $\lim\limits_{n\to\infty}g_n(a)=0$ when $a<1/2$, since then $a(1-a)<1/4$ and $\binom{2n}{n}\leqslant 4^n$. And from $g_n(a)+g_n(1-a)=1$ we finally have
$$\lim_{n\to\infty}g_n(a)=\begin{cases}0,&0\leqslant a<1/2\\1/2,&a=1/2\\1,&1/2<a\leqslant 1\end{cases}$$ which is sufficient.
A: Observe that $f_{2n+1}(a)$ has the following probabilistic interpretation. Consider $2n+1$ coins, each with probability $a$ of landing heads independently of each other, and consider the random variable $X_{2n+1}$ given by the number of coins which land heads. Then
$$
f_{2n+1}(a)=a\cdot \mathbb P(X_{2n+1}\leq n)+(1-a)\cdot \mathbb P(X_{2n+1}\geq n+1).
$$
By the law of large numbers, $X_{2n+1}/(2n+1)$ converges to the deterministic quantity $a$ as $n\to\infty$. Rewriting the probabilities in terms of the ratio we see that
$$
f_{2n+1}(a)=a\cdot \mathbb P\Bigl(\frac{X_{2n+1}}{2n+1}\leq \frac{n}{2n+1}\Bigr)+(1-a)\cdot \mathbb P\Bigl(\frac{X_{2n+1}}{2n+1}\geq  \frac{n+1}{2n+1}\Bigr),
$$
and consequently (when $a\not=\tfrac12$ - see end of the post for why)
$$
\lim_{n\to\infty}f_{2n+1}(a)=a\cdot \mathbb P\Bigl(a\leq \frac12\Bigr)+(1-a)\cdot \mathbb P\Bigl(a\geq \frac12\Bigr)=\min(a,1-a),
$$
since $\mathbb P(a\leq \tfrac12)=1$ if $a\leq \tfrac12$ and $0$ otherwise, and likewise for $\mathbb P(a\geq \tfrac12)$.
Regarding the case $a=\tfrac12$, there is a very simple direct argument and the law of large numbers is not needed, which is fortunate because it just happens that the law of large numbers does not directly apply for technical reasons. The issue is that the mode of convergence used in the law of large numbers is sensitive to boundary effects, and thus when $a=\tfrac12$ it is not true that $\lim_{n\to\infty}\mathbb P\Bigl(\frac{X_{2n+1}}{2n+1}\leq \frac{n}{2n+1}\Bigr)=\mathbb P(a\leq \tfrac 12)$. Fortunately, when $a=\tfrac12$ the coin we are flipping is a fair coin so we have an obvious symmetry in $X_{2n+1}$: the number of heads and the number of tails have the same distribution, and therefore
$$
\mathbb P\Bigl(\frac{X_{2n+1}}{2n+1}\leq \frac{n}{2n+1}\Bigr)=\mathbb P\Bigl(\frac{X_{2n+1}}{2n+1}\geq  \frac{n+1}{2n+1}\Bigr)=\frac12.
$$
So when $a=\tfrac12$, the claimed limiting value actually holds for all $n$, and not only in the limit.
