Why is the expectation of a trace equal to the trace of the expectation?

1.7k Views Asked by At

Some textbooks use the property $$\mathbb{E}\left[\operatorname{tr}\left(X\right)\right]=\operatorname{tr}\left(\mathbb{E}\left[X\right]\right)$$ But why? I would really appreciate it if someone could prove this.

1

There are 1 best solutions below

0
On BEST ANSWER

I am assuming that $X$ is a random matrix, with finite dimensions. Then $$ \textrm{tr}\ X=\sum_i X_{ii}. $$ Hence, the claim follows by linearity of expectation, since $$ \mathbb E(\textrm{tr}\ X)=\mathbb E\sum_i X_{ii}=\sum_i \mathbb E X_{ii}=\sum_i (\mathbb E X)_{ii}=\textrm{tr}\ (\mathbb EX). $$