For each positive integer, let $Q\_n=(q\_{i,j})\_{i,j \in [n]}$ be a random $n \times n$ psd matrix. In the limit $n \to \infty$, suppose the eigenvalues of this sequence of matrices are uniformly bounded in the following sense


* $\lambda\_{\max}(Q\_n) = \mathcal O\_{\mathbb P}(1)$.


Let $y\_1,\ldots,y\_n,\ldots$ be a sequence of iid Gaussian or Rademacher random variables (independent of the $Q\_n$'s) such that $\mathbb E y\_1 = 0$, $\mathbb E[y\_1^2] = 1$. Define $r\_n := y^\top Q\_n y = \sum\_{i=1}^n y\_i y\_j q\_{i,j}$, a quadratic form in $(y\_1,\ldots,y\_n)$ with coefficient matrix $Q\_n$.



> 
> **Question 1.** Is it true that $r\_n - \mathbb E[r\_n] \to 0$ almost-surely (or in any other reasonable sense) ?
> 
> 
> 




---


Update (positive answer to a slightly different question)
---------------------------------------------------------


The answer below establishes that the answer to **Question 1** is No in general.


It turns out that one can answer a slightly different question in the affirmative, namely we show that



> 
> ***Claim.*** *$n^{-1}y^\top Q\_n y - n^{-1}trace(Q\_n) \to 0$ a.s,*
> 
> 
> 


under the assumption that


* $\sup\_n \|Q\_n\|\_{op} = \mathcal O(1)$, this is a deterministic bound, unlike the probabilistic bound in the previous question.
* $\mathbb E[y\_1] = 0$, $\mathbb E|y\_1|^2 = 1$ and $\mathbb E|y\_1|^{4+\eta} < \infty$, for some $\eta>0$. Note that these conditions are satisfied by Gaussian and Rademacher random variables considered in the original setting.


The above claim appears as Lemma 7.6 of [this manuscript](https://arxiv.org/pdf/1507.03003.pdf).


So the argument goes like this ...



> 
> ***(Lemma B.26 of [Bai and silverstein 2010](http://ndl.ethernet.edu.et/bitstream/123456789/60805/1/140.pdf)).*** *For any $p \ge 2$, it holds that*
> $$
> \mathbb E\_y[|y^\top Q\_n y - trace(Q\_n)|^p] \le 2K\_ptrace(Q\_n^2)^{p/2}(\nu\_4+\nu\_{2p}).
> $$
> where $\nu\_k := \mathbb E|y\_1|^k$.
> 
> 
> 


Now, since $\|Q\_n\|\_{op} \le C$ uniformly over $n$, then from the above we get
$$
\mathbb E\_y[|n^{-1}y^\top Q\_n y - n^{-1}trace(Q\_n)|^p] \le 2C^2 K\_p\nu\_{2p}n^{-p/2}
$$


Thus, by Markov's inequality
$$
\mathbb P(|n^{-1}y^\top Q\_n y - n^{-1}trace(Q\_n)|^p| > t) \le \frac{2C^2K\_p\nu\_{2p}}{tn^{-p/2}}.
$$
If $p=2+\eta/2$ (and this is the crucial ingredient), we have $\nu\_{2p} < \infty$ by hypothesis and so the RHS is $\mathcal O(n^{-p/2})$ and therefore summable. Thus Borel-Cantelli gives $n^{-1}y^\top Q\_n y - n^{-1}trace(Q\_n) \to 0$ a.s. $\quad\quad\quad\quad\quad\Box$



Convergence of quadratic form $y^T Q y$ where $y$ is a random iid sequence of length $n$ and $Q$ is an $n \times n$ random matrix independent of $y$
$\newcommand{\ep}{\varepsilon}\newcommand{\la}{\lambda}$
We inteprete the abuse of notation "$r\_n \to \mathbb E[r\_n]$" as "$r\_n - \mathbb E[r\_n] \to 0$".


One may ask instead whether
\begin{equation\*}
 \rho\_n:=\frac{r\_n}{Er\_n}
\end{equation\*}
converges to $1$ in probability, say. The answer to this question is: usually, no.


Indeed, let
\begin{equation\*}
 Q\_n=(2+\ep)I\_n,
\end{equation\*}
where $\ep$ is a Rademacher random variable independent of the $y\_i$'s and $I\_n$ is the $n\times n$ identity matrix.
Then $1\le\la\_{\min}(Q\_n)\le\la\_{\max}(Q\_n)\le3$,
\begin{equation\*}
 Er\_n=\sum\_{i,j}Eq\_{ij}\,Ey\_iy\_j=\sum\_{i}Eq\_{ii}=2n,
\end{equation\*}
and
\begin{equation\*}
 \begin{aligned}
 Er\_n^2&=\sum\_{i,j,k,l}Eq\_{ij}q\_{kl}\,Ey\_iy\_jy\_ky\_l
 =\sum\_{i,k}Eq\_{ii}q\_{kk}=n^2\,Eq\_{11}^2=5n^2. 
\end{aligned}
\tag{1}
\end{equation\*}
So, $Var\,r\_n=n^2$ and hence
\begin{equation\*}
E(\rho\_n-1)^2= Var\,\rho\_n=1\not\to0. \tag{2}
\end{equation\*}


So, $\rho\_n\not\to1$ in $L^2$.


Moreover, similarly to (1) we get $Er\_n^4=O(n^4)$ and hence $E\rho\_n^4=O(1)$. So, if we had $\rho\_n\to1$ in probability, then by the uniform integrability we would get $E(\rho\_n-1)^2\to0$, which would contradict (2). Thus, $\rho\_n\not\to1$ in probability.


