1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Expectation value of continuous random variable

  1. Nov 7, 2005 #1
    Hi.. i am doing this question for Probability Theory, to find E[x] of a continuous random variable

    E[x] = the integral from (0 to infinity) of 2x^2 * e^(-x^2) dx

    So I used integration by parts...

    u = x^2
    du = 2xdx

    dv = e^(-x^2) <--- ahh... how do you integrate that. (it dosn't look like it could be)

    Anybody have any ideas?
  2. jcsd
  3. Nov 7, 2005 #2
    looks like X~Normal random variable..
    why does your EX have x^2?

    to integrate exp(-x^2), you need to use a trick. multiply integral by itself to form a double integral... result should have exp(-(x^2 + y^2)) as part of integrand. recall x^2+y^2=r^2 and dx dy = r dr d0

    but i don't think probability theory should be an exercise in integration. use symmetry to arrive at EX should be. ie. is the density function even or odd? what do you know about integration over symmetric intervals?

    edit: integration by parts should be
    u = 2x
    dv = x*exp(-x^2) dx <-- you should know how to integrate this, use change of variable
    Last edited: Nov 7, 2005
  4. Nov 8, 2005 #3


    User Avatar
    Homework Helper



    Put [tex]I=\int_{0}^{\infty}e^{-x^{2}}dx[/tex] so that [tex]I^2=\int_{x=0}^{\infty}e^{-x^{2}}dx\int_{y=0}^{\infty}e^{-y^{2}}dy=\int_{y=0}^{\infty}\int_{x=0}^{\infty}e^{-(x^{2}+y^{2})}dxdy[/tex].

    Now Transform to polar coordinates, and note that the first quadrant (e.g. QI) is one quarter of an infinite plane in rectangluar coordinates, so too is it one quarter of an infinite circle in polar coordinates (you can prove it with using squeeze theorem if your so inclined); you get

    [tex]I^2=\int_{\theta=0}^{\frac{\pi}{2}}\int_{r=0}^{\infty}e^{-r^{2}}rdrd\theta=\frac{1}{2}\int_{\theta=0}^{\frac{\pi}{2}}d\theta\int_{u=0}^{\infty}e^{-u}du=\frac{\pi}{4}\lim_{M \rightarrow \infty}(1-e^{-M})=\frac{\pi}{4}[/tex]

    Therefore, [tex]I=\frac{\sqrt{\pi}}{2}[/tex].
  5. Nov 8, 2005 #4
    what about if its just e^-(x^2) if its not a definit integral.

    I mean.

    Simply what would be the integral of e^-(x^2) ?
  6. Nov 8, 2005 #5


    User Avatar
    Homework Helper

    Others have shown you that:
    [tex]\int \limits_0 ^ \infty e ^ {-x ^ 2}dx = \frac{\sqrt{\pi}}{2}[/tex]
    Now you can use integration by parts:
    You can choose u = x, dv = 2xe-x ^ 2 instead of choosing u = 2x2 and dv = e-x ^ 2 dx (the 2nd poster has pointed that out!).
    So u = x, dv = 2xe-x ^ 2
    du = dx, v = ...
    Can you go from here?
  7. Nov 8, 2005 #6


    User Avatar
    Homework Helper


    Ugly. I should define ugly, ugly means incapable of being expressed by a finite number of elementary functions--you know, ugly. Use series: here, like this

    [tex]e^{-x^{2}} = \sum_{k=0}^{\infty} (-1)^{k}\frac{x^{2k}}{k!}[/tex]

    so that

    [tex]\int e^{-x^{2}}dx = \int \sum_{k=0}^{\infty} (-1)^{k}\frac{x^{2k}}{k!}dx= \sum_{k=0}^{\infty} (-1)^{k}\int \frac{x^{2k}}{k!}dx=\sum_{k=0}^{\infty} (-1)^{k}\int \frac{x^{2k}}{k!}dx=\sum_{k=0}^{\infty} (-1)^{k} \frac{x^{2k+1}}{(2k+1)k!} + C[/tex]

    where interchanging the order of summation and integration is justified by the uniform convergence of that power series for [itex]e^{-x^{2}}[/itex] (for every bounded interval for x).
    Last edited: Nov 8, 2005
  8. Nov 8, 2005 #7
    Yeah.. i understand all the above and how to actually take the integral!

    So i asked my calculus prof how to take the integral 2x^2 * e^(-x^2) dx.
    He tried it, by parts, and also arrived at the integration of e^(-x^2). He said you cannot do the integral of that. (unless you do what was shown above)

    But this this problem comes from probability theory where
    E[x] = integral from 0 to infinty of 2x^2 * e^(-x^2) dx

    you have to some how use a gamma random variable to solve it. It gets to messy to type it out...
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook