Expected Value of a Function

Definition (From WorlframAlpha):
The expectation value of a function in a variable is denoted or. For a single discrete variable, it is defined by
where is the probability density function.
Example: