# Thread: Variance of a weighted function

1. ## Variance of a weighted function

Given
$\displaystyle \hat{f}(x)=\frac{1}{nh}\sum_{i=1}^{n}K\left(\frac{ x-X_i}{h}\right)$
and
$\displaystyle E\hat{f}(x)=\int_{-\infty}^{\infty}\frac{1}{h}K\left(\frac{x-y}{h}\right)f(y)dy$
show that
$\displaystyle \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$