## Is it known that every PDF continuous in all $R^n$ has a maximum? [closed]

I'm working with maximum a posteriori estimation and managed to show that every probability density function that is continuous in all $R^n$ always has at least one global maximum. I've search around and asked a few fellow engineers and professors but am not sure if this is widely known. This can actually be extended to any continuous Radon-Nikodym derivative of a finite measure.

The proof is simple: let $f$ be the PDF, and be continuous in all $R^n$. If $L(v)$ is the closed superlevel set at $v$, that is: $L(v):=${$x\in R^n: f(x)\geq v$}, then it must be bounded.

That is so because the neighbourhood of any unbounded set in $R^n$ has infinite Lebesgue measure. Due to continuity of $f$, any lower superlevel set of it, for example $L(v/2)$ contains a neighbourhood of $L(v)$. The probability of the superlevel sets is bounded below by $P[L(v)]\geq v \lambda[L(v)]$. This means that if any superlevel set of $f$ were unbounded, then a lower superlevel set would have probability greater than one.

Since all closed superlevel sets are bounded, they are compact and attain their maximum.

-
I think that if $f$ is a continuous density with compact support $\sum p_i \lambda_i f(\frac x {\lambda_i} + v_i$ is a continuous and has no global maximum, choosing $\sum p_i = 1, \lambda_i \rightarrow \infty, \v_i \rightarrow \infty$, – mike May 28 at 23:40
The statement is false. L(v) need not be bounded, and the neighbourhood of an unbounded set in R^n need not have infinite measure. (Try constructing an open neighbourhood of the rationals in R with finite measure). – George Lowther May 28 at 23:57
Never mind, sorry for the fallacy... An $\epsilon$-neighbourhood of an unbounded set has infinite Lebesgue measure for any finite $\epsilon$, but as the counterexample showed it not necessarily is containded by the lower superlevel set. The case I'm working is simpler though, I actually know my function is bounded above, it is differentiable and its gradient is continuous. Does it make sense saying it attains the maximum? ps.: George, I'm a fan of your blog. – Dimas May 29 at 3:49
No, the modified proposition is still false. Smooth the previous counterexample and then apply $\arctan$ and rescale. – Douglas Zare May 29 at 4:03
@Dimas: You recover your result if it is assumed that the probability density is uniformly continuous, although that is a much stronger condition. – George Lowther May 31 at 20:16
show 1 more comment

## closed as off topic by George Lowther, Qiaochu Yuan, Chris Godsil, Douglas Zare, Anthony QuasMay 29 at 4:52

Take $n=1$ and put a triangle with height $2^m$ and width $2^{-2m}$ at each integer $m=0,1,2,\dots$