# Expected value of square of sum over sum of squares

I need to obtain an analytical formula for the following expected value depending on $$n$$: $$\mathbb{E}\left[\frac{\left( \sum_i^n X_i \right)^2 }{\sum_i^n X_i^2}\right], X_i \sim \mathcal{N}(\mu, \sigma^2)$$ All the $$X_i$$ come from the same normal distribution. I derived that $$\mathbb{E}\left[\left( \sum_i^n X_i \right)^2 \right] = n^2 \mu^2 + n \sigma^2$$ and $$\mathbb{E}\left[\sum_i^n X_i^2 \right] = n \mu^2 + n \sigma^2$$ and actually checked it by sampling. However, the ratio of these two partial expected values does not provide the exact results for the overall expected value as they are correlated. The difference is not big, yet it is important to me as I am interested especially in expected values for small $$n$$. Any ideas how to account for the correlation and obtain an analytical formula for the expected value correctly?

• Jan 18 at 16:04
• @StubbornAtom Thanks for the link. My problem lacks symmetry so I cannot use the simple approach they used. However, I have found the identity, which they used, quite useful. I derived an integral for the expected value which I am able to solve for particular n but sadly not in general. I am afraid that the general analytical formula might not exist.
– gagi
Jan 19 at 18:31