Expectation of Exponential Variable

227 Views Asked by At

I'm trying to find the second central moment of an exponential random variable, and came across this particular solution provided by the school, which I'm unsure of how the method is possible.

It goes like this: $$E(X^2) = \int^{\infty}_{0} x^2 \lambda{e^{-x\lambda}} dx= \int^{\infty}_{0}x^2 d(-e^{-x\lambda})$$ $$=[-x^2e^{-x\lambda}]^\infty_0 + 2\int^{\infty}_{0}x{e^{-x\lambda}}dx = \frac{2}{\lambda^2}$$

May I know how how exactly is the first line possible? How can I merely interchange $x$ in $dx$ for $-e^{-x\lambda}$? I understand how to find the first central moment by integration by parts, but this baffles me. Any tips and pointers would be much appreciated! Thank you!

2

There are 2 best solutions below

0
On BEST ANSWER

It can be useful to calculate these moments in a general case, invoking Gamma Function

$$E(X^k)=\int_0^{\infty} x^k \lambda e^{-\lambda x}dx=\frac{1}{\lambda^k}\int_0^{\infty}(\lambda x)^k e^{-\lambda x} d(\lambda x)=\frac{\Gamma(k+1)}{\lambda^k}=\frac{k!}{\lambda^k}$$

Thus if you have to calculate, i.e., $E(X^{100})$ you can easy derive the solution... instead of doing 100 times by part you integral

0
On

The notation being used here is an alternate way of writing

$$u = x^2, \quad du = 2x \, dx, \\ dv = \lambda e^{-\lambda x} dx, \quad v = -e^{-\lambda x}.$$

You will notice that with this definition of $v$, we simply have $$d(-e^{-\lambda x}) = dv = \lambda e^{-\lambda x} \, dx,$$ and substituting this into the first line gives $$\int_{x=0}^\infty x^2 d(-e^{-\lambda x}) = \int_{x=0}^\infty x^2 \lambda e^{-\lambda x} \, dx.$$