In
multivariate statistics
Multivariate statistics is a subdivision of statistics encompassing the simultaneous observation and analysis of more than one outcome variable, i.e., '' multivariate random variables''.
Multivariate statistics concerns understanding the differ ...
, if
is a
vector
Vector most often refers to:
* Euclidean vector, a quantity with a magnitude and a direction
* Disease vector, an agent that carries and transmits an infectious pathogen into another living organism
Vector may also refer to:
Mathematics a ...
of
random variable
A random variable (also called random quantity, aleatory variable, or stochastic variable) is a Mathematics, mathematical formalization of a quantity or object which depends on randomness, random events. The term 'random variable' in its mathema ...
s, and
is an
-dimensional
symmetric matrix
In linear algebra, a symmetric matrix is a square matrix that is equal to its transpose. Formally,
Because equal matrices have equal dimensions, only square matrices can be symmetric.
The entries of a symmetric matrix are symmetric with ...
, then the
scalar quantity
is known as a quadratic form in
.
Expectation
It can be shown that
:
where
and
are the
expected value
In probability theory, the expected value (also called expectation, expectancy, expectation operator, mathematical expectation, mean, expectation value, or first Moment (mathematics), moment) is a generalization of the weighted average. Informa ...
and
variance-covariance matrix of
, respectively, and tr denotes the
trace of a matrix. This result only depends on the existence of
and
; in particular,
normality of
is ''not'' required.
A book treatment of the topic of quadratic forms in random variables is that of Mathai and Provost.
Proof
Since the quadratic form is a scalar quantity,
.
Next, by the cyclic property of the
trace operator,
:
Since the trace operator is a
linear combination
In mathematics, a linear combination or superposition is an Expression (mathematics), expression constructed from a Set (mathematics), set of terms by multiplying each term by a constant and adding the results (e.g. a linear combination of ''x'' a ...
of the components of the matrix, it therefore follows from the linearity of the expectation operator that
:
A standard property of variances then tells us that this is
:
Applying the cyclic property of the trace operator again, we get
:
Variance in the Gaussian case
In general, the variance of a quadratic form depends greatly on the distribution of
. However, if
''does'' follow a multivariate normal distribution, the variance of the quadratic form becomes particularly tractable. Assume for the moment that
is a symmetric matrix. Then,
:
.
In fact, this can be generalized to find the
covariance
In probability theory and statistics, covariance is a measure of the joint variability of two random variables.
The sign of the covariance, therefore, shows the tendency in the linear relationship between the variables. If greater values of one ...
between two quadratic forms on the same
(once again,
and
must both be symmetric):
:
.
In addition, a quadratic form such as this follows a
generalized chi-squared distribution.
Computing the variance in the non-symmetric case
The case for general
can be derived by noting that
:
so
:
is a quadratic form in the symmetric matrix
, so the mean and variance expressions are the same, provided
is replaced by
therein.
Examples of quadratic forms
In the setting where one has a set of observations
and an
operator matrix , then the
residual sum of squares can be written as a quadratic form in
:
:
For procedures where the matrix
is
symmetric
Symmetry () in everyday life refers to a sense of harmonious and beautiful proportion and balance. In mathematics, the term has a more precise definition and is usually used to refer to an object that is invariant under some transformations ...
and
idempotent
Idempotence (, ) is the property of certain operations in mathematics and computer science whereby they can be applied multiple times without changing the result beyond the initial application. The concept of idempotence arises in a number of pl ...
, and the
errors are
Gaussian with covariance matrix
,
has a
chi-squared distribution
In probability theory and statistics, the \chi^2-distribution with k Degrees of freedom (statistics), degrees of freedom is the distribution of a sum of the squares of k Independence (probability theory), independent standard normal random vari ...
with
degrees of freedom and noncentrality parameter
, where
: