Given
Let $X \in \mathbb{R}$ be a real-valued random variable with theoretical probability density function (pdf) $f(x)$ and corresponding cumulative distribution function (cdf) $F(x)$. Let $X_1, X_2, \cdots, X_n$ a random sample of size $n$ drawn according to the distribution of $X$. Let $h>0$ be a positive real number and consider the kernel density estimator $\widehat{f}_n$ of $f$ given for every $x \in \mathcal{X}$ by \begin{eqnarray} \label{eq:kde:1d:1} \widehat{f}_n(x;h) = \frac{1}{nh}\sum_{i=1}^n{K\left(\frac{x-X_i}{h}\right)} \end{eqnarray} where the kernel in this case is the so-called boxcar kernel defined by \begin{eqnarray} \label{eq:kernel:boxcar} K(u) = \left\{\begin{array}{ll} 1 & -\frac{1}{2} < u < \frac{1}{2}\\ 0 & \texttt{Otherwise}. \end{array} \right. \end{eqnarray}
Questions
- Prove that the boxcar kernel of $K(u)$ is a bona fide kernel.
- Show that $$ \mathbb{E}(\widehat{f}_n(x; h)) = \frac{1}{h}\displaystyle \int_{x-(h/2)}^{x+(h/2)}{f(v)dv} $$
- Show that $$ \mathbb{V}(\widehat{f}_n(x; h)) = \frac{1}{nh^2}\left[\int_{x-(h/2)}^{x+(h/2)}{f(v)dv}-\left(\int_{x-(h/2)}^{x+(h/2)}{f(v)dv}\right)^2\right] $$
Attempts
A bona fide kernel is one that is real, genuine, legitimate. i.e. a density estimation function that is non-negative and integrates to $1$. How do I show that a function is non-negative? I know that there is a relationship between the Bias of a density estimation function and its bona fide-ness, but I'm not sure what that relationship is. Any direction here would be helpful.
I know this by definition: $$\mathbb{E}(\hat{f}(x)) = \int \frac{1}{h} K \big( \frac{x-y}{h} \big) f(y)dy$$ So I can use that formula, but what is $h$, and how do I substitute $f(v)dv$ in place of $f(y)dy$?
Similarly, I know this by definition: $$\mathbb{V}(\hat{f}(x)) = \int \frac{1}{h^2} K \big( \frac{x-y}{h} \big)^2 f(y)dy - \Big( \frac{1}{h} \int K \big(\ \frac{x-y}{h} \big) f(y)dy \Big)^2$$ But I still have the same confusions: but what is $h$, and how do I substitute $f(v)dv$ in place of $f(y)dy$?
Thank you in advance for any help/clarification you can provide!