Let $u$ be taken uniformly from the unit sphere $\mathbb S^{n-1}$ and $D$ be a diagonal matrix. I'd like to find a general formula for $$ \mathbb E[(u^\top D u)^m] $$ for $m=1,2,3, \dots$, in terms of traces of powers of $D$. The computation quickly becomes complicated as $m$ increases. Has this result appeared somewhere in the literature?
1 Answer
Note that the random vector $u=(u_1,u_2,\ldots u_n)$, uniformly distributed on the unit sphere, can be replaced by the ratio $u=y/|y|$, with $y=(y_1,y_2,\ldots y_n)\sim N(0,I_n)$ a multivariate normally distributed vector of length $|y|\equiv r$. Then $u$ and $r^2$ are independent, so $$\mathbb{E}[(y^\top Dy)^m]=\mathbb{E}[r^{2m}]\,\mathbb{E}[(u^\top Du)^m].$$ The quantity $r^2\sim\chi^2(n)$ has the chi-squared distribution, hence $$\mathbb{E}[(u^\top Du)^m]=\frac{\Gamma(n/2)}{2^m\Gamma(m+n/2)}\mathbb{E}[(y^\top Dy)^m].$$
The moment generating function $M(t)=\mathbb{E}[e^{t(y^\top Dy)}]$ of the normally distributed moments is given by the determinant $$M(t)=|I_n-2(t/n)D|^{-1/2}.$$ The corresponding moments are known as zonal polynomials, see Computationally Efficient Recursions for Top-Order Invariant Polynomials with Applications.
One thus finds that the desired moments on the unit sphere are given by $$\mathbb{E}\bigl[ (u^\top Du)^m\bigr]=\frac{\Gamma(n/2)\,m!}{\Gamma(m+n/2)}\sum_{\mathbf{\eta}}\prod_{j=1}^m\frac{(\operatorname{tr} D^j)^{\eta_j}}{\eta_j!(2j)^{\eta_j}}.$$ Here $\mathbf{\eta}=(\eta_1,\eta_2,\ldots\eta_m)$ is a vector with $m$ nonnegative integer elements satisfying $\sum_{k=1}^m k\eta_k=m$.
Check that the correct results are recovered for $m=1,2$: $$\mathbb{E}\bigl[ (u^\top Du)\bigr]=\frac{2}{n}\times\frac{\operatorname{tr}D}{2},$$ $$\mathbb{E}\bigl[ (u^\top Du)^2\bigr]=\frac{2}{(n/2)(1+n/2)}\times\left(\frac{\operatorname{tr}D^2}{4}+\frac{(\operatorname{tr}D)^2}{8}\right).$$