# What is the maximum entropy distribution for a continuous random variable on $[0,\infty)$ with given mean and variance?

I know that for a given logmean and logstdev its the lognormal, but what about where we directly specify the mean and variance? The above seems to depend on the log-transformation to the maxent for unbounded continuous RV with given mean and variance (i.e, Normal).

-
I take the question to mean: what probability distribution of a random variable $X$ with a specified expected value and specified variance has the highest entropy, defined as $\mathbb E(-\log(f(X)))$, where $f$ is the density function? The answer is that $X$ is normally distributed. But at this moment I'd have to do a fair amount of work to write a proof, although I suspect after that I could write a good sketch of it that's much shorter than what I'd need to do first. – Michael Hardy Dec 8 '13 at 20:15
PS: Sorry---I just noticed the restriction to $[0,\infty)$. Maybe I'll be back..... – Michael Hardy Dec 8 '13 at 20:20
...at this point I'm somewhat wildly guesing it's a Gamma distribution. – Michael Hardy Dec 8 '13 at 20:21
@MichaelHardy That's interesting you mention the gamma, because I derived the gamma as the appropriate distribution for the above constraints, but using a different functional other than the Shannon differential entropy. Just wanted to know if entropy will give the same distribution...I haven't seen anything on this in the literature. – user76844 Dec 9 '13 at 0:39

The maximum entropy distribution is of the form $f(x) = \exp( \sum_k \lambda_k g_k(x))/Z$ where $g_k(x)$ are imposed by the restrictions (like Lagrange multipliers) and $Z$ is the normalization factor. In our case, we have two restrictions (apart from the trivial one), which give the two functions $g_1(x)=x$ (mean) and $g_2(x)=x^2$ (second moment, or variance)
Hence, the distribution is has the form $f(x) = \exp( a x -b x^2)/Z$ ($x\ge 0$ , $b>0$) which corresponds to a truncated normal.
@Eupraxis1981 : In that case, we should get $b=0$ (recall that $a,b$ are arbitrary factors that must be adjusted so a to fit the restrictions). "A truncated normal whose mean and variance are both one"... degenerates into an exponential. – leonbloy Dec 9 '13 at 22:58