Derivation of EPE in “The elements of statistical learning ” I am currently trying to read the "Elements of Statistical Learning", by Efron, Hastie, and Tibshirani, and already at the beginning there is a bit above my level in mathematics.
I have 3 questions regarding the move from (2.9) to (2.10):


*

*what is the meaning of integrating with respect to Pr(dx,dy) instead of with respect to dx,dy by themselves?


2.since this is an indefinite integral, shouldn't there be a +C or something afterwards?


*this is more about the intuition behind this: why is the expected value of the loss function f is the same as the area beneath the function (that is,the integral of f)?



 A: 
  
*
  
*what is the meaning of integrating with respect to Pr(dx,dy) instead of with respect to dx,dy by themselves?
  

You are missing the notion that this is an expectation, that is, the average value of $(Y-f(X))^2$ under the joint distribution of $(X,Y)$. (Using Pr is clearly not the most inspired choice!)


  
*since this is an indefinite integral, shouldn't there be a +C or something afterwards?
  

This is a regular integral and not an anti-derivative. The authors did not put the domain of integration on the integral sign, as is common when this domain does not suffer from possible confusion.


  
*this is more about the intuition behind this: why is the expected value of the loss function f is the same as the area beneath the
  function (that is, the integral of f)?
  

First, $f(X)$ is not the loss function but the transform of the random variable $X$. The loss function is $(Y-f(X))^2$. Second, the integral of the loss function under the probability measure is its average or averaged value. This is the definition for expectations.
About this entire excerpt, one way to look at it is to see it as a probabilistic version of the Pythagorean theorem: the average square distance between $Y$ and $f(X)$ is the sum
$$\mathbb{E}[(Y-f(X))^2]=\mathbb{E}[(Y-\mathbb{E}[Y|X])^2]+\mathbb{E}[(\mathbb{E}[Y|X]-f(X))^2]$$
since the terms $(Y-\mathbb{E}[Y|X])$ and $(\mathbb{E}[Y|X]-f(X))$ are orthogonal in this probabilistic sense.
