Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Economics

5 Modeling Dependence

National Graduate Institute for Policy Studies (GRIPS)

To study relationships between random variables we need to add more concepts to our toolkit. In this chapter we review multivariate distributions and give a rigorous construction of conditional expectation.

5.1Random Vectors and Matrices

Let’s begin with random vectors and matrices.

5.1.1Random Vectors

In Section 4.1.3 we defined a random variable to be a function x ⁣:Ω→Rx \colon \Omega \to \RR with the property that {x∈B}\{x \in B\} is an event for any Borel set B∈B(R)B \in \bB(\RR). The definition of a random vector is analogous. A random vector x\boldx in RN\RR^N is a function from Ω\Omega to RN\RR^N with the property that

{ω∈Ω:x(ω)∈B}∈Ffor all B∈B(RN)\setntn{\omega \in \Omega}{\boldx(\omega) \in B} \in \fF \quad \text{for all } B \in \bB(\RR^N)

This is just (4.9) with B(RN)\bB(\RR^N) replacing B(R)\bB(\RR). In statistical applications we can almost always cook up a sample space Ω\Omega and a set of events F\fF on Ω\Omega such that all random vectors we care about satisfy (5.1).[1]

It’s also possible to define a random vector x\boldx in RN\RR^N as a tuple of NN random variables (x1,…,xN)(x_1, \ldots, x_N). The two definitions are equivalent. As with ordinary vectors, random vectors have no intrinsic shape, and we’ll write them in rows or columns according to convenience. However, in expressions involving matrix multiplication, random vectors will default to column vectors unless otherwise stated.

The definition of a random vector ensures that {x∈B}\{\boldx \in B\} is a well-defined event for every B∈B(RN)B \in \bB(\RR^N). If we want to ensure that some transformation y=f(x)\boldy = f(\boldx) is likewise a random vector, we need a restriction on ff so that {y∈B}\{\boldy \in B\} is also a well-defined event. The appropriate restriction is B\bB-measurability, which, analogous to the scalar case , means that f ⁣:RN→RMf \colon \RR^N \to \RR^M satisfies f−1(B)∈B(RN)f^{-1}(B) \in \bB(\RR^N) for all B∈B(RM)B \in \bB(\RR^M). As in the scalar case, every kind of transformation we use in this text is B\bB-measurable, so the restriction is never binding.

Expectations of random vectors are defined element-by-element. In particular, if x=(x1,…,xN)\boldx = (x_1, \ldots, x_N) is a random vector in RN\RR^N, then its expectation E x\EE \boldx is defined as the vector of expectations

E x=E (x1x2⋮xN):=(E x1E x2⋮E xN)\EE \boldx = \EE \left( \begin{array}{c} x_1 \\ x_2 \\ \vdots \\ x_N \end{array} \right) := \left( \begin{array}{c} \EE x_1 \\ \EE x_2 \\ \vdots \\ \EE x_N \end{array} \right)

An M×NM \times N random matrix X\boldX is an M×NM \times N array of random variables. Its expectation is defined as

E X:=(E x11⋯E x1N⋮⋮E xM1⋯E xMN)\EE \boldX := \begin{pmatrix} \EE x_{11} & \cdots & \EE x_{1N} \\ \vdots & & \vdots \\ \EE x_{M1} & \cdots & \EE x_{MN} \end{pmatrix}

Fact 5.1.1 is obtained by repeated application of the linearity of scalar expectations stated in fact 4.1.5.

The variance–covariance matrix of a random vector x\boldx in RN\RR^N with μ:=E x\boldmu := \EE \boldx is the N×NN \times N matrix

var⁡[x]:=E [(x−μ)(x−μ)⊺]\var [\boldx] := \EE [ (\boldx - \boldmu) (\boldx - \boldmu)^\T]

Expanding this out gives

var⁡[x]=(E [(x1−μ1)(x1−μ1)]⋯E [(x1−μ1)(xN−μN)]⋮⋮E [(xN−μN)(x1−μ1)]⋯E [(xN−μN)(xN−μN)])\var [\boldx] = \left( \begin{array}{ccc} \EE [(x_1 - \mu_1)(x_1 - \mu_1)] & \cdots & \EE [(x_1 - \mu_1)(x_N - \mu_N)] \\ \vdots & & \vdots \\ \EE [(x_N - \mu_N)(x_1 - \mu_1)] & \cdots & \EE [(x_N - \mu_N)(x_N - \mu_N)] \\ \end{array} \right)

The j,kj,kth term is the scalar covariance between xjx_j and xkx_k and the principal diagonal contains the variance of each xnx_n.

The cross-covariance between random vectors x\boldx and y\boldy is defined as

cov⁡[x,y]:=E [(x−E [x])(y−E [y])⊺]\cov [\boldx, \boldy] := \EE [ (\boldx - \EE [\boldx]) (\boldy - \EE [\boldy])^\T]

Evidently var⁡[x]=cov⁡[x,x]\var[\boldx] = \cov[\boldx, \boldx].

Here’s a useful fact concerning expectations of quadratic forms. The proof is a solved exercise (see ex. 5.4.7).

5.1.2Multivariate Distributions

The definition of a distribution over RN\RR^N generalizes that of a distribution over R\RR given in Section 4.2.1. In particular, a distribution or law PP on RN\RR^N is a probability measure over the Borel sets B(RN)\bB(\RR^N). By definition, it satisfies P(RN)=1P(\RR^N) = 1 and P(∪n=1∞Bn)=∑n=1∞P(Bn)P(\cup_{n=1}^{\infty} B_n) = \sum_{n=1}^\infty P(B_n) for any disjoint sequence {Bn}\{B_n\} in B(RN)\bB(\RR^N). See also the properties of probability measures listed in fact 4.1.1.

Figure 5.1 shows a visualization of a distribution PP on R2\RR^2, with hot colors indicating regions of high probability. (The distribution is multivariate Gaussian, to be defined below.) The sets AA and BB are typical Borel sets. In the figure, BB has the same area as AA but is assigned greater probability by PP. By additivity, we know that P(A∪B)=P(A)+P(B)P(A \cup B) = P(A) + P(B) must hold.

Example distribution and events A and B

Figure 5.1:Example distribution and events AA and BB

As was the case for R\RR, distributions on RN\RR^N are fully characterized by their values on certain more elementary families of subsets of RN\RR^N. For example, for any two distributions Q,PQ, P on RN\RR^N,

P(I)=Q(I) for all I∈R  ⟹  P(B)=Q(B) for all B∈B(RN)P(I) = Q(I) \text{ for all } I \in \rR \quad \implies \quad P(B) = Q(B) \text{ for all } B \in \bB(\RR^N)

where R\rR denotes the family of all cylinder sets

C=B1×⋯×BN,Bn∈B(R),  n=1,…,NC = B_1 \times \cdots \times B_N, \qquad B_n \in \bB(\RR), \; n=1,\ldots, N

or, specializing further, the family of all rectangles[2]

I=(−∞,s1]×⋯×(−∞,sN],sn∈R,  n=1,…,NI = (-\infty, s_1] \times \cdots \times (-\infty, s_N], \qquad s_n \in \RR, \; n=1,\ldots, N

(See prop 3.7 of Çinlar (2011).) Figure 5.2 shows an example set I=(−∞,s1]×(−∞,s2]I = (-\infty, s_1] \times (-\infty, s_2] in the case of R2\RR^2.

Distributions are characterized by their values on elements of \rR

Figure 5.2:Distributions are characterized by their values on elements of R\rR

Thus, analogous to (4.24), any distribution PP on RN\RR^N is characterized by the function

F(s):=F(s1,…,sN):=P(×n=1N(−∞,sn])(s∈RN)F(\bolds) := F(s_1, \ldots, s_N) := P \left( \times_{n=1}^N (-\infty, s_n] \right) \qquad (\bolds \in \RR^N)

This is an example of a multivariate cumulative distribution function, which is a function F ⁣:RN→[0,1]F \colon \RR^N \to [0, 1] that is

  1. right-continuous in each of its arguments,

  2. increasing in each of its arguments, and

  3. satisfies

F(sj)→1 as sj→∞andF(s1,…,snj,…,sN)→0 as snj→−∞F(\bolds_j) \to 1 \text{ as } \bolds_j \to \infty \quad \text{and} \quad F(s_1, \ldots, s_{nj}, \ldots, s_N) \to 0 \text{ as } s_{nj} \to -\infty

As in the one-dimensional case, we will call a distribution PP on RN\RR^N discrete if PP is supported on a countable subset of RN\RR^N, and absolutely continuous if P(B)=0P(B) = 0 whenever BB has zero Lebesgue measure. The latter condition is again necessary and sufficient for existence of a density representation, by which we mean existence of a density pp on RN\RR^N such that

P(B)=∫Bp(s)  ⁣dsfor all B∈B(RN)P(B) = \int_B p(\bolds) \, \diff \bolds \qquad \text{for all } B \in \bB(\RR^N)

The right-hand side of (5.4) is a multivariate integral that we can write out more explicitly as

∫−∞∞⋯∫−∞∞1 ⁣ ⁣1B(s1,…,sN)p(s1,…,sN) ⁣ds1⋯ ⁣dsN\int_{-\infty}^{\infty} \cdots \int_{-\infty}^{\infty} \1_B (s_1,\ldots,s_N) p(s_1,\ldots,s_N) \diff s_1 \cdots \diff s_N

Conversely, if pp is any density on RN\RR^N, then (5.4) defines a distribution.

Bivariate standard normal density

Figure 5.3:Bivariate standard normal density

Let’s describe one important way to construct multivariate distributions.

This distribution is called the product distribution of P1,…,PNP_1, \ldots, P_N. If Pn=PP_n = P for all nn, then we’ll call P˚\mathring P the NNth product of PP. The uniqueness part of fact 5.1.4 follows from the claim above that distributions on RN\RR^N are uniquely pinned down by their values on cylinder subsets of RN\RR^N. As we’ll see, product distributions correspond to joint distributions of independent random variables.

5.1.2.1Marginals of Multivariate Distributions

Given any distribution PP on RN\RR^N, the nnth marginal distribution of PP is the distribution on R\RR defined by

Pn(B)=P(R×⋯×R×B×R×⋯×R)P_n(B) = P (\RR \times \cdots \times \RR \times B \times \RR \times \cdots \times \RR)

Here BB is the nnth element of the Cartesian product. We can also write this as

Pn(B)=P{s∈RN:s⊺en∈B}P_n(B) = P \setntn{\bolds \in \RR^N}{\bolds^\T \bolde_n \in B}

The nnth marginal tells us the probabilistic implications of PP when we only concern ourselves with the outcomes for the nnth coordinate. From PnP_n we can also extract the marginal CDF FnF_n via (4.24).

If PnP_n is absolutely continuous, it has density pnp_n. When the joint distribution PP has a density pp, the marginal distribution PnP_n has a density, and pnp_n can be obtained directly from pp by integrating out the other variables. For example, in the bivariate case,

p1(s1)=∫−∞∞p(s1,s2) ⁣ds2p_1(s_1) = \int_{-\infty}^{\infty} p(s_1, s_2) \diff s_2

Figure 5.4 shows a bivariate density represented by contours and the two marginals obtained from projecting onto each axis.

Bivariate joint density and its two marginals

Figure 5.4:Bivariate joint density and its two marginals

In general, the joint distribution cannot be determined from the marginals alone, since the marginals do not tell us about the interactions across coordinates. The exception is when there is no interaction. This is the case for product distributions, as described in fact 5.1.4 and further discussed in Section 5.1.4.

5.1.3Distributions of Random Vectors

Let x\boldx be a random vector in RN\RR^N. The distribution of x\boldx is the probability measure PP on B(RN)\bB(\RR^N) defined by

P(B)=P{x∈B}(B∈B(RN))P(B) = \PP\{\boldx \in B\} \qquad (B \in \bB(\RR^N))

In this context, PP is also called the joint distribution of x1,…,xNx_1,\ldots, x_N, and we write L(x)=P\lL(\boldx) = P. The joint distribution can also be represented by the multivariate CDF F ⁣:RN→[0,1]F \colon \RR^N \to [0, 1] defined by (5.3), which in this case can be written as F(s1,…,sN)=P{x1⩽s1,…,xN⩽sN}F(s_1,\ldots,s_N) = \PP\{ x_1 \leq s_1, \ldots, x_N \leq s_N\}, or, in vector notation,

F(s)=P{x⩽s}(s∈RN)F(\bolds) = \PP\{\boldx \leq \bolds\} \qquad (\bolds \in \RR^N)

It follows from (5.4) that when the distribution PP of x\boldx is absolutely continuous, there exists a nonnegative function pp on RN\RR^N satisfying

∫Bp(s) ⁣ds=P{x∈B}(B∈B(RN))\int_B p(\bolds) \diff \bolds = \PP\{\boldx \in B\} \qquad (B \in \bB(\RR^N))

Here ∫B\int_B is a multivariate integral over the region BB. The function pp is called either the density or joint density of x\boldx. For (5.8) to hold, it suffices that

∫−∞sN⋯∫−∞s1p(t1,…,tN) ⁣dt1⋯ ⁣dtN=F(s1,…,sN)\int_{-\infty}^{s_N} \cdots \int_{-\infty}^{s_1} p(t_1,\ldots,t_N) \diff t_1 \cdots \diff t_N = F(s_1,\ldots,s_N)

for all sn∈Rs_n \in \RR, n=1,…,Nn=1,\ldots, N.

5.1.3.1Joint versus Marginal

If x=(x1,…,xN)\boldx = (x_1,\ldots, x_N) is a random vector in RN\RR^N, then each xnx_n is a random variable on R\RR. Let Pn=L(xn)P_n = \lL(x_n), so that

Pn(B)=P{xn∈B}(B∈B(R),  n=1,…,N)P_n(B) = \PP \{x_n \in B \} \qquad (B \in \bB(\RR), \; n = 1, \ldots, N)

This is of course the marginal distribution relative to the joint distribution of x\boldx, as introduced in Section 5.1.2.1. In this context it is called the marginal distribution of xnx_n in order to distinguish it from the (joint) distribution of x\boldx. From a mathematical perspective, the marginal distribution of xnx_n and the distribution of xnx_n are identical.

If P1=P2=⋯=PNP_1 = P_2 = \cdots = P_N, then we say that x1,…,xNx_1, \ldots, x_N are identically distributed.

5.1.3.2Gaussian Random Vectors

Let zz be standard normal on R\RR. A random variable xx is said to be normally distributed if x=μ+σzx = \mu + \sigma z for some σ⩾0\sigma \geq 0, and we write L(x)=N(μ,σ)\lL(x) = \nN(\mu, \sigma). Here we explicitly allow the possibility that σ=0\sigma = 0, in which case var⁡[x]=0\var[x] =0 and P{x=μ}=1\PP\{x = \mu\} = 1.

A random vector x\boldx in RN\RR^N is called multivariate normal or multivariate Gaussian if there exists a K×1K \times 1 standard normal random vector z\boldz, an N×KN \times K matrix C\boldC and an N×1N \times 1 vector μ\boldmu such that

x=μ+Cz\boldx = \boldmu + \boldC \boldz

Once again we explicitly allow degenerate cases, since they occur frequently in statistics. If x\boldx is multivariate normal, then we write L(x)=N(μ,Σ)\lL(\boldx ) = \nN(\boldmu, \boldSigma), where

μ:=E xandΣ:=var⁡x\boldmu := \EE \boldx \quad \text{and} \quad \boldSigma := \var \boldx

In the case of (5.11) we have Σ=CC⊺\boldSigma = \boldC\boldC^\T. See fact 5.1.2.

Be aware that L(x)=N(μ,Σ)\lL(\boldx) = \nN(\boldmu, \boldSigma) does not imply that x\boldx has the multivariate normal density in (5.6). The reason is that the distribution of x\boldx can fail to be absolutely continuous. For example, if C=0\boldC = \boldzero in (5.11), then x\boldx puts all mass on a single point in RN\RR^N. Without absolute continuity, no density representation can exist.

Absolute continuity of the distribution of x\boldx coincides with the setting where Σ:=var⁡x\boldSigma := \var \boldx is nonsingular. (Perhaps because of this, the scenario where a random vector has a density is sometimes called the "nonsingular case" by econometricians.) For x\boldx defined in (5.11), nonsingularity of Σ\boldSigma will be true if and only if C⊺\boldC^\T has full column rank (see ex. 3.5.28).

One corollary of fact 5.1.5 is that if x=(x1,…,xN)\boldx = (x_1, \ldots, x_N) is multivariate normal, then the marginal distribution of xnx_n is univariate normal. This can be seen by taking a=en\bolda = \bolde_n in part (i). In fact the rule in part (ii) implies that

L(xn)=L(en⊺x)=N(en⊺ μ,en⊺Σen)=N(μn,σn2)\lL(x_n) = \lL(\bolde_n^\T \boldx) = \nN(\bolde_n^\T \, \boldmu, \bolde_n^\T \boldSigma \bolde_n) = \nN(\mu_n, \sigma^2_n)

where σn2\sigma^2_n is the n,nn,nth element of Σ\boldSigma.

Here’s a common exam question: Is it true that the joint distribution of NN univariate normal random variables is always multivariate normal? The answer is no. A counterexample is given in Section 5.1.5. See also fact 5.1.14 below.

5.1.3.3Expectations from Distributions

Let h ⁣:RN→Rh \colon \RR^N \to \RR be any B\bB-measurable function and let PP be a distribution on RN\RR^N. In Section 4.2.3 we saw that one can assign meaning to the expression ∫h(s)P( ⁣ds)\int h(s) P(\diff s) by treating hh as a random variable on (R,B(R),P)(\RR, \bB(\RR), P) and taking its expectation. We can do exactly the same thing in RN\RR^N, with hh now regarded as a random variable on (RN,B(RN),P)(\RR^N, \bB(\RR^N), P). Its expectation will be written as

EP h:=:∫h(s)P( ⁣ds)\EEP h :=: \int h(\bolds) P(\diff \bolds)

Here’s a multivariate version of fact 4.2.3:

The right-hand side of (5.15) should be understood as

∫−∞∞⋯∫−∞∞h(s1,…,sN) p(s1,…,sN)  ⁣ds1⋯ ⁣dsN\int_{-\infty}^\infty \cdots \int_{-\infty}^\infty h(s_1, \ldots, s_N) \, p(s_1,\ldots,s_N) \, \diff s_1 \cdots \diff s_N

In Section 4.2.5 we saw that expectations of functions of random variables can be computed from their distributions. The same is true for functions of random vectors. In particular, suppose that we want to compute E h(x)\EE h(\boldx), where h ⁣:RN→Rh \colon \RR^N \to \RR is B\bB-measurable. We can do this either by evaluating the expectation of h(x)h(\boldx) on the original probability space (Ω,F,P)(\Omega, \fF, \PP), or we can take the distribution PP of x\boldx and compute the expectation of hh on (RN,B(RN),P)(\RR^N, \bB(\RR^N), P). This is formalized in the following extension to fact 4.2.8.

As in the univariate case, this means that objects like moments are properties of the distribution. For example, let x\boldx be a random vector in RK\RR^K with L(x)=P\lL(\boldx) = P. The variance–covariance matrix var⁡[x]\var [\boldx] of x\boldx has i,ji,jth element E [xixj]−E [xi]E [xj]\EE [x_i x_j] - \EE[x_i]\EE[x_j]. We can write this in terms of PP. In particular, if

ΣP=(σij)whereσij:=∫(sisj)P( ⁣ds)−∫siP( ⁣ds)⋅∫sjP( ⁣ds)\boldSigma_P = (\sigma_{ij}) \quad \text{where} \quad \sigma_{ij} := \int (s_i s_j) P(\diff \bolds) - \int s_i P(\diff \bolds) \cdot \int s_j P(\diff \bolds)

then ΣP=var⁡[x]\boldSigma_P = \var[\boldx].

5.1.4Independence

A collection of NN random variables x1,…,xNx_1, \ldots, x_N is said to be independent if

P⋂n=1N{xn∈Bn}=∏n=1NP{xn∈Bn}\PP \bigcap_{n=1}^N \{x_n \in B_n\} = \prod_{n=1}^N \PP\{x_n \in B_n\}

for any B1,…,BNB_1, \ldots, B_N, where each BnB_n is a Borel subset of R\RR. In view of the definition of independence of events, the random variables x1,…,xNx_1, \ldots, x_N are independent precisely when sets of the form {x1∈B1},…,{xN∈BN}\{x_1 \in B_1\}, \ldots, \{x_N \in B_N\} are independent events.

An infinite set of random variables {xn}n=1∞\{x_n\}_{n=1}^{\infty} is called independent if any finite subset of {xn}n=1∞\{x_n\}_{n=1}^{\infty} is independent in the sense of the preceding definition. We use the abbreviation IID for collections of random variables that are both independent and identically distributed. If we state that {xn}n=1∞\{x_n\}_{n=1}^{\infty} are IID copies of xx, we mean that the random variables {xn}n=1∞\{x_n\}_{n=1}^{\infty} are IID with the same distribution as xx.

There are a number of equivalent ways that we can rephrase the definition of independence. Since ∩n=1N{xn∈Bn}={(x1,…,xN)∈B1×⋯×BN}\cap_{n=1}^N \{x_n \in B_n\} = \{ (x_1, \ldots, x_N) \in B_1 \times \cdots \times B_N \}, a direct translation of (5.17) using (5.7) and (5.10) gives

P(B1×⋯×BN)=∏n=1NPn(Bn)P(B_1 \times \cdots \times B_N) = \prod_{n=1}^N P_n(B_n)

Here PP is the joint distribution of x=(x1,…,xN)\boldx = (x_1, \ldots, x_N) and PnP_n is its nnth marginal. Thus, the elements of a random vector are independent if and only if their joint distribution equals the product distribution formed from their marginals (see fact 5.1.4).

The left- and right-hand sides of (5.18) agree for all B1,…,BNB_1, \ldots, B_N if they agree on certain families of sets, like the rectangles discussed in Section 5.1.2. For this reason a necessary and sufficient condition for independence of x1,…,xNx_1, \ldots, x_N is

F(s1,…,sN)=∏n=1NFn(sn)F(s_1,\ldots,s_N) = \prod_{n=1}^N F_n(s_n)

for all (s1,…,sN)∈RN(s_1, \ldots, s_N) \in \RR^N, where FF is the CDF of x\boldx and F1,…,FNF_1, \ldots, F_N are the marginal CDFs. If the distribution of x\boldx is absolutely continuous we can also test independence via its density:

The next fact is true in general but most easily verified in the density case, where you can apply (5.15) and fact 5.1.8.

The definition of independence of random vectors is almost identical to the scalar case. Random vectors x1,…,xN\boldx_1, \ldots, \boldx_N in RK\RR^K are called independent if

P⋂n=1N{xn∈Bn}=∏n=1NP{xn∈Bn}\PP \bigcap_{n=1}^N \{\boldx_n \in B_n\} = \prod_{n=1}^N \PP\{\boldx_n \in B_n\}

for any B1,…,BNB_1, \ldots, B_N, where each BnB_n is a Borel subset of RK\RR^K.

To see why, observe that fn(xn)∈Bnf_n(\boldx_n) \in B_n if and only if xn∈f−1(Bn)\boldx_n \in f^{-1}(B_n), as follows from the definition of preimage of a set (see Section 15.2). This leads to

⋂n=1N{fn(xn)∈Bn}=⋂n=1N{xn∈f−1(Bn)}\bigcap_{n=1}^N \{f_n(\boldx_n) \in B_n\} = \bigcap_{n=1}^N \{\boldx_n \in f^{-1}(B_n)\}

Applying independence of x1,…,xN\boldx_1, \ldots, \boldx_N now gives

P⋂n=1N{fn(xn)∈Bn}=∏n=1NP{xn∈f−1(Bn)}=∏n=1NP{fn(xn)∈Bn}\PP \bigcap_{n=1}^N \{f_n(\boldx_n) \in B_n\} = \prod_{n=1}^N \PP \{\boldx_n \in f^{-1}(B_n)\} = \prod_{n=1}^N \PP \{f_n(\boldx_n) \in B_n\}

This completes the proof of fact 5.1.10.

Note that the converse is not true: one can construct examples of dependent random variables with zero covariance. However,

We already proved a simple version of this in example 5.1.4. A full proof can be put together using the theory of characteristic functions (see, e.g., ch. 5 of Gut (2009)). Below are two useful related results. The first one links orthogonal projection and multivariate Gaussians (ex. 5.4.11 requests a proof).

This last fact is important because sums of arbitrary normals are not always normal. What is required is a multivariate normal distribution. Fact 5.1.14 works because independence pins down the joint distribution as multivariate normal. In particular, L(w1,…,wN)=N(μ,Σ)\lL(w_1, \ldots, w_N) = \nN(\boldmu, \boldSigma) where en⊺ μ=μn\bolde_n^\T \, \boldmu = \mu_n and Σ=diag⁡(σ12,…,σN2)\boldSigma = \diag(\sigma_1^2, \ldots, \sigma_N^2). The expression for the variance in fact 5.1.14 follows from fact 4.1.10.

5.1.5Copulas

A copula CC on RN\RR^N is a multivariate CDF supported on the unit hypercube [0,1]N[0, 1]^N with the property that all its marginals are uniform on [0,1][0, 1]. In other words, CC is a function of the form

C(s1,…,sN)=P{u1⩽s1,…,uN⩽sN}C(s_1, \ldots, s_N) = \PP \{u_1 \leq s_1, \ldots, u_N \leq s_N\}

where 0⩽sn⩽10 \leq s_n \leq 1 and L(un)=U[0,1]\lL(u_n) = U[0, 1] for all nn. There are many possible copulas because, while each unu_n has its marginal distribution pinned down, there are infinitely many ways to specify the joint distribution.

One reason that copulas are useful is that we can take univariate CDFs F1,…,FNF_1, \ldots, F_N and a copula CC and create a multivariate CDF on RN\RR^N via

F(s1,…,sN)=C(F1(s1),…,FN(sN))(sn∈R, n=1,…,N)F(s_1, \ldots, s_N) = C(F_1(s_1), \ldots, F_N(s_N)) \qquad \quad (s_n \in \RR, \, n=1, \ldots, N)

The benefit of creating a multivariate CDF using this two step procedure is that in specifying a multivariate distribution we can separate out specification of the marginals, which give probabilities for isolated coordinates, and specification of the joint distribution, which defines the interactions.

How rich is the set of multivariate CDFs we can create via (5.22)? It is universal. This is one part of a well-known theorem due to Sklar (1959):

Copulas can be used to clarify a point raised in Section 5.1.3.2: normal marginals are not sufficient for the multivariate normal property. If F1,…,FNF_1, \ldots, F_N are univariate normal, then C(F1(s1),…,FN(sN))C(F_1(s_1), \ldots, F_N(s_N)) will equal the multivariate normal CDF for one choice of copula, called the Gaussian copula. Other choices lead to different distributions. Figure 5.5 gives an illustration where the top two distributions are multivariate normal and the bottom two are created by pairing the Clayton copula with univariate normal marginals. The distributions are represented as densities.

Bivariate Gaussian (top) and non-Gaussian (bottom)

Figure 5.5:Bivariate Gaussian (top) and non-Gaussian (bottom)

A related point is that while linear combinations of normal random variables are often thought to be normal, this isn’t true unless the original random variables are multivariate normal (cf., fact 5.1.5) or independent (which is a special case of multivariate normal). As an example, figure 5.6 shows a histogram of draws from w=x−yw = x-y when (x,y)(x,y) is distributed according to the density in the lower right panel of figure 5.5. For comparison, a normal density with the same mean and standard deviation is plotted.

5.1.6Properties of Named Distributions

Here are some useful facts relating independence and certain common distributions.

Normality is not necessarily preserved under linear transformations

Figure 5.6:Normality is not necessarily preserved under linear transformations

Let’s note some facts connecting chi-squared and normal random variables. First, if L(x)=N(0,1)\lL(x) = \nN(0, 1), then L(x2)=χ2(1)\lL(x^2) = \chi^2(1). Exercise 5.4.4 asks you to prove this. Second, if a collection of standard normals are independent, then so are their squares (fact 5.1.10). Combining this result with fact 5.1.15 gives

The next result generalizes fact 5.1.18 and crops up frequently in statistics.

We can obtain fact 5.1.19 from fact 5.1.18 as follows. Since A\boldA is symmetric, we use the spectral decomposition theorem to write it as A=QΛQ⊺\boldA = \boldQ \boldLambda \boldQ^\T, where Q\boldQ is an orthogonal matrix and Λ=diag⁡(λ1,…,λN)\boldLambda = \diag(\lambda_1, \ldots, \lambda_N) with λn:=\lambda_n := the nnth eigenvalue of A\boldA. Setting y:=Q⊺z\boldy := \boldQ^\T \boldz, we have

z⊺Az=z⊺QΛQ⊺z=y⊺Λy=∑n=1Nλnyn2\boldz^\T \boldA \boldz = \boldz^\T \boldQ \boldLambda \boldQ^\T \boldz = \boldy^\T \boldLambda \boldy = \sum_{n=1}^N \lambda_n y_n^2

By exercise 3.5.35, idempotence of A\boldA implies all eigenvalues lie in {0,1}\{0, 1\}. By fact 3.2.7, the number of nonzero eigenvalues is equal to trace⁡A\trace \boldA. It follows that z⊺Az\boldz^\T \boldA \boldz is the sum of yn2y^2_n over K:=trace⁡AK := \trace \boldA nonzero terms. By fact 5.1.18, a random variable with this property is χ2(K)\chi^2(K) whenever y\boldy is standard normal. Combining L(z)=N(0,I)\lL(\boldz) = \nN(\boldzero, \boldI) and fact 5.1.5, we have L(y)=N(0,Q⊺Q)\lL(\boldy) = \nN(\boldzero, \boldQ^\T\boldQ). But Q\boldQ is an orthogonal matrix, so Q⊺Q=I\boldQ^\T\boldQ = \boldI.

5.2Conditioning and Expectation

Conditional expectation is one of the most important concepts in both economic theory and econometrics. This section gives a construction of expectation based around projection, which, in my view, is more intuitive and rewarding than both the elementary treatments using conditional distributions and the advanced treatments using Radon–Nykodym derivatives. The construction begins by formalizing the concepts of information and conditioning. We then build on our knowledge of orthogonal projection from Section 3.3 to frame conditional expectation as optimal prediction given limited information.

5.2.1Conditional Distributions

Let’s briefly discuss conditional distributions, focusing on the density case. Let x1x_1 and x2x_2 be random variables. The conditional density of x2x_2 given x1=s1x_1 = s_1 is defined as

p(s2 ∣ s1):=p(s1,s2)p(s2)p(s_2 \given s_1) := \frac{p(s_1, s_2)}{p(s_2)}

whenever the denominator is nonzero. Here pp stands in for either joint, marginal, or conditional density, with the type determined by the argument. (For example, p(si)p(s_i) is the marginal density of xix_i evaluated at sis_i.)

The law of total probability extends to the density case as follows: If (x1,x2)(x_1, x_2) is a random vector on R2\RR^2, then

p(s2)=∫−∞∞p(s2 ∣ s1)p(s1) ⁣ds1(s2∈R)p(s_2) = \int_{-\infty}^{\infty} p(s_2 \given s_1) p(s_1) \diff s_1 \qquad \qquad (s_2 \in \RR)

To see this, fix s2∈Rs_2 \in \RR and integrate the joint density to get the marginal, giving

p(s2)=∫−∞∞p(s1,s2) ⁣ds1p(s_2) = \int_{-\infty}^{\infty} p(s_1, s_2) \diff s_1

Combining this result with p(s2 ∣ s1)=p(s1,s2)/p(s1)p(s_2 \given s_1) = p(s_1, s_2)/p(s_1) yields (5.24). Bayes’ law also extends to the density case, giving

p(s2 ∣ s1)=p(s1 ∣ s2)p(s2)p(s1)p(s_2 \given s_1) = \frac{p(s_1 \given s_2) p(s_2)}{p(s_1)}

The same ideas extend to additional arguments in a natural way. For example, the conditional density of xk+1,…,xNx_{k+1},\ldots, x_N given x1=s1,…,xk=skx_1 = s_1,\ldots, x_k = s_k is defined by

p(sk+1,…,sN ∣ s1,…,sk)=p(s1,…,sN)p(s1,…,sk)p(s_{k+1},\ldots,s_N \given s_1,\ldots,s_k) = \frac{p(s_1,\ldots,s_N)}{p(s_1,\ldots,s_k)}

Rearranging this expression, we obtain a useful decomposition of the joint density:

p(s1,…,sN)=p(sk+1,…,sN ∣ s1,…,sk)p(s1,…,sk)p(s_1,\ldots,s_N) = p(s_{k+1},\ldots,s_N \given s_1,\ldots,s_k) p(s_1,\ldots,s_k)

5.2.2The Space L2L_2

Suppose we want to predict random variable yy using another variable xx. In this case we should choose xx such that xx and yy are expected to be close under most realizations of uncertainty. But what does "expected to be close" mean?

Perhaps the most common measure of distance between random variables is mean squared error (MSE), which is defined in this case as E [(x−y)2]\EE [ (x - y)^2 ]. We met this concept previously in the linear prediction problem of Section 4.1.5. A common variation on MSE is root mean squared error, which, as the name suggests, is defined as

∥x−y∥:=E [(x−y)2]\| x - y \| := \sqrt{ \EE [ (x - y)^2 ] }

On the right-hand side of (5.28) we have a measure of distance between random variables. On the left-hand side we have used the same symbol as we used for Euclidean norm distance between two vectors. This is both deliberate and conventional, as there are many parallels between ordinary vector space with the Euclidean norm and the set of random variables combined with the "norm" defined in (5.28). Let’s now clarify and formalize these ideas.

The first geometric concept we defined for vectors was inner product. Analogously, we define here the inner product between two random variables xx and yy as

⟨x,y⟩:=E [xy]\inner{x, y} := \EE[xy]

Of course we want this definition to make sense, and the Cauchy–Schwarz inequality for random variables tells us that E [xy]\EE[xy] will be finite and well-defined whenever xx and yy both have finite second moments. Hence we restrict attention to this set, which is commonly denoted L2L_2. That is,

L2:={ all random variables x on (Ω,F,P) with E [x2]<∞}L_2 := \{ \text{ all random variables } x \text{ on } (\Omega, \fF, \PP) \text{ with } \EE [x^2] < \infty \}

Here’s a list of some of the ways that L2L_2 inner product is similar to the Euclidean inner product on RN\RR^N.

If you compare fact 5.2.1 with fact 2.1.1 you’ll see that the correspondence is essentially one-to-one. The properties in fact 5.2.1 follow from the definition of the inner product and linearity of E \EE (see fact 4.1.5).

Analogous to the Euclidean vector norm, we define the L2L_2 norm by

∥x∥:=⟨x,x⟩:=E [x2](x∈L2)\| x \| := \sqrt{ \inner{x, x} } := \sqrt{ \EE[x^2] } \qquad (x \in L_2)

From this norm we get a notion of distance ∥x−y∥\|x - y\| between random variables that agrees with the notion of root MSE in (5.28). As with inner product, the properties of the L2L_2 norm and vector norm are largely identical. (Compare the following with fact 2.1.2.)

Point (i) requires a clarification, which is given below. Property (ii) is immediate from (5.30) and the linearity of E \EE. Property (iii) is called the triangle inequality, as in the vector case. Property (iv) is just the Cauchy–Schwarz inequality, restated in new notation. As in the vector case, the triangle inequality can be proved from the Cauchy–Schwarz inequality. For a proof, see exercise 5.4.15.

Returning to (i), it isn’t true that ∥x∥=0\| x \| = 0 implies x(ω)=0x(\omega) = 0 for all ω∈Ω\omega \in \Omega. What we can say is that if ∥x∥=0\| x \| = 0 then P{x=0}=1\PP\{x =0\} =1 (see, e.g., Williams (1991), §5.2). If we agree not to distinguish between random variables that only differ with zero probability, then (i) is valid. This is the standard convention when dealing with L2L_2.

5.2.2.1Linear Subspaces in L2L_2

From (ii) and (iii) of fact 5.2.2, we see that if α,β∈R\alpha, \beta \in \RR and x,y∈L2x, y \in L_2, then αx+βy\alpha x + \beta y also has finite norm, and is therefore in L2L_2. More generally, any linear combination

α1x1+⋯αKxK,αk∈R,  xk∈L2\alpha_1 x_1 + \cdots \alpha_K x_K, \qquad \alpha_k \in \RR, \; x_k \in L_2

is again in L2L_2. As in the vector case (see Section 2.1.2), when XX is a subset of L2L_2, the set of finite linear combinations that can be formed from elements of XX is called the span of XX, and denoted by span⁡X\Span X.

A subset SS of L2L_2 is called a linear subspace of L2L_2 if it is closed under addition and scalar multiplication. That is, for each x,y∈Sx, y \in S and α,β∈R\alpha, \beta \in \RR, we have αx+βy∈S\alpha x + \beta y \in S.

As in RN\RR^N, an orthonormal basis of a linear subspace SS of L2L_2 is a set {u1,…,uK}⊂S\{u_1, \ldots, u_K\} \subset S with the property that

⟨uj,uk⟩=1 ⁣ ⁣1{j=k}andspan⁡{u1,…,uK}=S\inner{u_j, u_k} = \1\{j = k\} \quad \text{and} \quad \Span\{u_1, \ldots, u_K\} = S

5.2.3Projections in L2L_2

Given that inner products and norms in L2L_2 share so many properties with their Euclidean cousins, it’s not surprising that many results about RN\RR^N carry over to L2L_2. Often we can just lift the proofs across with barely a change to notation. We know a great deal about vectors and Euclidean space, so this process yields many insights about random variables. Let’s illustrate this in the context of orthogonal projection.

As in the Euclidean case, if ⟨x,y⟩=0\inner{x,y}=0, then we say that xx and yy are orthogonal, and write x⊥yx \perp y. This terminology is used frequently in econometrics. Its importance stems partly from the next fact, the proof of which is a short exercise.

Now consider the following problem. Given y∈L2y \in L_2 and linear subspace S⊂L2S \subset L_2, we seek the closest element y^\hat y of SS to yy. Closeness is in terms of L2L_2 norm, so y^\hat y is the minimizer of ∥y−z∥\| y - z \| over all z∈Sz \in S. That is, we seek

y^=argmin⁡z∈S∥y−z∥=argmin⁡z∈SE [(y−z)2]\hat y = \argmin_{z \in S} \|y - z\| = \argmin_{z \in S} \sqrt{\EE [ (y - z)^2 ]}

The next theorem mimics theorem 2.2.1. A nice treatment that covers the current setting can be found in chapter 2 of Cheney (2001).

The statement that SS is closed means that {xn}⊂S\{x_n \} \subset S and x∈L2x \in L_2 with ∥xn−x∥→0\| x_n - x \| \to 0 implies x∈Sx \in S. This condition is true for all the linear subspaces we want to work with.

Analogous with the case of RN\RR^N, the random variable y^\hat y in theorem 5.2.1 is called the orthogonal projection of yy onto SS. Holding SS fixed, we can think of the operation

y  ↦ the orthogonal projection of y onto Sy \; \mapsto \text{ the orthogonal projection of } y \text{ onto } S

as a function from L2L_2 to L2L_2. The function will be denoted by P\boldP, so that, for each y∈L2y \in L_2, the symbol Py\boldP y represents the image of yy under P\boldP, which is the orthogonal projection y^\hat y. As before, P\boldP is called the orthogonal projection onto SS, and we write P=proj⁡S\boldP = \proj S. Since Py\boldP y solves (5.32), we can and do interpret Py\boldP y as the best predictor of yy from within the collection of random variables contained in SS.

Compare with theorem 2.2.2. In (i), the statement that P\boldP is linear means that P(αx+βy)=αPx+βPy\boldP(\alpha x + \beta y) = \alpha \boldP x + \beta \boldP y for all x,y∈L2x, y \in L_2 and α,β∈R\alpha,\beta \in \RR.

The next two results are L2L_2 versions of fact 2.2.7 and fact 2.2.6 respectively. The proofs are essentially the same.

5.2.3.1Population Regression

Let’s consider an extension of the best linear prediction problem of example 5.2.6 to a more general setting, where the information for predicting yy is a random vector x\boldx in RK\RR^K. As before, prediction will be linear, with the aim of minimizing squared error. Hence the object we seek is the L2L_2 orthogonal projection of yy onto the linear subspace

span⁡{x}:= all random variables of the form x⊺b for some b∈RK\Span\{\boldx\} := \text{ all random variables of the form } \boldx^\T \boldb \text{ for some } \boldb \in \RR^K

To make sure that span⁡{x}⊂L2\Span\{\boldx\} \subset L_2, we will assume that E [x⊺x]<∞\EE[ \boldx^\T \boldx] < \infty.

Exercise 5.4.16 asks you to prove this. Positive definiteness of E [xx⊺]\EE[\boldx \boldx^\T] ensures invertibility, without which the vector b∗\boldb^* is not uniquely defined (see ex. 3.5.34). Note that, by the definition of orthogonal projections, b∗\boldb^* necessarily satisfies

b∗=argmin⁡a∈RKE [(y−x⊺a)2]\boldb^* = \argmin_{\bolda \in \RR^K} \EE[ (y - \boldx^\T \bolda)^2 ]

The linear prediction problem considered here is also called population linear regression. The "population" qualifier is because we are using the true joint distribution of (x,y)(\boldx, y) when we compute expectations. Population regression has a sample counterpart called multivariate linear regression, based on observations of (x,y)(\boldx, y). We will discuss it at length in chapter 11.

5.2.4Measurability

While the use of projections to obtain best linear predictors in example 5.2.6 and fact 5.2.7 is elegant and useful, we don’t always want to constrain ourselves to linear predictions. To drop the linearity requirement, we change the linear subspaces used for projection from the set of linear functions of x\boldx to the set of arbitrary functions of x\boldx. As we now show, the best predictor that results is exactly the conditional expectation with respect to x\boldx.

The key to this process is defining the subspace to project onto. In the language of probability, the subspace of arbitrary real-valued functions of x\boldx is called the x\boldx-measurable functions. Let’s take these ideas one step at a time, starting with the notion of measurability with respect to information sets.

Let G:={x1,…,xD}\gG := \{x_1, \ldots, x_D\} be any set of random variables and let zz be any other random variable. The variable zz is said to be G\gG-measurable if there exists a B\bB-measurable function g ⁣:RD→Rg \colon \RR^D \to \RR such that

z=g(x1,…,xD)z = g(x_1, \ldots, x_D)

As usual, this equality between random variables should be interpreted pointwise, so the more explicit version is

z(ω)=g(x1(ω),…,xD(ω))for all ω∈Ωz(\omega) = g(x_1(\omega), \ldots, x_D(\omega)) \qquad \text{for all } \omega \in \Omega

In this context, G\gG is sometimes referred to as the information set. When convenient we’ll also write x=(x1,…,xD)\boldx = (x_1, \ldots, x_D) and say that zz is x\boldx-measurable. Similar terminology will be used for scalars and matrices. For example, if X\boldX is a random matrix, then X\boldX-measurability means G\gG-measurability when G\gG lists all elements of X\boldX.

The intuitive meaning of G\gG-measurability of zz is that zz is completely determined by the elements in G\gG. Imagine it like this: When uncertainty is realized, some ω\omega is selected from Ω\Omega. We don’t get to view ω\omega itself, but we do get to observe the realized values x1(ω),…,xD(ω)x_1(\omega), \ldots, x_D(\omega) on the right-hand side of (5.36). If zz is G\gG-measurable, we can now calculate the realized value z(ω)z(\omega) of zz, even without knowing ω\omega.

If xx and yy are known given the information in G\gG, then a third random variable that depends only on xx and yy is likewise known given G\gG. Hence G\gG-measurability is preserved under the taking of sums, products, and so on. In particular,

Suppose now that G⊂L2\gG \subset L_2, which just means that all the random variables in G\gG have finite second moment. Consider the set

L2(G):={all G-measurable random variables in L2}L_2(\gG) := \{ \text{all } \gG \text{-measurable random variables in } L_2 \}

In view of fact 5.2.8, we have the following result:

This furnishes us with a subspace to project onto, allowing us to define conditional expectations. But before we do so let’s cover ordering of information sets by set inclusion.

This is intuitive: If zz is known once the variables in G\gG are known, then it is certainly known when the extra information provided by H\hH is available.

The next result is immediate from fact 5.2.10.

Incidentally, most advanced probability texts give a definition of G\gG-measurability framed in terms of σ\sigma-algebras. This is necessary if you wish to work through all related proofs. But the definition given here is equivalent and intuitive. See theorem 4.4 of Çinlar (2011) if you wish to learn more.

5.2.5Conditional Expectation

Now it’s time to define conditional expectations. Let G⊂L2\gG \subset L_2 and yy be some random variable in L2L_2. The conditional expectation of yy given G\gG is written as E [y ∣ G]\EE[ y \given \gG] or E G[y]\EE^{\gG} [y], and defined as the closest G\gG-measurable random variable to yy. More formally,

E [y ∣ G]:=argmin⁡z∈L2(G)∥y−z∥\EE [y \given \gG] := \argmin_{z \in L_2(\gG)} \| y - z \|

This definition makes sense. Our understanding of the conditional expectation E [y ∣ G]\EE[y \given \gG] is that it is the best predictor of yy given the information contained in G\gG. The definition in (5.37) says the same thing. It simultaneously restricts E [y ∣ G]\EE [y \given \gG] to be G\gG-measurable, so we can actually compute it once the variables in G\gG are realized, and selects E [y ∣ G]\EE [y \given \gG] as the closest such variable to yy in terms of RMSE.

But does the minimizer generally exist? And is it unique? The answer to both questions is yes. Comparing (5.37) and (5.32), we see that

E [y ∣ G]=Pywhen P:=proj⁡L2(G)\EE[ y \given \gG] = \boldP y \quad \text{when } \boldP := \proj L_2(\gG)

By theorem 5.2.1, the projection exists and is unique. Theorem 5.2.1 also characterizes E [y ∣ G]\EE[y \given \gG] as the unique point y^\hat y in L2L_2 such that

y^∈L2(G)andy−y^⊥z   for all z∈L2(G)\hat y \in L_2(\gG) \quad \text{and} \quad y - \hat y \perp z \; \text{ for all } z \in L_2(\gG)

Rewriting these conditions in a slightly different way, we can give an alternative (and equivalent) definition of conditional expectation: y^∈L2\hat y \in L_2 is the conditional expectation of yy given G\gG if

  1. y^\hat y is G\gG-measurable and

  2. E [y^ z]=E [yz]\EE[\hat y \, z] = \EE[yz] for all G\gG-measurable z∈L2z \in L_2.

When convenient we’ll also use symbols like E [y ∣ x1,…,xD]\EE[ y \given x_1, \ldots, x_D] or E [y ∣ x]\EE[y \given \boldx]. These are the same as E [y ∣ G]\EE[y \given \gG] when G\gG is defined as the information set containing the variables we condition on.

This is obvious because E [y ∣ x]\EE[y \given \boldx] is by definition x\boldx-measurable. A prediction of yy given x\boldx has to be a deterministic function of x\boldx. The particular function f∗f^* satisfying f∗(x)=E [y ∣ x]f^*(\boldx) = \EE[y \given \boldx] is called the regression function of yy given x\boldx. It is, by construction, the best predictor of yy given x\boldx in terms of mean squared error.

The next example shows that when xx and yy are linked by a conditional density, then our definition of conditional expectation reduces to the one seen in elementary probability texts. The proof of the claim in the example is the topic of exercise 5.4.23.

Here are some goodies we can harvest using the fact that E [⋅ ∣ G]=proj⁡L2(G)\EE[\cdot \given \gG] = \proj L_2(\gG).

Some of these claims are given as solved exercises. Others follow directly from the definition and from the properties of projections. For example, in (iv) we are saying that if y∈L2(G)y \in L_2(\gG), then yy is projected into itself. This is immediate from (vi) in fact 5.2.4.

Part (ii) is called the the law of iterated expectations. The law follows from the property of orthogonal projections given in fact 2.2.7: Projecting onto the bigger subspace L2(H)L_2(\hH) and from there onto L2(G)L_2(\gG) is the same as projecting directly onto the smaller subspace L2(G)L_2(\gG).

Part (v) is called conditional determinism. It says that if xx is known given G\gG then we can treat it as a constant in the conditional expectation.

5.2.5.1Conditional Expectations and Prediction

To recap, given y∈L2y \in L_2 and random vector x\boldx in RD\RR^D, the conditional expectation E [y ∣ x]\EE[y \given \boldx] is a function f∗f^* of x\boldx, called the regression function of yy given x\boldx, such that f∗(x)f^*(\boldx) is the best predictor of yy in terms of MSE. In other words,

f∗=argmin⁡g∈GE [(y−g(x))2]f^* = \argmin_{g \in G} \EE[ (y - g(\boldx))^2 ]

where GG is the functions from RD\RR^D to R\RR with g(x)∈L2g(\boldx) \in L_2. In fact a more explicit result can be obtained: For any g∈Gg \in G, we have

E [(y−g(x))2]=E [(y−f∗(x))2]+E [(f∗(x)−g(x))2]\EE [ (y - g(\boldx))^2 ] = \EE [ (y - f^*(\boldx) )^2 ] + \EE[ (f^*(\boldx) - g(\boldx))^2 ]

This implies (5.38) because (f∗(x)−g(x))2⩾0(f^*(\boldx) - g(\boldx))^2 \geq 0.

To prove (5.39), let f∗f^* be the regression function, pick any g∈Gg \in G and observe that

(y−g(x))2=(y−f∗(x)+f∗(x)−g(x))2=(y−f∗(x))2+2(y−f∗(x))(f∗(x)−g(x))+(f∗(x)−g(x))2\begin{aligned} (y - g(\boldx))^2 & = (y - f^*(\boldx) + f^*(\boldx) - g(\boldx))^2 \\ & = (y - f^*(\boldx) )^2 + 2(y - f^*(\boldx))(f^*(\boldx) - g(\boldx)) + (f^*(\boldx) - g(\boldx))^2 \end{aligned}

Consider the expectation of the cross-product term. From the law of iterated expectations,

E {(y−f∗(x))(f∗(x)−g(x))}=E { E [(y−f∗(x))(f∗(x)−g(x)) ∣ x] }\EE \{ (y - f^*(\boldx)) (f^*(\boldx) - g(\boldx)) \} = \EE \{ \, \EE[ (y - f^*(\boldx)) (f^*(\boldx) - g(\boldx)) \given \boldx ]\, \}

Using conditional determinism we can rewrite the term inside the curly brackets on the right-hand side of (5.40) as (f∗(x)−g(x))E [(y−f∗(x)) ∣ x](f^*(\boldx) - g(\boldx)) \EE[ (y - f^*(\boldx)) \given \boldx ]. For the second term in this product we have

E [y−f∗(x) ∣ x]=E [y ∣ x]−E [f∗(x) ∣ x]=E [y ∣ x]−f∗(x)=0\EE[ y - f^*(\boldx) \given \boldx] = \EE[ y \given \boldx] - \EE[ f^*(\boldx) \given \boldx] = \EE[ y \given \boldx] - f^*(\boldx) = 0

Hence the expectation in (5.40) is zero. Equation (5.39) now follows.

5.2.6The Vector Case

Conditional expectations of random matrices are defined using the notion of conditional expectations for scalar random variables. For example, given random matrices X\boldX and Y\boldY, we set

E [Y ∣ X]:=(E [y11 ∣ X]⋯E [y1K ∣ X]⋮⋮E [yN1 ∣ X]⋯E [yNK ∣ X])\EE [\boldY \given \boldX] := \left( \begin{array}{cccc} \EE [y_{11} \given \boldX] & \cdots & \EE [y_{1K} \given \boldX] \\ \vdots & & \vdots \\ \EE [y_{N1} \given \boldX] & \cdots & \EE [y_{NK} \given \boldX] \end{array} \right)

We also define

  1. cov⁡[x,y ∣ Z]:=E [xy⊺ ∣ Z]−E [x ∣ Z]E [y ∣ Z]⊺\cov [\boldx, \boldy \given \boldZ] := \EE[ \boldx \boldy^\T \given \boldZ ] - \EE[\boldx\given \boldZ ] \EE[\boldy\given \boldZ ]^\T

  2. var⁡[x ∣ Z]:=E [xx⊺ ∣ Z]−E [x ∣ Z]E [x ∣ Z]⊺\var[\boldx \given \boldZ] := \EE [\boldx \boldx^\T\given \boldZ ] - \EE [\boldx\given \boldZ ] \EE[\boldx\given \boldZ ]^\T

Using the definitions, one can show that the properties of scalar conditional expectations in fact 5.2.13 carry over to the matrix setting. Here’s a partial list:

Part (v) shows examples of conditional determinism in the matrix case.

5.3Further Reading

Comprehensive treatments of multivariate distributions can be found in monographs such as Izenman (2008) and Joe (1997). Beautiful treatments of conditional expectation via orthogonal projection in L2L_2 can be found in Williams (1991), Taylor (1997), Schilling (2005), and Çinlar (2011).

5.4Exercises

5.4.1Solutions to Selected Exercises

Footnotes
  1. For technical details on these constructions see, for example, chapter 4 of Çinlar (2011).

  2. See page  for more discussion of rectangles.

  3. Uniqueness is a probability one statement: Any two solutions y^1\hat y_1 and y^2\hat y_2 satisfy P{y^1=y^2}=1\PP\{\hat y_1 = \hat y_2\}=1. We’ve already agreed not to distinguish between such elements. See the discussion after fact 5.2.2.

  4. A tighter proof can be given using the language of σ\sigma-algebras, although the intuition is less immediate.

  5. Hint: Use fact 4.2.6.

  6. Hint: Apply (5.9).

  7. Hints: You need to match the density in example 4.2.12 when k=1k=1. Use the fact that Γ(1/2)=π\Gamma(1/2) = \sqrt{\pi}. Try to find the CDF of z2z^2 and differentiate it. In finding the CDF, the solution to exercise 4.4.18 might be helpful.

  8. Hint: Fix s∈Rs \in \RR and compare the sets {z⩽s}\{z \leq s\} and {x⩽s}∩{y⩽s}\{x \leq s\} \cap \{y \leq s\}. What is the relationship between these two sets?

  9. Hint: Use (5.42) and review the solution to exercise 3.5.33.

References
  1. Çinlar, E. (2011). Probability and Stochastics. New York: Springer.
  2. Gut, A. (2009). An Intermediate Course in Probability (2nd ed.). New York: Springer.
  3. Bonhomme, S., & Robin, J.-M. (2009). Assessing the equalizing force of mobility using short panels: France, 1990–2000. The Review of Economic Studies, 76(1), 63–92.
  4. Sklar, M. (1959). Fonctions de répartition à n dimensions et leurs marges. Publications of the Institute of Statistics, 229–231.
  5. Williams, D. (1991). Probability with Martingales. Cambridge, UK: Cambridge University Press.
  6. Cheney, W. (2001). Analysis for Applied Mathematics. New York: Springer.
  7. Izenman, A. J. (2008). Modern Multivariate Statistical Techniques: Regression, Classification, and Manifold Learning (Vol. 1). New York: Springer.
  8. Joe, H. (1997). Multivariate Models and Multivariate Dependence Concepts (Vol. 73). Boca Raton: CRC Press.
  9. Taylor, J. C. (1997). An Introduction to Measure and Probability. New York: Springer.
  10. Schilling, R. L. (2005). Measures, Integrals and Martingales. Cambridge, UK: Cambridge University Press.