1

good morning everyone.

I understand that kernel density estimation is a non-parametric technique used to estimate the probability density function of a random variable from a sample of data, with the kernel density defined as follows:

$$ \hat{f}(x) = \frac{1}{n h} \sum_{i=1}^{n} K\left(\frac{x - X_i}{h}\right) $$

where:

  • $\hat{f}(x)$ is the density estimate at point $x$,
  • $n$ is the number of observations,
  • $h$ is the bandwidth
  • ${K}(u)$ is the kernel function.

I assume that to obtain the cumulative distribution function, one must integrate $\hat{f}(x)$

$$ F(x) = \int_{-\infty}^{x} \hat{f}(t) \, dt $$

The thing is, I have read that the Epanechnikov kernel is the most efficient, which is defined as follows:

$$ K(u) = \frac{3}{4}(1 - u^2) \quad \text{if } \vert u \vert \leq 1 $$ $$ K(u) = 0 \quad \text{if } \vert u \vert > 1, $$

I would like to know how to calculate $F(x)$ using this type of kernel.

Thank you very much, and best regards.

  • What exactly are you looking for? Have you tried just doing the integration? – LSK21 Oct 25 '24 at 07:39
  • Hi @LSK21 my question is precisely about how to integrate the Epanechnikov Kernel, what is the analytical expression of the kernel? I have some doubts about the absolute values – Samuel M Oct 28 '24 at 10:39

1 Answers1

0

The estimate of the cdf is given by \begin{align} \hat{F}(x) &= \int_{-\infty}^x \frac{1}{nh} \sum_{i=1}^n K \left( \frac{t-X_i}{h} \right) dt \\ &= \frac{1}{nh} \sum_{i=1}^n \int_{-\infty}^x K \left( \frac{t-X_i}{h} \right) dt \\ &= \frac{1}{n} \sum_{i=1}^n \int_{-\infty}^{\frac{x-X_i}{h}} K(u)du \\ &= \frac{1}{n} \sum_{i=1}^n I_K \left( \frac{x-X_i}{h} \right), \end{align}

where $I_K(x) = \int_{-\infty}^x K(u) du$. Now, note that since the support of $K$ is $[-1, 1]$, we have that $I_K(x) = 0$ for $x < -1$ and $I_K(x) =1$ for $x > 1$ (since in this case we are just integrating over the entire support). The case that remains is for $x \in [-1, 1]$. This is then just a simple integration, giving us

\begin{align} I_K(x) &= \int_{-1}^x \frac{3}{4}(1-u^2)du \\ &= \left[ \frac{3}{4} u - \frac{1}{4} u^3 \right]_{u=-1}^{u=x} = -\frac{1}{4} x^3 + \frac{3}{4} x + \frac{1}{2}. \end{align}

The only thing that remains is to plug this in for our estimator $\hat{F}$ above.

LSK21
  • 1,244