I'm trying to understand the derivation of Expected Prediction Error, as described in The Elements of Statistical Learning. Specifically, it says:
$EPE(f) = E(Y - f(X))^2$
By conditioning$^1$ on X, we can write EPE as:
$EPE(f) = E_XE_{Y|X}([Y - f(X)]^2 | X)$
And, a footnote for this says:
$^1$Conditioning here amounts to factoring the joint density $Pr(X,Y) = Pr(Y|X)Pr(X)$ where $Pr(Y|X) = Pr(Y,X)/Pr(X)$ and splitting up the bivariate integral accordingly.
I'm confused on the following:
Is $E(Y - f(X))^2$ equivalent to $E((Y - f(X))^2)$ and is $E_XE_{Y|X}(g(X, Y))$ equivalent to $E_X (E_{Y|X}(g(X, Y)))$? I'm not used to seeing $E$ used without an argument surrounded by parentheses.
I don't understand why $E_{XY}(g(X,Y)) = E_XE_{Y|X}(g(X,Y) | X)$.
What is meant by "splitting up the bivariate integral accordingly" in the footnote?
Besides Wikipedia, what are some resources I should be looking at so that I don't get confused by these concepts?