# How does one find $E\Bigl(\frac{(\sum_{i=1}^nX_i)^2}{\sum_{i=1}^n X_i^2}\Bigr)$

Suppose $X_1,\ldots,X_n$ are a random sample of $N(0,\sigma^2)$. How can find $$E\left(\frac{\bigl(\sum_{i=1}^nX_i\bigr)^2}{\sum_{i=1}^n X_i^2}\right)$$

-
Expand the numerator and the first term will be very nice. The second term can be written as a sum of products of zero-mean uncorrelated (but not independent!) random variables (why?). Use a standard fact about such products to conclude. – cardinal Sep 11 '12 at 2:18
We can also use Basu theorem for solve this where denominator is complete statistics and numerator is anciliary statistics – Amirhossein Jan 11 '14 at 22:48

Assuming $X_i$ are independent identically distributed normals with zero mean.
Using $\frac{1}{\lambda} = \int_0^\infty \mathrm{e}^{-\lambda t} \mathrm{d} t$: $$\begin{eqnarray} \mathbb{E}\left( \frac{\left(\sum_{i=1}^n X_i\right)^2}{\sum_{i=1}^n X_i^2} \right) &=& \int_0^\infty \mathbb{E}\left( \sum_{i=1}^n \sum_{j=1}^n X_i X_j \mathrm{e}^{-t \sum_{k=1}^n X_k^2} \right) \mathrm{d} t \\ &\stackrel{\text{symmetry}}{=}& \int_0^\infty \sum_{i=1}^n \mathbb{E}\left( X_i^2 \mathrm{e}^{-t \sum_{k=1}^n X_k^2}\right) \mathrm{d} t \\ &\stackrel{\text{indep.}}{=}& \int_0^\infty \sum_{i=1}^n \mathbb{E}\left(X_i^2 \mathrm{e}^{-t X_i^2} \right) \prod_{k=1,k\not= i}^n \mathbb{E}\left(\mathrm{e}^{-t X_k^2} \right) \mathrm{d} t \\ &=& \int_0^\infty \left(-\frac{\mathrm{d}}{\mathrm{d}t} \left(\mathbb{E}\left(\mathrm{e}^{-t X^2} \right)\right)^n \right)\mathrm{d} t \\&=& \left.-\left(\mathbb{E}\left(\mathrm{e}^{-t X^2} \right)\right)^n\right|_{t \to 0^+}^{t \to \infty} = 1 \end{eqnarray}$$
Expand the numerator. The expectation value for the mixed terms vanishes by symmetry. The sum of the remaining terms is the denominator, so the remaining fraction is $1$, and so is its expectation value.