# Expected value of logarithm of a binomial random variable

Suppose $X\sim \mathrm{Binomial}(n,p),$ i.e. $X$ takes values in $\{0,1,2,\ldots, n\}$ and $P(X=i) = {n\choose i} p^i(1-p)^{n-i}.$

I am looking for a good estimate for $\mathbb{E}\log(X+\alpha).$ I am thinking of $\alpha$ as some fixed number, for example, $\alpha = 1,$ $p$ as a fixed number between 0 and 1, eg. $p=\frac{1}{3}$ while $n$ is some very large number. The kind of estimate I need may be clarified by the following aim:

Define $f(n): = \log(n+2\alpha) +p\mathbb{E}\log\frac{p}{X+\alpha} + (1-p)\mathbb{E}\log\frac{1-p}{n-X+\alpha}.$ I want to show that $f(n)\sim \frac{c}{n} + o\left(\frac{1}{n}\right)$ and I want to identify the constant $c.$

-
If $n$ is large and $p$ is not too small, then $X$ is concentrated near $np$, where $\log$ is almost constant. –  Anthony Quas Oct 23 '13 at 22:32
@AnthonyQuas: $log(E(X+\alpha))$ would be $log(np+\alpha)$, but the question is about $E(log(X+\alpha))$. –  Michael Oct 23 '13 at 22:57
Thanks. I edited the question to include the nature of the estimate I am looking for. –  Hedonist Oct 23 '13 at 23:37

Just expand $ln(X+\alpha)$ as a Taylor series about $X=np$ and then do the binomial sum term by term. Use tail bounds on the binomial distribution to show that the error terms are meaningful. Without much checking, I got $$\mathbb E(\ln(X+\alpha)) = \ln(pn+\alpha) - \frac{1-p}{2pn} + O(1/n^2),$$ which ought to be precise enough for you. More terms are easy to get.
ADDED: In response to Hedonist's comments, here is a tiny bit more detail. We know from the Chernov inequality, or otherwise, that $\mathrm{Prob}(|X-np|\gt n^{1/2+\epsilon})\lt e^{-cn^{2\epsilon}}$ for small enough $\epsilon\gt 0$ and some $c\gt 0$. (I'm assuming $p$ is constant, or at least bounded away from 0 and 1.) Since $\ln(X+\alpha)=O(\ln n)$ for all $X$, this means the contribution of the values of $X$ outside that range is at most $O(\ln n)e^{-cn^{2\epsilon}}$, which is negligible. Within the interval $|X-np|\le n^{1/2+\epsilon}$ you can expand the logarithm by Taylor series and easily see how many terms are needed for the precision you want.
Why do you assume that $E(ln(X+\alpha))=ln(E(X)+\alpha)$? –  Michael Oct 24 '13 at 23:11
@Hedonist: First show that only the values of $X$ near $np$ contribute. Almost certainly $X=np+O(n^{1/2+\epsilon})$ will be enough; use the Chernov inequality. After that you can expand the logarithm just within that small interval. –  Brendan McKay Oct 25 '13 at 0:07