4.1. Sampling and Statistics 233
Histogram of Poisson Variates
Number of events
0123456
024681
0
Figure 4.1.2:Histogram of the Poisson variates of Example 4.1.6.
estimate off(x)atagivenx:
f̂(x)=#{x−h<Xi<x+h}
2 hn
. (4.1.13)
To write this more formally, consider the indicator statistic
Ii(x)=
{
1 x−h<Xi<x+h
0otherwise,
i=1,...,n.
Then a nonparametric estimator off(x)is
f̂(x)=^1
2 hn
∑n
i=1
Ii(x). (4.1.14)
Since the sample items are identically distributed,
E[f̂(x)] =
1
2 hn
nf(ξ)2h=f(ξ)→f(x),
ash→0. Hencef̂(x) is approximately an unbiased estimator of the densityf(x).
In density estimation terminology, the indicator functionIiis called arectangular
kernel withbandwidth 2 h. See Sheather and Jones (1991) and Chapter 6 of
Lehmann (1999) for discussions of density estimation. The R functiondensity
provides a density estimator with several options. For the examples in the text, we
use the default option as in Example 4.1.7.