I'm reading about statistical decision theory and on one point in my book the author defines the expected squared prediction error by:
$$EPE = E(Y-g(X))^2 = \int(y -g(x))^2Pr(dx, dy)$$
I like to write this with the density function so that it stays more precise:
$$EPE = \int\int(y-g(x))^2f(x,y)\;dx\;dy$$
Now on the other part the author says that by conditioning on $X$, $EPE$ can be written as:
$$EPE = E_XE_{Y|X}([Y-g(X)]^2\;|\;X)$$
For some reason this notation confuses me...could someone write this conditional notation of $EPE$ more precisely, i.e. so that it would include the joint density function of random variables $X$ and $Y$ etc.?
Just to be sure: $X$ is the variable we use to predict $Y$ and $g(X)$ is the function we are trying to solve, which minimizes $EPE$.
Thank you for any help :)