Given the continuous random variable $X = \sum_{i=1}^{k}c_if_i(x)$, is it really true that $E(X^2) = \sum_{i=1}^{k} c_i E\left( X_i^2 \right)$?

40 Views Asked by At

I'm wondering about the second part of part (b) of this question, in which we are asked to find the variance of $X$, a random variable determined by a combination of other random variables whose means and variances are known.

problem

The answer given in the textbook, using the formula $\sigma^2 = E(X^2) - \mu^2$, implies that $E(X^2) = \sum_{i=1}^{k} c_i E\left( X_i^2 \right)$.

solution

But it seems to me that if $E$ is a linear operator and $X = \sum_{i=1}^{k} c_i X_i$, then

$$\begin{align}E(X^2) & = E\left( \left(\sum_{i=1}^{k} c_i X_i\right)^2 \right) \\ & = E\left( \left( c_1 X_1+ c_2 X_2+\dots+c_k X_k\right)^2\right) \\ & \neq E\left( c_1 X_1^2+ c_2 X_2^2+\dots+c_k X_k^2 \right)\end{align}$$

How do I justify expanding $E(X^2)$ in this way?

1

There are 1 best solutions below

0
On BEST ANSWER

Notice that $X \neq \sum_{i=1}^{k}c_iX_i$, but the PDF of of $X$ is $\sum_{i=1}^{n}c_if_{i}(x)$. (These are not equivalent statements.)

Hence, assuming interchange between integral and summation is allowed, $$\mathbb{E}[X^2] = \int_{-\infty}^{\infty}x^2\sum_{i=1}^{n}c_if_i(x)\text{ d}x = \sum_{i=1}^{n}c_i\int_{-\infty}^{\infty}x^2f_i(x)\text{ d}x = \sum_{i=1}^{n}c_i\mathbb{E}[X_i^2]=\sum_{i=1}^{n}c_i(\sigma^2_i + \mu_i^2)$$ hence $$\sigma^2 = \sum_{i=1}^{n}c_i(\sigma^2_i + \mu_i^2) - \mu^2 $$ as desired.