# Using empirical density function as an estimator of a given probability density

We know empirical distribution function is defined as $F_n(x)=\frac{1}{n}\sum\limits_{i=1}^nI(X_i \leq x)$. Then define empirical density function as $f_n(x) = \frac{F_n(x+b_n)-F_n(x-b_n)}{2b_n}$ .

I can show by using definition that $2nb_nf_n(x)$ is distributed binomial as $B(n,F(x+b_n)-F(x-b_n))$. Further, $E(f_n(x))=\frac{F(x+b_n)-F(x-b_n)}{2b_n}$. Hence as $b_n\rightarrow 0$, $E(f_n(x))\rightarrow f(x)$.

Now, I wanna show that $Var(f_n(x))\rightarrow0$ if $b_n\rightarrow 0$ and $nb_n\rightarrow\infty$. However, I cant find the exact form of $Var(f_n(x))$ by explicit calculation. Can anyonehelp me with it ?Thanks in advance

-

Since $2nb_nf_n(x)$ is binomial $(n,p_n)$ with $p_n=F(x+b_n)-F(x-b_n)$, its expectation and variance are $np_n$ and $np_n(1-p_n)$ respectively. Thus, $\mathbb E(f_n(x))=np_n/(2nb_n)=p_n/(2b_n)$, as you said, and $\mathrm{var}(f_n(x))=np_n(1-p_n)/(2nb_n)^2=p_n(1-p_n)/(4nb_n^2)$.
Assume that $b_n\to0$. If $f$ is regular enough, then $p_n/b_n\to2f(x)$ hence $\mathbb E(f_n(x))\to f(x)$, as you said. Likewise, $p_n\to0$ hence $\mathrm{var}(f_n(x))\sim p_n/(4nb_n^2)\sim f(x)/(2nb_n)$. Thus, $\mathrm{var}(f_n(x))\to0$ if and only if $nb_n\to\infty$.
This shows that the regime of interest is indeed $1\ll nb_n\ll n$, for example one can use $b_n=n^{-\beta}$ for any $\beta$ in $(0,1)$.