Let $X$ be a random variable with real values and with density $f$. Assume the support $f$ is bounded with supremum $m$ and has a positive value at that supremum: $$\forall x > m, f(x) = 0 \text{ and } f(m)> 0.$$ Given an I.I.D. sample $X_1, \cdots, X_n$ of this random variable, I'd like to estimate both $m$ and $f(m)$. What would be an good way to proceed ?
I think estimating $m$ by the sample maximum $\max(X_1, \cdots, X_n)$ yields a consistent estimator of $m$ with rate $\frac{1}{n}$, which satisfies me.
But I'm not sure on how to estimate $f(m)$. I tried to count the number of sample points falling in the interval $$\left[ \max(X_1, \cdots, X_n) - \frac{S}{\sqrt{n}}, \max(X_1, \cdots, X_n) \right]$$ where $S$ is a consistent estimator of the standard deviation of $X$. Hoping this would give a $\frac{1}{\sqrt{n}}$ consistent estimator of $f(m)$, but this seems to converge very slowly, and I don't think this is the best option.
Any input on that question would be greatly appreciated.