# Variance of a weighted function

$\hat{f}(x)=\frac{1}{nh}\sum_{i=1}^{n}K\left(\frac{ x-X_i}{h}\right)$
$E\hat{f}(x)=\int_{-\infty}^{\infty}\frac{1}{h}K\left(\frac{x-y}{h}\right)f(y)dy$
$\mbox{var}\hat{f}(x)=\frac{1}{n}\int_{-\infty}^{\infty}\frac{1}{h^2}K\left(\frac{x-y}{h}\right)^2f(y)dy-\left\{\frac{1}{h}\int_{-\infty}^{\infty}K\left(\frac{x-y}{h}\right)f(y)dy\right\}^2$