# Minimizing $E_{out}$ theoretically in linear regression

Related to linear regression with noise I've been given the following functional, depending on the function $h$:

$$E_{out}(h) = \int \int (h(x)-y)^2 dx dy$$

I want to prove that the function that minimizes $E_{out}$ is

$$h^*(x) = \int yp(y|x)dy$$

But I don't have any math tools to do it. Which things should I know to be able to solve this problem? I know a little variational calculus in one variable and I see this similiar, but I don't know any results about multiple variables. Is this a good approach or it is better to think about other tools? Also, I haven't been given any information about the term $p(y|x)$ in the second integral. Any help about the meaning of this expression would be appreciated too.

• I strongly suggest that before you try to prove something, you understand what it is that you're proving! – Yuval Filmus Apr 22 '17 at 22:53