# Multivariate random variable

In probability, and statistics, a multivariate random variable or random vector is a list of mathematical variables each of whose value is unknown, either because the value has not yet occurred or because there is imperfect knowledge of its value. The individual variables in a random vector are grouped together because they are all part of a single mathematical system — often they represent different properties of an individual statistical unit. For example, while a given person has a specific age, height and weight, the representation of these features of an unspecified person from within a group would be a random vector. Normally each element of a random vector is a real number.

Random vectors are often used as the underlying implementation of various types of aggregate random variables, e.g. a random matrix, random tree, random sequence, stochastic process, etc.

More formally, a multivariate random variable is a column vector ${\displaystyle \mathbf {X} =(X_{1},...,X_{n})^{T}}$ (or its transpose, which is a row vector) whose components are scalar-valued random variables on the same probability space as each other, ${\displaystyle (\Omega ,{\mathcal {F}},P)}$, where ${\displaystyle \Omega }$ is the sample space, ${\displaystyle {\mathcal {F}}}$ is the sigma-algebra (the collection of all events), and ${\displaystyle P}$ is the probability measure (a function returning each event's probability).

## Probability distribution

Every random vector gives rise to a probability measure on ${\displaystyle \mathbb {R} ^{n}}$ with the Borel algebra as the underlying sigma-algebra. This measure is also known as the joint probability distribution, the joint distribution, or the multivariate distribution of the random vector.

The distributions of each of the component random variables ${\displaystyle X_{i}}$ are called marginal distributions. The conditional probability distribution of ${\displaystyle X_{i}}$ given ${\displaystyle X_{j}}$ is the probability distribution of ${\displaystyle X_{i}}$ when ${\displaystyle X_{j}}$ is known to be a particular value.

## Operations on random vectors

Random vectors can be subjected to the same kinds of algebraic operations as can non-random vectors: addition, subtraction, multiplication by a scalar, and the taking of inner products.

### Affine transformations

Similarly, a new random vector ${\displaystyle \mathbf {Y} }$ can be defined by applying an affine transformation ${\displaystyle g\colon \mathbb {R} ^{n}\to \mathbb {R} ^{n}}$ to a random vector ${\displaystyle \mathbf {X} }$:

${\displaystyle \mathbf {Y} ={\mathcal {A}}\mathbf {X} +b}$, where ${\displaystyle {\mathcal {A}}}$ is an ${\displaystyle n\times n}$ matrix and ${\displaystyle b}$ is an ${\displaystyle n\times 1}$ column vector.

If ${\displaystyle {\mathcal {A}}}$ is an invertible matrix and ${\displaystyle \textstyle \mathbf {X} }$ has a probability density function ${\displaystyle f_{\mathbf {X} }}$, then the probability density of ${\displaystyle \mathbf {Y} }$ is

${\displaystyle f_{\mathbf {Y} }(y)={\frac {f_{\mathbf {X} }({\mathcal {A}}^{-1}(y-b))}{|\det {\mathcal {A}}|}}}$.

### Invertible mappings

More generally we can study invertible mappings of random vectors.[1]:p.290–291

Let ${\displaystyle g}$ be a one-to-one mapping from an open subset ${\displaystyle {\mathcal {D}}}$ of ${\displaystyle \mathbb {R} ^{n}}$ onto a subset ${\displaystyle {\mathcal {R}}}$ of ${\displaystyle \mathbb {R} ^{n}}$, let ${\displaystyle g}$ have continuous partial derivatives in ${\displaystyle {\mathcal {D}}}$ and let the Jacobian determinant of ${\displaystyle g}$ be zero at no point of ${\displaystyle {\mathcal {D}}}$. Assume that the real random vector ${\displaystyle \mathbf {X} }$ has a probability density function ${\displaystyle f_{\mathbf {X} }(\mathbf {x} )}$ and satisfies ${\displaystyle P(\mathbf {X} \in {\mathcal {D}})=1}$. Then the random vector ${\displaystyle \mathbf {Y} =g(\mathbf {X} )}$ is of probability density

${\displaystyle \left.f_{\mathbf {Y} }(\mathbf {y} )={\frac {f_{\mathbf {X} }(\mathbf {x} )}{\left|\det {\frac {\partial g(\mathbf {x} )}{\partial \mathbf {x} }}\right|}}\right|_{\mathbf {x} =g^{-1}(\mathbf {y} )}\mathbf {1} (\mathbf {y} \in R_{\mathbf {Y} })}$

where ${\displaystyle \mathbf {1} }$ denotes the indicator function and set ${\displaystyle R_{\mathbf {Y} }=\{\mathbf {y} =g(\mathbf {x} ):f_{\mathbf {X} }(\mathbf {x} )>0\}\subseteq {\mathcal {R}}}$ denotes support of ${\displaystyle \mathbf {Y} }$.

## Expected value

The expected value or mean of a random vector ${\displaystyle \mathbf {X} }$ is a fixed vector ${\displaystyle \operatorname {E} [\mathbf {X} ]}$ whose elements are the expected values of the respective random variables.

${\displaystyle \operatorname {E} [\mathbf {X} ]=(\operatorname {E} [X_{1}],...,\operatorname {E} [X_{n}])^{T}}$

## Covariance and cross-covariance

The covariance matrix (also called the variance-covariance matrix) of an ${\displaystyle n\times 1}$ random vector is an ${\displaystyle n\times n}$ matrix whose (i,j)th element is the covariance between the i th and the j th random variables. The covariance matrix is the expected value, element by element, of the ${\displaystyle n\times n}$ matrix computed as ${\displaystyle [\mathbf {X} -\operatorname {E} [\mathbf {X} ]][\mathbf {X} -\operatorname {E} [\mathbf {X} ]]^{T}}$, where the superscript T refers to the transpose of the indicated vector:

${\displaystyle \operatorname {Var} [\mathbf {X} ]=\operatorname {E} [(\mathbf {X} -\operatorname {E} [\mathbf {X} ])(\mathbf {X} -\operatorname {E} [\mathbf {X} ])^{T}].}$

By extension, the cross-covariance matrix between two random vectors ${\displaystyle \mathbf {X} }$ and ${\displaystyle \mathbf {Y} }$ (${\displaystyle \mathbf {X} }$ having ${\displaystyle n}$ elements and ${\displaystyle \mathbf {Y} }$ having ${\displaystyle p}$ elements) is the ${\displaystyle n\times p}$ matrix

${\displaystyle \operatorname {Cov} [\mathbf {X} ,\mathbf {Y} ]=\operatorname {E} [(\mathbf {X} -\operatorname {E} [\mathbf {X} ])(\mathbf {Y} -\operatorname {E} [\mathbf {Y} ])^{T}],}$

where again the matrix expectation is taken element-by-element in the matrix. Here the (i,j)th element is the covariance between the i th element of ${\displaystyle \mathbf {X} }$ and the j th element of ${\displaystyle \mathbf {Y} .}$ The cross-covariance matrix ${\displaystyle \operatorname {Cov} [\mathbf {Y} ,\mathbf {X} ]}$ is simply the transpose of the matrix ${\displaystyle \operatorname {Cov} [\mathbf {X} ,\mathbf {Y} ]}$.

## Further properties

### Expectation of a quadratic form

One can take the expectation of a quadratic form in the random vector X as follows:[2]:p.170–171

${\displaystyle \operatorname {E} (X^{T}AX)=[\operatorname {E} (X)]^{T}A[\operatorname {E} (X)]+\operatorname {tr} (AC),}$

where C is the covariance matrix of X and tr refers to the trace of a matrix — that is, to the sum of the elements on its main diagonal (from upper left to lower right). Since the quadratic form is a scalar, so is its expectation.

Proof: Let ${\displaystyle \mathbf {z} }$ be an ${\displaystyle m\times 1}$ random vector with ${\displaystyle \operatorname {E} [\mathbf {z} ]=\mu }$ and ${\displaystyle \operatorname {Cov} [\mathbf {z} ]=V}$ and let ${\displaystyle A}$ be an ${\displaystyle m\times m}$ non-stochastic matrix.

Then based on the formula for the covariance, if we denote ${\displaystyle \mathbf {z} '=\mathbf {X} }$ and ${\displaystyle \mathbf {z} 'A'=\mathbf {Y} }$ (where henceforth a prime sign ${\displaystyle '}$ denotes a transpose), we see that:

${\displaystyle \operatorname {Cov} [\mathbf {X} ,\mathbf {Y} ]=\operatorname {E} [\mathbf {X} \mathbf {Y} ']-\operatorname {E} [\mathbf {X} ]\operatorname {E} [\mathbf {Y} ]'}$

Hence

{\displaystyle {\begin{aligned}E(XY')&=\operatorname {Cov} (X,Y)+E(X)E(Y)'\\E(z'Az)&=\operatorname {Cov} (z',z'A')+E(z')E(z'A')'\\&=\operatorname {Cov} (z',z'A')+\mu '(\mu 'A')'\\&=\operatorname {Cov} (z',z'A')+\mu 'A\mu ,\end{aligned}}}

which leaves us to show that

${\displaystyle \operatorname {Cov} (z',z'A')=\operatorname {tr} (AV).}$

This is true based on the fact that one can cyclically permute matrices when taking a trace without changing the end result (e.g.: tr(AB) = tr(BA)).

We see that

{\displaystyle {\begin{aligned}\operatorname {Cov} (z',z'A')&=E\left[\left(z'-E(z')\right)\left(z'A'-E\left(z'A'\right)\right)'\right]\\&=E\left[(z'-\mu ')(z'A'-\mu 'A')'\right]\\&=E\left[(z-\mu )'(Az-A\mu )\right].\end{aligned}}}

And since

${\displaystyle \left({z-\mu }\right)'\left({Az-A\mu }\right)}$

is a scalar, then

${\displaystyle (z-\mu )'(Az-A\mu )=\operatorname {tr} \left[{(z-\mu )'(Az-A\mu )}\right]=\operatorname {tr} \left[(z-\mu )'A(z-\mu )\right]}$

trivially. Using the permutation we get:

${\displaystyle \operatorname {tr} \left[{(z-\mu )'A(z-\mu )}\right]=\operatorname {tr} \left[{A(z-\mu )(z-\mu )'}\right],}$

and by plugging this into the original formula we get:

{\displaystyle {\begin{aligned}\operatorname {Cov} \left({z',z'A'}\right)&=E\left[{\left({z-\mu }\right)'(Az-A\mu )}\right]\\&=E\left[\operatorname {tr} \left[A(z-\mu )(z-\mu )'\right]\right]\\&=\operatorname {tr} \left[{A\cdot E\left[(z-\mu )(z-\mu )'\right]}\right]\\&=\operatorname {tr} [AV].\end{aligned}}}

### Expectation of the product of two different quadratic forms

One can take the expectation of the product of two different quadratic forms in a zero-mean Gaussian random vector X as follows:[2]:pp. 162–176

${\displaystyle \operatorname {E} [X^{T}AX][X^{T}BX]=2\operatorname {tr} (ACBC)+\operatorname {tr} (AC)\operatorname {tr} (BC)}$

where again C is the covariance matrix of X. Again, since both quadratic forms are scalars and hence their product is a scalar, the expectation of their product is also a scalar.

## Applications

### Portfolio theory

In portfolio theory in finance, an objective often is to choose a portfolio of risky assets such that the distribution of the random portfolio return has desirable properties. For example, one might want to choose the portfolio return having the lowest variance for a given expected value. Here the random vector is the vector ${\displaystyle \mathbf {r} }$ of random returns on the individual assets, and the portfolio return p (a random scalar) is the inner product of the vector of random returns with a vector w of portfolio weights — the fractions of the portfolio placed in the respective assets. Since p = wT${\displaystyle \mathbf {r} }$, the expected value of the portfolio return is wTE(${\displaystyle \mathbf {r} }$) and the variance of the portfolio return can be shown to be wTCw, where C is the covariance matrix of ${\displaystyle \mathbf {r} }$.

### Regression theory

In linear regression theory, we have data on n observations on a dependent variable y and n observations on each of k independent variables xj. The observations on the dependent variable are stacked into a column vector y; the observations on each independent variable are also stacked into column vectors, and these latter column vectors are combined into a design matrix X (not denoting a random vector in this context) of observations on the independent variables. Then the following regression equation is postulated as a description of the process that generated the data:

${\displaystyle y=X\beta +e,}$

where β is a postulated fixed but unknown vector of k response coefficients, and e is an unknown random vector reflecting random influences on the dependent variable. By some chosen technique such as ordinary least squares, a vector ${\displaystyle {\hat {\beta }}}$ is chosen as an estimate of β, and the estimate of the vector e, denoted ${\displaystyle {\hat {e}}}$, is computed as

${\displaystyle {\hat {e}}=y-X{\hat {\beta }}.}$

Then the statistician must analyze the properties of ${\displaystyle {\hat {\beta }}}$ and ${\displaystyle {\hat {e}}}$, which are viewed as random vectors since a randomly different selection of n cases to observe would have resulted in different values for them.

### Vector time series

The evolution of a k×1 random vector ${\displaystyle \mathbf {X} }$ through time can be modelled as a vector autoregression (VAR) as follows:

${\displaystyle \mathbf {X} _{t}=c+A_{1}\mathbf {X} _{t-1}+A_{2}\mathbf {X} _{t-2}+\cdots +A_{p}\mathbf {X} _{t-p}+\mathbf {e} _{t},\,}$

where the i-periods-back vector observation ${\displaystyle \mathbf {X} _{t-i}}$ is called the i-th lag of ${\displaystyle \mathbf {X} }$, c is a k × 1 vector of constants (intercepts), Ai is a time-invariant k × k matrix and ${\displaystyle \mathbf {e} _{t}}$ is a k × 1 random vector of error terms.

## References

1. ^ Lapidoth, Amos, A foundation in Digital Communication, Cambridge University Press, 2009.
2. ^ a b Kendrick, David, Stochastic Control for Economic Models, McGraw-Hill, 1981.

This page is based on a Wikipedia article written by authors (here).
Text is available under the CC BY-SA 3.0 license; additional terms may apply.
Images, videos and audio are available under their respective licenses.