Re: Exchange of expectations in derivation of biasvariance decomposition
With regard to LaTex, you just need to surround your LaTex code with (math) and (/math), except that those brackets need to be square.
With regard to the exchange of expectations, this can always be done with probability distributions. The condition that makes it easier than swapping the order of integrations and sums in general is that probability densities are always positive. Problems with swapping the order of integrals and sums only occur when you have conditional convergence, with infinite positive and negative contributions cancelling out in a way which is orderdependent.
[EDIT: thanks to Yaser for being more precise than me. In this case it's not merely that probability distributions are positive that matters, it's also that the error function being integrated is nonnegative. Without this, the change of order could be invalid if the function was pathological. It would be safe if the function was Lebesgue measurable].
