Bound on the absolute difference between mean and median of a random variable Let $X$ be a real-valued random variable such that, for all $t>0$,
$$\mathbb{P}\{\lvert X-M\rvert >t\} \leq a e^{-t^2/b} $$ where $M$ is the median and $a > 0,b >0$.
How can I show that $|M-\mathbb{E}[X]\rvert \leq \sqrt{ab}$?
 A: This proves the stronger bound of $\min\left(\frac{\pi}{2}a\sqrt{b}, \sqrt{ab}\right)$), as asked in the Exercise 2.22 of Concentration inequalities by Boucheron, Lugosi, and Massart (2012) referenced by the OP in the comments.



*

*The bound $\frac{\pi}{2}a\sqrt{b}$: 
as in this related question (and answer), start with
$$
\left|M[X]-\mathbb{E}(X)\right|=\left|\mathbb{E}[M[X]-X]\right| 
\leq \mathbb{E} \left|X-M[X]\right| \tag{1}
$$
Now, use the fact that, for the random variable $\left|X-M[X]\right| \geq 0$
$$
\mathbb{E}\left|X-M[X]\right| = \int_{(0,\infty)} \mathbb{P}\{\left|X-M[X]\right| > t\} dt 
\leq \int_{(0,\infty)} a e^{-t^2/b} dt = \frac{\sqrt{\pi}}{2} a\sqrt{b}\,.
$$

*The bound $\sqrt{ab}$: the aforementioned question (or Exercise 2.21 of the referenced book) establishes that, provided $X$ is squared integrable,
$$
\mathbb{E}\left|X-M[X]\right|
\leq \sqrt{\operatorname{Var}[X]}
$$
so it suffices to show that our assumption proves both that $X$ is squared integrable, and that $\operatorname{Var}[X]\leq ab$. This is done in one step, using the same trick as before:
$$\begin{align}
\mathbb{E}[\left|X-M[X]\right|^2] &= \int_{(0,\infty)} \mathbb{P}\{\left|X-M[X]\right|^2 > t\} dt
= \int_{(0,\infty)} \mathbb{P}\{\left|X-M[X]\right| > \sqrt{t}\} dt 
\\&\leq \int_{(0,\infty)} a e^{-(\sqrt{t})^2/b} dt = \int_{(0,\infty)} a e^{-t/b} dt = ab < \infty
\end{align}$$
proving both that $X$ is square-integrable, and giving the desired bound (but on $\mathbb{E}[\left|X-M[X]\right|^2]$, not directly $\operatorname{Var}[X]$). Since $\operatorname{Var}[X] = \operatorname{Var}[X-M[X]] \leq  \mathbb{E}[\left|X-M[X]\right|^2]$, however, this implies the result.
