Let $X$ be a random variable that follows the Binomial Distribution $\text{BIN}(n,p)$, where $n$ is a positive integer while $p\in(0,1)$. Its mean is $np$, and standard deviation is $\sqrt{np(1-p)}$. Chebyshev's inequality yields that $$\Pr\left(|X-np| > \sqrt{np(1-p)}\right) \le 1,$$ which is trivial. Hoeffding’s inequality seems not helpful to improve the bound if applied in a direct way.
Questions:
When $p=1/2$, is it possible to prove for all $n\ge 1$ that $$\Pr\left(|X-np| > \sqrt{np(1-p)}\right) \le \frac{1}{2}?$$
What can we say for a general $p\in(0,1)$?
Remarks:
I found a positive answer to Question 1 (presented below; essentially the same as @Mau314's comment). However, it is not completely satisfactory because we have to verify the inequality for small n (at most 25) numerically. I am still looking forward to an answer that is completely analytical.
I am teaching basic probability theory and these questions occur to me when I think about the Central Limit Theorem. When $n\rightarrow \infty$, asymptotically we have $$\Pr\left(|X-np| > \sqrt{np(1-p)}\right) \sim \Pr(|Y| > 1) < \frac{1}{2},$$ where $Y$ is a random variable that follows the Standard Normal Distribution. Hence I raise the questions by curiousity.
Note that my main interest is the non-asymptotic behaviour of the probability because the asymptotic case is characterized by the CLT.
One may attack the problem by directly estimate the cumulative distribution function of Binomial Distributions. To this end, bounds for Binomial Coefficients are likely necessary. Results of such kind can be found in, e.g., [Das], [Stanica], [Spencer, Chapter 5], and Wikipedia. Note that non-asymptotic estimations are needed.
Thanks.
Here is a positive answer to Question 1. However, it is not completely satisfactory because we have to verify the inequality for small $n$ (at most $25$) numerically. I am still looking forward to an answer that is completely analytical.
As @Mau314 points out in his comment, a natural approach is to examine the error in the CLT, a classical result being the Berry-Esseen theorem. See also the question "Berry-Esseen bound for binomial distribution". According to the Berry-Esseen theorem, $$\sup_{x\in\mathbb{R}}|F(x) - \Phi(x)| \le \frac{C[p^2+(1-p)^2]}{\sqrt{np(1-p)}},$$ where $F$ is the cumulative distribution function of $(X-np)/\sqrt{np(1-p)}$ while $\Phi$ is that of the Standard Normal Distribution, and $C$ is a constant. It is known that $C<0.5$ (see [Shevtsova]), which holds for a large class of distrbutions besides Binomial. [Nagaev and Chebotarev, Theorem 2] proves $C\le0.4215$ for $\text{BIN}(n,1/2)$. According to such bounds, $$\Pr\left(|X-np| > \sqrt{np(1-p)}\right) \le \Pr(|Y|>1) + \frac{2C[p^2+(1-p)^2]}{\sqrt{np(1-p)}} < \frac{1}{3} + \frac{2C[p^2+(1-p)^2]}{\sqrt{np(1-p)}}.$$ Thus $$\Pr\left(|X-np| > \sqrt{np(1-p)}\right) < \frac{1}{2}$$ for $$n \ge \frac{144 C^2[p^2+(1-p)^2]^2}{p(1-p)}.$$ When $p=1/2$, we find that $n\ge 26$ suffices to guaruantee the desired inequality. Indeed, $n\ge 22$ is enough with a bit more care. One can check numberically that the desired inequality (for $p=1/2$) holds for $n\le 25$ as well. Hence the answer to Question 1 is positive.
Alternatively, one can use [Hipp and Mattner, Corollary 1.5], which says that $$\left|P\left(X< \frac{n-\sqrt{n}}{2}\right)-\Phi(1)\right| \le \frac{1}{\sqrt{2\pi n}}.$$ Hence $$\Pr\left(\left|X- \frac{n}{2}\right| > \frac{\sqrt{n}}{2}\right)\le \Pr(|Y|>1) + \sqrt{\frac{2}{\pi n}}.$$ This will justify the desired inequality for $n\ge 23$. The cases with $1\le n \le 22$ can be checked numerically.