# estimation $\cos$ of sum of random variables

Let $a_1\ge a_2\geq\cdots\geq a_n$ be real numbers. And let $r=(r_1,\ldots,r_n)$ be sequence of random variables taking on values $1$ and $-1$ and such that $\sum_{i=1}^n r_i=0$.

I am wondering if one can estimate from above and from below $\cos\left(\sum_{i=1}^na_ir_i\right)$

-
Almost surely, and by something more precise than -1 and +1? – Did May 7 '12 at 18:55
something better then $-1$ and $1$. – David May 7 '12 at 18:57
Unless your $a_i$ satisfy more interesting constraints you can effectively make it anything you want. Take $a_2,\ldots,a_n=-1$, so that $\sum_{i=1}^na_ir_i=(a_1+1)r_1$ and now set $a_1$ to anything you desire above $-1$. $\cos$ is an even function so not much is lost with $a_1\geq -1$. – Alex R. May 7 '12 at 19:02
@Sam : But could it be that the question is whether you can give estimates that depend on $a_1,\ldots,a_n$? – Michael Hardy May 7 '12 at 19:11
Yes, I would like to get bound which would depend on $a_i, i=1, \ldots n$ – David May 7 '12 at 19:55

$n$ must be even, otherwise it is impossible to have the sum of $r_i$ be zero.
Let $\sigma$ be a permutation so that $|a_{\sigma_1}|\geq ... \geq |a_{\sigma_n}|$. Then we have $$| \sum_{i=1}^n a_i r_i | \leq |a_{\sigma_1}|+...+|a_{\sigma_{\frac{n}{2}}}|-(|a_{\sigma_{\frac{n}{2}+1}}| +...+ |a_{\sigma_n}|)$$ and the bounds are achieved with appropriate (legal) choice of $r_i$. I have no idea how this translates into bounds on $\cos(\sum_{i=1}^n a_i r_i)$ without more information about the $a_i$.