How to calculate MISE - Mean Integrated Squared Error? I might have misunderstood something, but it seems like taking a definite integral from expectation or expectation from definite integral. But the first stage will return a number in both cases.
I thought that integral under expectation is indefinite, but it looks like just a "notation" in many places, because further digging brings negative answer - for example: see § 2.2.4 here
But I have only one variable - $x$, and estimated $\hat{f}(x,h)$ and theoretical $f(x)$ functions. 
Can anyone explain me how to calculate $MISE(h) = E \int_{\mathbb{R}}(\hat{f}(x,h)-f(x))^2dx$ ?
I see that there are some further manipulations involving the structure of kernel, but I just want to perform a simple computation in Wolfram having two functions, like

MISE[ h_ ]:=NIntegrate[ NExpectation [ ...]... ]

 A: Your integral $$\int_{\mathbb{R}}(\hat{f}(x,h)-f(x))^2dx$$ is a random variable because your density estimate $$\hat{f}(x,h)$$ depends on your sample. The integral above measures the quality of your estimate by integrating the square of the difference over the reals. The result is still a random number whose expectation can be calculated given that you know the common distribution of your sample.
Further Information
Let's consider a specific example. Let $X(i), i=1,2,...n$ be a sequence of independent random variables of a common known pdf. Let the common distribution be uniform over the interval $[0,1]$. Say, $n=10$ and the actual sample is 0.2, 0.3, 0.22223, 0.89, 0.565, 0.11, 0.1222, 0.3454, 0.12, 0.0001. Now, you can calculate the density estimate based on the formula given at your reference if $h$ is given. Then you can calculate the integral in question because you know the common distribution of your samples. Then perform another experiment resulting in another $10$ sample points. You can calculate the integral again; you will get another result. If you repeat this experiment ($10$ samples each time) then the average of the results will tend to the expectation:
$$\mathbb E\left [\int_{\mathbb{R}}(\hat{f}(x,h)-f(x))^2dx \right].$$
Now, you may ask why we estimate the density if we already know it. Please, go back to your reading and see why the author does all this.
