Random vectors X∈Rk can have PDFs f(x) too, where Pr(X∈R)=∫Rf(x)dx for any (measurable) region R⊆Rk.
The PDF f:Rk→R of a random vector X=(X1,…,Xk) is called the joint density of (X1,…,Xk).
Example. If {Xi}i=1k are independent, and the PDF (or marginal density) of Xi is given by fi(x), then their joint density is given by f(x1,…,xk)=∏i=1kfi(xi).
Definition (Conditional PDF). Given X1,…,Xk with joint density f(x1,…,xk), the conditional density of Xk given the values {X1=x1,…,Xk−1=xk−1} is:
Note that the conditional PDF f can be viewed as either:
A map (x1,…,xk)↦#∈R.
A family of maps (xk)↦#∈R, indexed by (x1,…,xk−1).
§ Multivariate Gaussian
18.650 states the Multivariate Gaussian PDF without proof. For completeness, we give a derivation here.
Theorem. (Multivariate Gaussian) The k-dimensional Gaussian random vector X∼Nk(μ,Σ) satisfies μ=E[X], Σ=V[X], and has multivariate PDF given by:
f(x)=(2π)kdet(Σ)1exp(−21(x−μ)⊤Σ−1(x−μ)).
Proof: Start with the case of Σ=Ik and μ=0; that is, consider Z∼Nk(0,Ik).
Since Σ=Ik, the {Zi}i=1k are independent, so the multivariate PDF is just the product of all the single-variable PDFs:
fZ(z)=i=1∏k2π1e−zi2/2=(2π)k1exp(−21z⊤z).
The question now is: for what A∈Rk×k and b∈Rk does X:=AZ+b satisfy E[X]=μ and V[X]=Σ? Well,
μ=E[AZ+b]=AE[Z]+b=b.∥Σ=V[AZ+b]=AV[Z]A⊤=AA⊤.
Thus, we seek X=Σ1/2Z+μ, where Σ1/2 is the unique symmetric, positive definite matrix such that Σ=Σ1/2Σ1/2.
Why does Σ1/2 always exist? Well, by the Spectral Theorem, Σ=QΛQ⊤, where Λ=diag(λ1,…,λk) and Q∈Ok(R). But Σ is positive definite, so the λi are all positive, meaning Σ1/2:=QΛ1/2Q⊤ works.
Returning to the PDF fZ(z), we therefore must substitute z=Σ−1/2(x−μ). Careful, though—fZ(z) is a density, and the affine map T(z)=Σ1/2z+μ will stretch space by a factor of det(Σ1/2)=det(Σ)1/2. Thus, the final PDF is:
And the above simplifies to the multivariate PDF promised at the beginning. ■
Note that all covariance matrices are positive semidefinite, so the above theorem only makes sense when Σ is symmetric and positive semidefinite. More strongly, we better have Σ be positive definite, or else Σ would give a degenerate Gaussian with no PDF, as Σ−1 would make no sense.
§ Multivariate Gaussian Properties and Theorems
It helps to know a few useful properties of Nk(μ,Σ).
Theorem. (Multivariate Gaussian Properties) Say X∼Nk(μ,Σ). Then:
If A∈Rk×ℓ and b∈Rℓ, then A⊤X+b∼Nℓ(A⊤μ+b,A⊤ΣA).
As seen in the proof above, the z-score of X is given by Z=Σ−1/2(X−μ)∼Nk(0,Ik).
Proof: For the first bullet, just note that A⊤X+b is clearly also a multivariate Gaussian, and so it suffices to compute E[A⊤X+b] and V[A⊤X+b], which is not hard. ■
And of course, multivariate CLT holds too.
Theorem. (Multivariate CLT) Given (i.i.d.) random vectors X1,…,Xn∈Rk, with E[Xi]=μ and V[Xi]=Σ, we have:
n(Xˉn−μ)⇝Nk(0,Σ).
And so does the multivariate delta method.
Theorem. (Multivariate Delta Method) Given (i.i.d.) random vectors X1,…,Xn∈Rk with E[Xi]=μ and V[Xi]=Σ, along with a differentiable g:Rk→R satisfying ∇g(μ)=0, we have:
n(g(Xˉn)−g(μ))⇝N(0,∇g(μ)⊤Σ∇g(μ)).
Note, in this case, that the RHS is a single-variable Gaussian, and that ∇g(μ) is a column vector, not a matrix.
Example. Consider i.i.d. random vectors X1,…,Xn∼N((2,…,2),Ik), and define g:Rk→R via g(x1,…,xk)=x1…xk. Determine the limiting distribution of g(Xˉn).
Solution: Just note that g(μ)=2k and ∇g(μ)=(2k−1,…,2k−1), so the Delta Method yields:
n(g(Xˉn)−2k)⇝N(0,k⋅22k−2).
And so g(Xˉn)≈N(2k,n1(k⋅22k−2)) in the limit n→∞.
§ Computational Examples
Example. Consider a random vector distributed as (XY)∼N((32),(4116)). Compute V[X+3Y].
Solution: Computing V[X+3Y] doesn't even depend on our random vector being jointly Gaussian; just note:
More generally, given a k-dimensional Gaussian random vector X∼N(μ,Σ), you can think of each entry Xi of X as:
Xi=μi+j=1∑kaijZj, where Zj∼N(0,1) for all j=1,…,k.
Importantly, the Zj are all independent, so computing something like V[X13X24+X5X7X8] cannot be hard: substitute each Xi with the appropriate linear combination of the independent Zj, and the rest must be trivial.
Example. Consider a random vector distributed as (XY)∼N((32),(4116)). Compute E[X∣X+Y=6].
Solution: This one requires us to use the Gaussian-ness of the distribution. Here's how.
Lemma. Suppose X and Y are jointly Gaussian random variables. Then Cov(X,Y)=0 implies X⊥Y.
Proof: If Cov(X,Y)=0, then (XY)∼N((μXμY),(σX200σY2)), so the joint density of X and Y looks like: