Ensemble average of a sum of cosine functions

215 Views Asked by At

I can evaluate the following: $$R_2 = \left\langle \sum_{i\ne j}\sum_{p\ne q} \cos(\theta_i - \theta_j + \theta_p - \theta_q)\right\rangle$$

where the $\theta$ are chosen from a uniform random distribution between 0 and $2\pi$. I just need to find how many terms result in $\theta_i - \theta_j + \theta_p - \theta_q = 0$. There are $N$ terms where $i=q$ and for each of these there are $N$ terms where $j=p$ giving $N^2$ terms. I then need to subtract off the $N$ terms which would result in $i=j$ (since they are forbidden) giving: $$R_2 = N^2 - N$$

I'd like to extend this to evaluate: $$R_3 = \left\langle \sum_{i\ne j}\sum_{p\ne q} \sum_{m\ne n}\cos(\theta_i - \theta_j + \theta_p - \theta_q + \theta_m - \theta_n)\right\rangle$$

and the obvious extensions thereof. Is there a better way to proceed than the kind of thinking I used above?

P.S. I don't know if combinatorics is the right tag here. I used that because it seemed like it might be relevant.