# confused about meaning of a expectation of a function

well,in the "Derivation" part of the wiki link.

i don't figure out why $E(f)=f$, does it imply that the function $f$ is constant?(but it makes no sense.)

• This is written one libe before: since $f$ is deterministic. – Did Feb 14 '16 at 10:24
• i have noticed that, but for different x, f(x) is different, so E(f) can be a deterministic value(because it can be the mean of f(x)), but f can not be a deterministic value. – DaSqy Stc Feb 15 '16 at 11:26

In the derivation part of wikipedia, the function is deterministic which means given a particular input in its domain, will always produce same output. So, we can take the function as constant given its domain.

We talk about expectation of a random variable, when we are doubtful about its outcome. Eg: It may or may not rain. So, when we say that it is expected to rain, We mean that most probably it will rain... but it may not also.
In the above situation, $f(x)$ is a pre-determined function. Value of $f(x)$ at $x$ is surely unique. So, the expectation of 'what might be the value of $f(x)$ is that it is surely $f(x)$.
I hope I am clear.

• but for different x, f(x) is different, so E(f) can be a deterministic value(because it can be the mean of f(x)), but f can not be a deterministic value. – DaSqy Stc Feb 15 '16 at 11:26
• f is deterministic implies that f(x) is fixed. f(x) doesn't vary. – Win Vineeth Feb 15 '16 at 11:41
• i don't think f is deterministic implies f is a constant function. there is such a word:"The expectation ranges over different choices of the training set x1, ..., xn, y1, ..., yn, " if f(x) doesn't vary,so why it need to pick different x to estimate the function f? – DaSqy Stc Feb 15 '16 at 12:56
• I never said f is a constant function. Let me try to explain this way. Let f(4) = 10. Then, f(4) is always 10. However, if f(4) can be 3,6,9 or 10, then f is not deterministic. Then, E(f(4)) is not equal to 10 but is something between 3 and 10. Since, f(4) is always 10, E(f(4)) = 10. It is in this form that they are using the proof. – Win Vineeth Feb 15 '16 at 13:03