If X is a random variable, then its expected value is its mean (population mean). They are interchangeable. However, expected values are used for much more than that. For example, the expected value:

E[(X-mu)^2] is the variance (sigma^2) of the random variable X.

If we let C = ((X-mu)^2) / sigma^2) then C is also a random variable. It turns out that if X has a normal distribution (N(mu, sigma^2)) then C has a chi-square distribution with r degrees of freedom.

So

E[((X-mu)^2) / sigma^2) ] = E[C] = the mean of a chi-square distribution with r degrees of freedom. = r.

~Matt