Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Expectation of a function of a continuous random variable

  1. Mar 11, 2009 #1
    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?

  2. jcsd
  3. Mar 12, 2009 #2


    User Avatar
    Science Advisor
    Gold Member

    If the variable is discrete you can still express in terms of integrals using dirac delta functions though it is simpler to replace the integral with a sum over values.
  4. Mar 12, 2009 #3
    Yes. Consider the simplest case, where g(x) = 1 if x is in [a,b] and 0 otherwise. Then

    E[W] &= 1\cdot P(W = 1) + 0\cdot P(W = 0)\\
    &= P(g(X) = 1)\\
    &= P(X\in [a,b])\\
    &= \int_a^b f_X(x)\,dx.

    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]
  5. Jun 19, 2009 #4
    Go for summations.....that will solve ur problem and rest all may complicate
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook