in papers regarding stochastic optimization methods such as for example SGD people often talk about the variance of the gradient $g$ and mostly it is expressed expressed as follows:
$$ \operatorname {Var}(g_r) = E(\|g-E(g)\|_2^2)=E(\|g\|^2_2)-\|E(g)\|_2^2 $$
This reminds me of the standard variance definition for a random variable $X$, that is: $$\operatorname {Var} (X)=\operatorname {E} \left[(X-\operatorname {E}(X))^{2}\right]=\operatorname {E}(X^2)-\operatorname {E}(X)^2$$.
So here is what confuses me:
- In the above expression we have $\operatorname {Var} (g)$, not $\operatorname {Var} (\|g\|)$. So why does the l2-norm show up here?
- $g_r$ is a vector-valued random variable, with values in ${\displaystyle \mathbb {R} ^{n}}$.For vector valued random variables, the Variance should be $ \operatorname {E} ((X-\mu )(X-\mu )^{\operatorname {T} })$, i.e. the variance-covariance matrix. Why do we still apply the other formula here?
I'm not an expert in stats and would thus much appreciate some clarification.
Thank you in advance!