In the setting of Probability Spaces: Notation , let m , n , r , s ∈ N m,n,r,s\in\mathbb{N} m , n , r , s ∈ N .
(i) Events. For every event B B B ,
E 1 B = P ( B ) . \mathbb{E}\,\mathbf{1}_{B}=P(B). E 1 B = P ( B ) .
(ii) Constants. For every c ∈ R c\in\mathbb{R} c ∈ R , the constant random variable c c c is integrable and E c = c \mathbb{E}\,c=c E c = c .
(iii) Linearity. Let X , Y ∈ L 1 ( P ) X,Y\in\mathcal{L}^{1}(P) X , Y ∈ L 1 ( P ) and a , b ∈ R a,b\in\mathbb{R} a , b ∈ R . Then a X + b Y ∈ L 1 ( P ) aX+bY\in\mathcal{L}^{1}(P) a X + bY ∈ L 1 ( P ) and
E ( a X + b Y ) = a E X + b E Y . \mathbb{E}(aX+bY)=a\,\mathbb{E}X+b\,\mathbb{E}Y. E ( a X + bY ) = a E X + b E Y .
(iv) Monotonicity. Let X , Y ∈ L 1 ( P ) X,Y\in\mathcal{L}^{1}(P) X , Y ∈ L 1 ( P ) with X ≤ Y X\le Y X ≤ Y . Then E X ≤ E Y \mathbb{E}X\le\mathbb{E}Y E X ≤ E Y .
(v) Absolute value. Let X ∈ L 1 ( P ) X\in\mathcal{L}^{1}(P) X ∈ L 1 ( P ) . Then ∣ X ∣ ∈ L 1 ( P ) |X|\in\mathcal{L}^{1}(P) ∣ X ∣ ∈ L 1 ( P ) and
∣ E X ∣ ≤ E ∣ X ∣ . |\mathbb{E}X|\le\mathbb{E}|X|. ∣ E X ∣ ≤ E ∣ X ∣.
(vi) Affine functions of random vectors. Let X X X be an integrable random vector in R n \mathbb{R}^{n} R n , A ∈ R m × n A\in\mathbb{R}^{m\times n} A ∈ R m × n and b ∈ R m b\in\mathbb{R}^{m} b ∈ R m . Then A X + b AX+b A X + b is integrable and
E ( A X + b ) = A E X + b . \mathbb{E}(AX+b)=A\,\mathbb{E}X+b. E ( A X + b ) = A E X + b .
(vii) Covariance and variance formulas. Let X , Y ∈ L 2 ( P ) X,Y\in\mathcal{L}^{2}(P) X , Y ∈ L 2 ( P ) . Then X Y ∈ L 1 ( P ) XY\in\mathcal{L}^{1}(P) X Y ∈ L 1 ( P ) and
Cov ( X , Y ) = E [ X Y ] − E X E Y , Var X = E [ X 2 ] − ( E X ) 2 . \operatorname{Cov}(X,Y)=\mathbb{E}[XY]-\mathbb{E}X\,\mathbb{E}Y,\qquad\operatorname{Var}X=\mathbb{E}[X^{2}]-(\mathbb{E}X)^{2}. Cov ( X , Y ) = E [ X Y ] − E X E Y , Var X = E [ X 2 ] − ( E X ) 2 .
(viii) Variances are nonnegative. Let X ∈ L 2 ( P ) X\in\mathcal{L}^{2}(P) X ∈ L 2 ( P ) . Then Var X ≥ 0 \operatorname{Var}X\ge0 Var X ≥ 0 .
(ix) Variance of an affine function. Let X ∈ L 2 ( P ) X\in\mathcal{L}^{2}(P) X ∈ L 2 ( P ) and a , b ∈ R a,b\in\mathbb{R} a , b ∈ R . Then a X + b ∈ L 2 ( P ) aX+b\in\mathcal{L}^{2}(P) a X + b ∈ L 2 ( P ) and
Var ( a X + b ) = a 2 Var X . \operatorname{Var}(aX+b)=a^{2}\operatorname{Var}X. Var ( a X + b ) = a 2 Var X .
(x) Covariance is symmetric and bilinear. Let X , Y , Z ∈ L 2 ( P ) X,Y,Z\in\mathcal{L}^{2}(P) X , Y , Z ∈ L 2 ( P ) and a , b , c ∈ R a,b,c\in\mathbb{R} a , b , c ∈ R . Then, for the constant random variable c c c ,
Cov ( X , Y ) = Cov ( Y , X ) , Cov ( a X + b Y , Z ) = a Cov ( X , Z ) + b Cov ( Y , Z ) , Cov ( X , c ) = 0. \operatorname{Cov}(X,Y)=\operatorname{Cov}(Y,X),\qquad\operatorname{Cov}(aX+bY,Z)=a\operatorname{Cov}(X,Z)+b\operatorname{Cov}(Y,Z),\qquad\operatorname{Cov}(X,c)=0. Cov ( X , Y ) = Cov ( Y , X ) , Cov ( a X + bY , Z ) = a Cov ( X , Z ) + b Cov ( Y , Z ) , Cov ( X , c ) = 0.
(xi) Covariance matrices as expectations. Let X ∈ L 2 ( P ; R n ) X\in\mathcal{L}^{2}(P;\mathbb{R}^{n}) X ∈ L 2 ( P ; R n ) and Y ∈ L 2 ( P ; R r ) Y\in\mathcal{L}^{2}(P;\mathbb{R}^{r}) Y ∈ L 2 ( P ; R r ) . Then X X X and Y Y Y are integrable, ( X − E X ) ( Y − E Y ) ⊤ (X-\mathbb{E}X)(Y-\mathbb{E}Y)^{\top} ( X − E X ) ( Y − E Y ) ⊤ is integrable , and
Cov ( X , Y ) = E [ ( X − E X ) ( Y − E Y ) ⊤ ] , Cov ( X ) = Cov ( X , X ) . \operatorname{Cov}(X,Y)=\mathbb{E}\bigl[(X-\mathbb{E}X)(Y-\mathbb{E}Y)^{\top}\bigr],\qquad\operatorname{Cov}(X)=\operatorname{Cov}(X,X). Cov ( X , Y ) = E [ ( X − E X ) ( Y − E Y ) ⊤ ] , Cov ( X ) = Cov ( X , X ) .
(xii) Covariance matrices are positive semidefinite. Let X ∈ L 2 ( P ; R n ) X\in\mathcal{L}^{2}(P;\mathbb{R}^{n}) X ∈ L 2 ( P ; R n ) . Then Cov ( X ) \operatorname{Cov}(X) Cov ( X ) is symmetric and positive semidefinite .
(xiii) Covariance of affine functions. Let X ∈ L 2 ( P ; R n ) X\in\mathcal{L}^{2}(P;\mathbb{R}^{n}) X ∈ L 2 ( P ; R n ) , Y ∈ L 2 ( P ; R r ) Y\in\mathcal{L}^{2}(P;\mathbb{R}^{r}) Y ∈ L 2 ( P ; R r ) , A ∈ R m × n A\in\mathbb{R}^{m\times n} A ∈ R m × n , b ∈ R m b\in\mathbb{R}^{m} b ∈ R m , C ∈ R s × r C\in\mathbb{R}^{s\times r} C ∈ R s × r and d ∈ R s d\in\mathbb{R}^{s} d ∈ R s . Then A X + b ∈ L 2 ( P ; R m ) AX+b\in\mathcal{L}^{2}(P;\mathbb{R}^{m}) A X + b ∈ L 2 ( P ; R m ) , C Y + d ∈ L 2 ( P ; R s ) CY+d\in\mathcal{L}^{2}(P;\mathbb{R}^{s}) C Y + d ∈ L 2 ( P ; R s ) , and
Cov ( A X + b , C Y + d ) = A Cov ( X , Y ) C ⊤ , Cov ( A X + b ) = A Cov ( X ) A ⊤ . \operatorname{Cov}(AX+b,\,CY+d)=A\operatorname{Cov}(X,Y)\,C^{\top},\qquad\operatorname{Cov}(AX+b)=A\operatorname{Cov}(X)\,A^{\top}. Cov ( A X + b , C Y + d ) = A Cov ( X , Y ) C ⊤ , Cov ( A X + b ) = A Cov ( X ) A ⊤ .
(xiv) Second-moment matrix. Let X ∈ L 2 ( P ; R n ) X\in\mathcal{L}^{2}(P;\mathbb{R}^{n}) X ∈ L 2 ( P ; R n ) . Then X X ⊤ XX^{\top} X X ⊤ is integrable and
Cov ( X ) = E [ X X ⊤ ] − ( E X ) ( E X ) ⊤ . \operatorname{Cov}(X)=\mathbb{E}[XX^{\top}]-(\mathbb{E}X)(\mathbb{E}X)^{\top}. Cov ( X ) = E [ X X ⊤ ] − ( E X ) ( E X ) ⊤ .