Expected transformed values
E[g(X)] is the probability-weighted sum of g(x) over possible values x.
On this page 7 sections
01To find the expected value of a function g(X), apply g to each possible value first#
To find the expected value of a function , apply to each possible value first. Keep its original probability as the weight.
If is equally likely to be or , both values square to , giving .
PMF: , . Find .
Show answer and explanation
Transformed values: . Weighted sum: .
02The same procedure works for a supplied cost rule#
The same procedure works for a supplied cost rule. If , compute each cost , multiply by , and sum.
You can work directly from the original distribution; a separate probability table for the transformed values is optional.
PMF: , . Cost is . Find .
Show answer and explanation
Transformed values: . Weighted sum: .
03In the example, E[X]=0, so (E[X])^2=0#
In the example, , so . But . Squaring and averaging give different results when their order is swapped.
For a nonlinear function, transform each possible value before you average.
PMF: , . A learner uses . Repair the calculation of .
Show answer and explanation
Transformed values: . Weighted sum: .
Apply the function to each value before taking the weighted average.
- Compute the expectation of a function of a discrete random variable.
Sources & further reading
- [1]Pishro-Nik, Introduction to Probability: Functions of Random Variables ↗Pishro-Nik: Introduction to Probability · Article