# Expectation (and concentration?) for $\min(X, n-X)$ when $X$ is a Binomial

I’d like to know if some results are known on the following type of random variables: for parameter $p\in[0,1]$ (for my purposes, $p < \frac{1}{2}$, and even $p \ll 1$) and $n \geq 1$, we let $X$ be a random variable following a Binomial$(n,p)$ distribution, and define $$Y \stackrel{\rm def}{=} \min(X, n-X).$$

Then, as a function of $p$ and $n$: what is the distribution of $Y$? In particular, what is its expectation $\mathbb{E}[Y]$, and what are the best concentration bounds one can obtain around $\mathbb{E}[Y]$? (Does anything like Hoeffding/Chernoff hold?)

As a small remark: for the range of $p$ I am interested in, we should have $\mathbb{E}[Y] \approx \mathbb{E}[X] = pn$, since the probability that $X > \frac{n}{2}$ is exponentially small (in $n$). Big discrepancies between $X$ and $Y$ should only appear when $pn\in [n/2-O(\sqrt{n}), n]$, and for $p$ outside this range $X$ and $Y$ should have distributions very close (in total variation distance). But is there (a) an exact expression for $\mathbb{E}[Y]$, or one that holds even for moderately small $n$? and (b) good concentration bounds for $Y$?

For instance, for $n=2$ we get the exact value $\mathbb{E}[Y] = 2p(1-p) = 2p + O(p^2)$, and for $n=3$ we obtain $\mathbb{E}[Y] = 4p + O(p^3)$.