# Kernel Distribution - show it is a density

• May 3rd 2010, 06:52 AM
Robb
Kernel Distribution - show it is a density
Given the kernel density estimator $\hat{f} (s)=\sum^{N}_{n=1} \frac{1}{N\cdot \delta} K\left( \frac{s-x_n}{\delta}\right)$, show that it is a density for every N, and every $\delta>0$ and every relization of the sample ie. show the funciton is nonnegative and integrates to one.

I'm not sure how to formalise thise, I know that if $K(\cdot)$ is a density, then it integates to one by definition. Does the following work;
$\int^{\infty}_{-\infty}\hat{f}(s)ds=\int^{\infty}_{-\infty}\sum^{N}_{n=1} \frac{1}{N\cdot \delta} K\left( \frac{s-x_n}{\delta}\right)ds=\frac{1}{N\cdot \delta} \int^{\infty}_{-\infty}\sum^{N}_{n=1} K\left( \frac{s-x_n}{\delta}\right)ds$

So I know that
$\int^{\infty}_{-\infty}\sum^{N}_{n=1} K\left( \frac{s-x_n}{\delta}\right)ds$ needs to equal $N\delta$ but I'm not sure what to do with the integral..
• May 3rd 2010, 11:31 PM
CaptainBlack
Quote:

Originally Posted by Robb
Given the kernel density estimator $\hat{f} (s)=\sum^{N}_{n=1} \frac{1}{N\cdot \delta} K\left( \frac{s-x_n}{\delta}\right)$, show that it is a density for every N, and every $\delta>0$ and every relization of the sample ie. show the funciton is nonnegative and integrates to one.

I'm not sure how to formalise thise, I know that if $K(\cdot)$ is a density, then it integates to one by definition. Does the following work;
$\int^{\infty}_{-\infty}\hat{f}(s)ds=\int^{\infty}_{-\infty}\sum^{N}_{n=1} \frac{1}{N\cdot \delta} K\left( \frac{s-x_n}{\delta}\right)ds=\frac{1}{N\cdot \delta} \int^{\infty}_{-\infty}\sum^{N}_{n=1} K\left( \frac{s-x_n}{\delta}\right)ds$

So I know that
$\int^{\infty}_{-\infty}\sum^{N}_{n=1} K\left( \frac{s-x_n}{\delta}\right)ds$ needs to equal $N\delta$ but I'm not sure what to do with the integral..

Observe that if $u=(s-x_n)/\delta$:

$
\int_{-\infty}^{\infty}K\left(\frac{s-x_n}{\delta}\right)\;ds=\int_{-\infty}^{\infty}\delta K(u)\;du=\delta
$

So:

$\int_{-\infty}^{\infty}\hat{f} (s)\; ds=
\int_{-\infty}^{\infty}\left[\sum^{N}_{n=1} \frac{1}{N\cdot \delta} K\left( \frac{s-x_n}{\delta}\right)\right]\; ds$
$
=\sum^{N}_{n=1}\left[ \int_{-\infty}^{\infty}\frac{1}{N\cdot \delta} K\left( \frac{s-x_n}{\delta}\right)\; ds\right]
$
$
=\sum^{N}_{n=1}\frac{1}{N}=1$

CB