We want to predict Y based on some function of X, i.e., Y_hat = f(X). How can we show that the conditional expectation f*(X) = E(Y|X) is the mean-square optimal predictor, i.e., the function f* solves the minimization problem below?
min E{[Y - f(X)]^2}
Here the unrestricted mean-square optimal predictor is the conditional mean.