TheoremBase

The scalar rules are linearity of the integral applied to indicators, constants and centred products; the matrix rules follow entrywise from the identity Cov(X,Y) = E[(X−EX)(Y−EY)ᵀ] and from pulling constant matrices out of matrix integrals.

Proof

Throughout, expectations are integrals against PP (Expectation (ii), Expectation (iii), Expectation (iv)); constant functions and pointwise sums, products and matrix products of measurable functions are measurable (Measurable Maps: Generators, Composition, Continuous Maps, Restrictions, and Criteria for Real- and [0,∞]-Valued Maps (iii), Arithmetic of Measurable Real- and [0,∞]-Valued Maps (i), Sums, Products, Transposes, Dot Products and Norms of Measurable Vector- and Matrix-Valued Maps (i), Sums, Products, Transposes, Dot Products and Norms of Measurable Vector- and Matrix-Valued Maps (ii), Vector- and Matrix-Valued Measurable Maps: Components, Entries and Continuous Images (ii)); and for X,Y∈L2(P)X,Y\in\mathcal{L}^{2}(P) we have X,Y∈L1(P)X,Y\in\mathcal{L}^{1}(P), constants lie in L2(P)\mathcal{L}^{2}(P), the centred functions X−EXX-\mathbb{E}X, Y−EYY-\mathbb{E}Y lie in L2(P)\mathcal{L}^{2}(P), and products of elements of L2(P)\mathcal{L}^{2}(P) lie in L1(P)\mathcal{L}^{1}(P) (Lᵖ Inclusions and Constants on a Finite Measure Space (i), Elementary Properties of the p-Seminorm (i), Lᵖ Inclusions and Constants on a Finite Measure Space (ii), Minkowski's Inequality (i), Hölder's Inequality (ii)).

Events. By Basic Properties of the Integral of Nonnegative Measurable Maps (ii), 1B∈M+(Ω,F)\mathbf{1}_{B}\in\mathcal{M}^{+}(\Omega,\mathcal{F}) and ∫Ω1B dP=P(B)\int_{\Omega}\mathbf{1}_{B}\,dP=P(B). Since P(B)≤P(Ω)=1P(B)\le P(\Omega)=1 (Basic Properties of a Measure (iii)), the real-valued function 1B\mathbf{1}_{B} is also integrable, with the same integral (Measurable Maps: Generators, Composition, Continuous Maps, Restrictions, and Criteria for Real- and [0,∞]-Valued Maps (vii), Linearity and Monotonicity of the Lebesgue Integral, and the Integrability Criterion (vi)). So E 1B=P(B)\mathbb{E}\,\mathbf{1}_{B}=P(B) for either reading of the expectation.

Constants. By Lᵖ Inclusions and Constants on a Finite Measure Space (ii) with exponent 11, the constant cc is integrable and

E c=c P(Ω)=c.\mathbb{E}\,c=c\,P(\Omega)=c.

Linearity, monotonicity and absolute value. These are Linearity and Monotonicity of the Lebesgue Integral, and the Integrability Criterion (vii), Linearity and Monotonicity of the Lebesgue Integral, and the Integrability Criterion (ix) and Linearity and Monotonicity of the Lebesgue Integral, and the Integrability Criterion (x) for μ=P\mu=P.

Affine functions of random vectors. By Rules for Integrals of Vector- and Matrix-Valued Functions (v), AXAX is integrable and E(AX)=A EX\mathbb{E}(AX)=A\,\mathbb{E}X. The constant function bb has the constant components bkb_{k}, so by (ii) it is integrable with E b=b\mathbb{E}\,b=b (Integrable Vector- and Matrix-Valued Functions and Their Integrals (i), Integrable Vector- and Matrix-Valued Functions and Their Integrals (ii)). By Rules for Integrals of Vector- and Matrix-Valued Functions (iii) with both coefficients 11, AX+bAX+b is integrable and E(AX+b)=A EX+b\mathbb{E}(AX+b)=A\,\mathbb{E}X+b.

Covariance and variance formulas. Pointwise,

(X−EX)(Y−EY)=XY−(EY)X−(EX)Y+EX EY,(X-\mathbb{E}X)(Y-\mathbb{E}Y)=XY-(\mathbb{E}Y)X-(\mathbb{E}X)Y+\mathbb{E}X\,\mathbb{E}Y,

so (iii) and (ii) give

Cov⁡(X,Y)=E[XY]−EY EX−EX EY+EX EY=E[XY]−EX EY\operatorname{Cov}(X,Y)=\mathbb{E}[XY]-\mathbb{E}Y\,\mathbb{E}X-\mathbb{E}X\,\mathbb{E}Y+\mathbb{E}X\,\mathbb{E}Y=\mathbb{E}[XY]-\mathbb{E}X\,\mathbb{E}Y

(Variance and Covariance (i)). For Y=XY=X this is the formula for Var⁡X=Cov⁡(X,X)\operatorname{Var}X=\operatorname{Cov}(X,X) (Variance and Covariance (ii)).

Variances are nonnegative. Since (X−EX)2≥0(X-\mathbb{E}X)^{2}\ge0 pointwise, (iv) and (ii) give

Var⁡X=E[(X−EX)2]≥E 0=0\operatorname{Var}X=\mathbb{E}\bigl[(X-\mathbb{E}X)^{2}\bigr]\ge\mathbb{E}\,0=0

(Variance and Covariance (i), Variance and Covariance (ii)).

Variance of an affine function. The constant bb lies in L2(P)\mathcal{L}^{2}(P) (Lᵖ Inclusions and Constants on a Finite Measure Space (ii)), so aX+b∈L2(P)aX+b\in\mathcal{L}^{2}(P) (Minkowski's Inequality (i)). By (iii) and (ii), E(aX+b)=a EX+b\mathbb{E}(aX+b)=a\,\mathbb{E}X+b, so (aX+b)−E(aX+b)=a(X−EX)(aX+b)-\mathbb{E}(aX+b)=a(X-\mathbb{E}X), and by Variance and Covariance (i), Variance and Covariance (ii) and (iii),

Var⁡(aX+b)=E[a2(X−EX)2]=a2 E[(X−EX)2]=a2Var⁡X.\operatorname{Var}(aX+b)=\mathbb{E}\bigl[a^{2}(X-\mathbb{E}X)^{2}\bigr]=a^{2}\,\mathbb{E}\bigl[(X-\mathbb{E}X)^{2}\bigr]=a^{2}\operatorname{Var}X .

Covariance is symmetric and bilinear. Symmetry holds because multiplication in R\mathbb{R} is commutative (Variance and Covariance (i)). Next, aX+bY∈L2(P)aX+bY\in\mathcal{L}^{2}(P) (Minkowski's Inequality (i)) and E(aX+bY)=a EX+b EY\mathbb{E}(aX+bY)=a\,\mathbb{E}X+b\,\mathbb{E}Y, so

(aX+bY−E(aX+bY))(Z−EZ)=a(X−EX)(Z−EZ)+b(Y−EY)(Z−EZ),\bigl(aX+bY-\mathbb{E}(aX+bY)\bigr)(Z-\mathbb{E}Z)=a(X-\mathbb{E}X)(Z-\mathbb{E}Z)+b(Y-\mathbb{E}Y)(Z-\mathbb{E}Z),

and (iii) gives Cov⁡(aX+bY,Z)=aCov⁡(X,Z)+bCov⁡(Y,Z)\operatorname{Cov}(aX+bY,Z)=a\operatorname{Cov}(X,Z)+b\operatorname{Cov}(Y,Z). Finally the constant cc lies in L2(P)\mathcal{L}^{2}(P) (Lᵖ Inclusions and Constants on a Finite Measure Space (ii)) and E c=c\mathbb{E}\,c=c, so (X−EX)(c−E c)=0(X-\mathbb{E}X)(c-\mathbb{E}\,c)=0 and Cov⁡(X,c)=E 0=0\operatorname{Cov}(X,c)=\mathbb{E}\,0=0.

Covariance matrices as expectations. The components of XX and YY lie in L2(P)⊆L1(P)\mathcal{L}^{2}(P)\subseteq\mathcal{L}^{1}(P) (Square-Integrable Vector-Valued Functions: Components, Dot Products and Almost-Everywhere Equality (i)), so XX and YY are integrable, with (EX)k=EXk(\mathbb{E}X)_{k}=\mathbb{E}X_{k} (Integrable Vector- and Matrix-Valued Functions and Their Integrals (i), Expectation (iii)). Put Z=X−EXZ=X-\mathbb{E}X and W=Y−EYW=Y-\mathbb{E}Y, with components Zk=Xk−EXkZ_{k}=X_{k}-\mathbb{E}X_{k} and Wl=Yl−EYlW_{l}=Y_{l}-\mathbb{E}Y_{l} in L2(P)\mathcal{L}^{2}(P). The entries ZkWlZ_{k}W_{l} of ZW⊤ZW^{\top} lie in L1(P)\mathcal{L}^{1}(P), so ZW⊤ZW^{\top} is integrable (Integrable Vector- and Matrix-Valued Functions and Their Integrals (iii)), and for all k∈[n]k\in[n], l∈[r]l\in[r], by Expectation (iv), Variance and Covariance (i) and Variance and Covariance (v),

(E[ZW⊤])kl=E[ZkWl]=Cov⁡(Xk,Yl)=Cov⁡(X,Y)kl.\bigl(\mathbb{E}[ZW^{\top}]\bigr)_{kl}=\mathbb{E}[Z_{k}W_{l}]=\operatorname{Cov}(X_{k},Y_{l})=\operatorname{Cov}(X,Y)_{kl}.

So Cov⁡(X,Y)=E[ZW⊤]\operatorname{Cov}(X,Y)=\mathbb{E}[ZW^{\top}]. Moreover Cov⁡(X)=Cov⁡(X,X)\operatorname{Cov}(X)=\operatorname{Cov}(X,X), both matrices having the entries Cov⁡(Xi,Xj)\operatorname{Cov}(X_{i},X_{j}) (Variance and Covariance (iv), Variance and Covariance (v)).

Covariance matrices are positive semidefinite. By (x), Cov⁡(X)ij=Cov⁡(Xi,Xj)=Cov⁡(Xj,Xi)=Cov⁡(X)ji\operatorname{Cov}(X)_{ij}=\operatorname{Cov}(X_{i},X_{j})=\operatorname{Cov}(X_{j},X_{i})=\operatorname{Cov}(X)_{ji}, so Cov⁡(X)\operatorname{Cov}(X) is symmetric (Symmetric Real Matrices and the Set S(n)\mathcal{S}(n) (iii)). Let u∈Rnu\in\mathbb{R}^{n} and Z=X−EXZ=X-\mathbb{E}X. By The Dot Product on Rn\mathbb{R}^n (i) and Matrix-Vector Product (i), then Variance and Covariance (i), then Linearity and Monotonicity of the Lebesgue Integral, and the Integrability Criterion (viii) (for each ii, and then for the sum over ii),

u⋅(Cov⁡(X)u)=∑i=1nui∑j=1nCov⁡(Xi,Xj) uj=∑i=1nui∑j=1nuj E[ZiZj]=E[∑i=1nui∑j=1nujZiZj]=E[(u⋅Z)2]≥0,u\cdot\bigl(\operatorname{Cov}(X)u\bigr)=\sum_{i=1}^{n}u_{i}\sum_{j=1}^{n}\operatorname{Cov}(X_{i},X_{j})\,u_{j}=\sum_{i=1}^{n}u_{i}\sum_{j=1}^{n}u_{j}\,\mathbb{E}[Z_{i}Z_{j}]=\mathbb{E}\Bigl[\sum_{i=1}^{n}u_{i}\sum_{j=1}^{n}u_{j}Z_{i}Z_{j}\Bigr]=\mathbb{E}\bigl[(u\cdot Z)^{2}\bigr]\ge0,

the inequality by (iv) and (ii). So Cov⁡(X)\operatorname{Cov}(X) is positive semidefinite (Positive Semidefinite and Positive Definite Real Matrices (i)).

Covariance of affine functions. First, AX+b∈L2(P;Rm)AX+b\in\mathcal{L}^{2}(P;\mathbb{R}^{m}). With cA=∑i=1m∑j=1nAij2c_{A}=\sum_{i=1}^{m}\sum_{j=1}^{n}A_{ij}^{2} we have ∥AX(ω)∥2≤cA∥X(ω)∥2\lVert AX(\omega)\rVert^{2}\le c_{A}\lVert X(\omega)\rVert^{2} for every ω∈Ω\omega\in\Omega (Algebraic Rules for Matrix Products, Matrix-Vector Products and Transposes (ix)), that is, ∣AX∣2≤cA∣X∣2|AX|^{2}\le c_{A}|X|^{2} for the functions of Square-Integrable Vector-Valued Functions (i); so

∫Ω∣AX∣2 dP≤cA∫Ω∣X∣2 dP<∞\int_{\Omega}|AX|^{2}\,dP\le c_{A}\int_{\Omega}|X|^{2}\,dP<\infty

(Basic Properties of the Integral of Nonnegative Measurable Maps (iii), Basic Properties of the Integral of Nonnegative Measurable Maps (iv), Square-Integrable Vector-Valued Functions (ii)). The constant bb has constant components, so it lies in L2(P;Rm)\mathcal{L}^{2}(P;\mathbb{R}^{m}) (Lᵖ Inclusions and Constants on a Finite Measure Space (ii), Square-Integrable Vector-Valued Functions: Components, Dot Products and Almost-Everywhere Equality (i)), and AX+b∈L2(P;Rm)AX+b\in\mathcal{L}^{2}(P;\mathbb{R}^{m}) by Square-Integrable Vector-Valued Functions: Components, Dot Products and Almost-Everywhere Equality (iii). Likewise CY+d∈L2(P;Rs)CY+d\in\mathcal{L}^{2}(P;\mathbb{R}^{s}).

Let Z=X−EXZ=X-\mathbb{E}X and W=Y−EYW=Y-\mathbb{E}Y. By (vi) and Algebraic Rules for Matrix Products, Matrix-Vector Products and Transposes (v), the centred functions are

(AX+b)−E(AX+b)=AZ,(CY+d)−E(CY+d)=CW.(AX+b)-\mathbb{E}(AX+b)=AZ,\qquad(CY+d)-\mathbb{E}(CY+d)=CW .

For i∈[m]i\in[m] and j∈[s]j\in[s], by Matrix-Vector Product (i), Product of Real Matrices (i) and Transpose of a Real Matrix (i),

((AZ)(CW)⊤)ij=(∑k=1nAikZk)(∑l=1rCjlWl)=∑l=1r(∑k=1nAikZkWl)Cjl=((A ZW⊤)C⊤)ij.\bigl((AZ)(CW)^{\top}\bigr)_{ij}=\Bigl(\sum_{k=1}^{n}A_{ik}Z_{k}\Bigr)\Bigl(\sum_{l=1}^{r}C_{jl}W_{l}\Bigr)=\sum_{l=1}^{r}\Bigl(\sum_{k=1}^{n}A_{ik}Z_{k}W_{l}\Bigr)C_{jl}=\bigl((A\,ZW^{\top})C^{\top}\bigr)_{ij}.

So, by (xi) for AX+bAX+b and CY+dCY+d, then Rules for Integrals of Vector- and Matrix-Valued Functions (vi), then (xi) for XX and YY,

Cov⁡(AX+b,CY+d)=E[(AZ)(CW)⊤]=E[A ZW⊤C⊤]=A E[ZW⊤] C⊤=ACov⁡(X,Y) C⊤.\operatorname{Cov}(AX+b,CY+d)=\mathbb{E}\bigl[(AZ)(CW)^{\top}\bigr]=\mathbb{E}\bigl[A\,ZW^{\top}C^{\top}\bigr]=A\,\mathbb{E}[ZW^{\top}]\,C^{\top}=A\operatorname{Cov}(X,Y)\,C^{\top}.

Taking Y=XY=X, C=AC=A and d=bd=b, and using Cov⁡(X)=Cov⁡(X,X)\operatorname{Cov}(X)=\operatorname{Cov}(X,X) and Cov⁡(AX+b)=Cov⁡(AX+b,AX+b)\operatorname{Cov}(AX+b)=\operatorname{Cov}(AX+b,AX+b) ((xi)), gives Cov⁡(AX+b)=ACov⁡(X)A⊤\operatorname{Cov}(AX+b)=A\operatorname{Cov}(X)A^{\top}.

Second-moment matrix. The components XiX_{i} lie in L2(P)\mathcal{L}^{2}(P) (Square-Integrable Vector-Valued Functions: Components, Dot Products and Almost-Everywhere Equality (i)), so the entries XiXjX_{i}X_{j} of XX⊤XX^{\top} lie in L1(P)\mathcal{L}^{1}(P) and XX⊤XX^{\top} is integrable (Integrable Vector- and Matrix-Valued Functions and Their Integrals (iii)). For i,j∈[n]i,j\in[n], by Variance and Covariance (iv), (vii), Expectation (iv) and Expectation (iii),

Cov⁡(X)ij=Cov⁡(Xi,Xj)=E[XiXj]−EXi EXj=(E[XX⊤])ij−((EX)(EX)⊤)ij,\operatorname{Cov}(X)_{ij}=\operatorname{Cov}(X_{i},X_{j})=\mathbb{E}[X_{i}X_{j}]-\mathbb{E}X_{i}\,\mathbb{E}X_{j}=\bigl(\mathbb{E}[XX^{\top}]\bigr)_{ij}-\bigl((\mathbb{E}X)(\mathbb{E}X)^{\top}\bigr)_{ij},

and matrices with the same entries are equal.

Citations

Loading…

Dependencies

Uses0

Loading…

Comments

Log in to comment.

Loading…