Expectation of a function of a continuous random variable

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 11K views
kingwinner
Messages
1,266
Reaction score
0
If W=g(X) is a function of continuous random variable X, then E(W)=E[g(X)]=

∫g(x) [fX(x)] dx
-∞
============================
Even though X is continuous, g(X) might not be continuous.

If W happens to be a discrete random variable, does the above still hold? Do we still integrate ∫ (instead of sum ∑)?

Does it matter whether W itself is discrete or continuous?

Thanks!
 
Physics news on Phys.org
kingwinner said:
If W=g(X) is a function of continuous random variable X, then E(W)=E[g(X)]=

∫g(x) [fX(x)] dx
-∞
============================
Even though X is continuous, g(X) might not be continuous.

If W happens to be a discrete random variable, does the above still hold?
Yes. Consider the simplest case, where g(x) = 1 if x is in [a,b] and 0 otherwise. Then

[tex]\begin{align*}<br /> E[W] &= 1\cdot P(W = 1) + 0\cdot P(W = 0)\\<br /> &= P(g(X) = 1)\\<br /> &= P(X\in [a,b])\\<br /> &= \int_a^b f_X(x)\,dx.<br /> \end{align*}[/tex]

On the other hand, the formula also gives

[tex]\int_{-\infty}^\infty g(x)f_X(x)\,dx = \int_a^b f_X(x)\,dx.[/tex]
 
Go for summations...that will solve ur problem and rest all may complicate