Expectation of the square of the sum over the sum of the squares

expectationprobability theory

Let $X_1, X_2, \ldots, X_n$ be i.i.d. random variables from a distribution $D$ on the real numbers with mean $\mu$ and variance $\sigma^2$. Assume that the probability of $X_i = 0$ is $0$. What is the expectation
$$
\mathbb{E}\left[\frac{(X_1 + X_2 + \cdots + X_n)^2}{X_1^2 + X_2^2 + \cdots + X_n^2}\right]?
$$

Or, is it impossible to express in terms of $\mu$ and $\sigma^2$?

Comments:
If we factor out $n^2$ from the numerator and $n$ from the denominator, it's equivalent to
$$
\mathbb{E}\left[\frac{n^2 \cdot \text{AM}^2}{n \cdot \text{QM}^2}\right]
= n \cdot \mathbb{E}\left[ \left(\frac{\text{AM}}{\text{QM}}\right)^2\right],
$$
where AM is the arithmetic mean and QM is the quadratic mean. So the answer is positive and between $0$ and $n$, by QM-AM inequality.

This came up in the calculation of a different expectation. I tried calculating a few specific cases, but I haven't gotten an answer yet. It seems possible the answer doesn't just depend on $\mu$ and $\sigma^2$, but on the other hand, I might just be missing the right trick of how to apply i.i.d. Also the numerator relates nicely to the variance, so maybe a decomposition along those lines works.

Best Answer

Let us consider all the distributions with mean $0$ and variance $1$ with only two elements in the output. It turns out that these are all of the form $$X=\begin{cases}a & \text{with probability }\frac{1}{1+a^2}\\ -1/a & \text{with probability}\frac{a^2}{1+a^2} \end{cases}.$$ where $a$ is non-zero. Then, you can compute the expectation $\mathbb E\left[\frac{(X_1+X_2)^2}{X_1^2+X_2^2}\right]$ as $$\frac{1}{1+2a^2+a^4}\cdot \frac{4a^2}{2a^2}+\frac{2a^2}{1+2a^2+a^4}\cdot \frac{(a-1/a)^2}{a^2+1/a^2}+\frac{a^4}{1+2a^2+a^4}\cdot \frac{4/a^2}{2/a^2}=2-\frac{2a^2}{1+a^4}.$$ If you evaluate this, for instance at $a=1$ and $a=2$, you get different numbers, so this depends more than just on mean and variance. More or less, mean and variance do not suffice to tell you how likely it is for $X_1$ to be small and $X_2$ to be large or vice versa - which is more or less what this quantity expresses.

Related Question