Calculating expected value of $X$ with the density function $f(x)=16xe^{-4x}$

327 Views Asked by At

Suppose, $X$ be a random variable with probability density funciton, $$ f(x) = \begin{cases} 16xe^{-4x}, & x \geq 0; \\ 0, & \text{otherwise} \end{cases} $$ (source)

I tried to find the expected value of $X$, so I integrated $16x^2 e^{-4x}$ from $0$ to $\infty$.

After finding the indefinite integral with $u$-substitution:$-\frac{1}{2}e^{-4x}(8x^2+4x+1)+C$, I tried to compute the integral solution with the aforementioned boundaries and here is where I am not certain whether I calculated it right.

It might have gone wrong when I plugged in $\infty$ for $x$. I get $0-(-1/2)=1/2$. Is this correct or am I supposed to get something undefined and can one even get undefined expected value/mean?

When you subtract something from infinity, isn't it undefined? Same as multiplying $0$ with infinity?

2

There are 2 best solutions below

0
On BEST ANSWER

Yes your solution is fine, indeed we have

$$\int_0^\infty 16x^2e^{-4x}dx=\left[-\frac12e^{-4x}(8x^2+4x+1)\right]_0^\infty=0-\left(-\frac12\right)=\frac12$$

More in detail what we are solving is the following limit

$$\lim_{a\to \infty} \int_0^a 16x^2e^{-4x}dx=\lim_{a\to \infty}\left[-\frac12e^{-4x}(8x^2+4x+1)\right]_0^a=0-\left(-\frac12\right)=\frac12$$

0
On

Here is a nice `trick' to solve it without integrals. The idea is that the density function looks like $x$ to some power times the density of a known random variable, so their moments are linked.

Let $Y$ be an exponential random variable with a coefficient $4$. So the pdf is $4e^{-4x}$. Now, $$E(X)=\int_0^\infty 16x^2 e^{-4x} dx =4 \int_0^\infty 4x^2 e^{-4x} = 4E(Y^2)$$ $Y$ is a known random variable so we know that $E(Y)=0.25$ and $V(Y)=0.25^2$. Substitute it to the equation for variance to obtain $E(Y^2)=V(Y)+E^2(Y)=\tfrac{1}{8}$ and $E(X)=\tfrac{1}{2}$.