stuck trying to compute variance of continuous random variable

193 Views Asked by At

I'm stuck on a problem where I'm asked to calculate the variance of the continuous RV with pdf $kx^3$ for $0 \leq x \leq 2$ and 0 elsewhere.

The value I find for E($X^2$) is much smaller than what I find for E(X)$^2$, so V(X) = E(X$^2$) - E(X)$^2$ turns out to be negative, which I have read is invalid and indicates that I have made a mistake somewhere - but I just can't see where I'm going wrong.

First I'm asked to find the value of k which makes the function a valid PDF:

$$\begin{align*} 1 &= \int_{-\infty}^{\infty} kx^3\ dx\\ &= \int_0^2 kx^3\ dx\\ &= k \int_0^2 x^3\ dx\\ &= \frac{kx^4}{4} \Big|_0^2\\ &= k \left(\frac{2^4}{4} - \frac{0^4}{4}\right)\\ &= k (4 - 0)\\ &= 4k\\ k &= \frac{1}{4} \end{align*}$$

Next I try to find E(X) and E(X$^2$) in preparation to set up the equation for V(X):

$$\begin{align*} E(X) &= \int_{-\infty}^{\infty} x \cdot f(x)\ dx\\ &= \int_0^2 x \cdot 4x^3\ dx\\ &= 4 \int_0^2 x^4\ dx\\ &= 4 \frac{x^5}{5} \Big|_0^2\\ &= 4 \left(\frac{2^5}{5} - \frac{0^5}{5}\right)\\ &= 4 \left(\frac{32}{5} - 0\right)\\ &= \frac{128}{5}\\ &= 25.6 \end{align*}$$

$$\begin{align*} E(X^2) &= \int_0^2 x^2 \cdot \frac{1}{4} x^3\ dx\\ &= \frac{1}{4} \int_0^2 x^5\ dx\\ &= \frac{x^6}{4 \cdot 6} \Big|_0^2\\ &= \frac{1}{24} (2^6 - 0^6)\\ &= \frac{64}{24}\\ &= \frac{8}{3}\\ &= 2.\overline{6} \end{align*}$$

Finally, I plug these values into the equation for V(X) and get what appears to be an invalid answer:

$$\begin{align*} V(X) &= E(X^2) - E(X)^2\\ &= 2.\overline{6} - 25.6^2\\ &= 2.\overline{6} - 655.36\\ &= -652.69\overline{3} \end{align*}$$

Thanks for your attention and in advance for any help!

1

There are 1 best solutions below

1
On BEST ANSWER

The error is when you compute $E[X]$, you are using $k=4$ rather than $\frac14$, hence the larger value.

$$E[X]=\frac{32}{20}=\frac{8}{5}$$