what is mean by function of expectation?

39 Views Asked by At

in the Introduction to Probability book (Jessica Hwang and Joseph K. Blitzstein) section that discussed the "Law of Unconscious Statistician", said $E(g(X))$ does not equal $g(E(X))$ in general if $g(X)$ is not linear. I have some idea about the expectation of a function (random variable), but I don't have any idea about the function of expectation, my question is what is it and can you provide any examples?