# Hotelling's T-square distribution

In statistics, Hotelling's T-square statistic,[1] named for Harold Hotelling, is a generalization of Student's t statistic that is used in multivariate hypothesis testing.

Hotelling's T-square statistic is defined as

${\displaystyle t^{2}=n({\mathbf {x} }-{\mathbf {\mu } })'{\mathbf {W} }^{-1}({\mathbf {x} }-{\mathbf {\mu } })}$

where n is a number of points (see below), ${\displaystyle {\mathbf {x} }}$ is a column vector of ${\displaystyle p}$ elements and ${\displaystyle {\mathbf {W} }}$ is a ${\displaystyle p\times p}$ matrix.

If ${\displaystyle x\sim N_{p}(\mu ,{\mathbf {V} })}$ is a random variable with a multivariate Gaussian distribution and ${\displaystyle {\mathbf {W} }\sim W_{p}(m,{\mathbf {V} })}$ (independent of x) has a Wishart distribution with the same non-singular variance matrix ${\displaystyle \mathbf {V} }$ and with ${\displaystyle m=n-1}$, then the distribution of ${\displaystyle t^{2}}$ is ${\displaystyle T^{2}(p,m)}$, Hotelling's T-square distribution with parameters p and m. It can be shown that

${\displaystyle {\frac {m-p+1}{pm}}T^{2}\sim F_{p,m-p+1}}$

where ${\displaystyle F}$ is the F-distribution.

Now suppose that

${\displaystyle {\mathbf {x} }_{1},\dots ,{\mathbf {x} }_{n}}$

are p×1 column vectors whose entries are real numbers. Let

${\displaystyle {\overline {\mathbf {x} }}=(\mathbf {x} _{1}+\cdots +\mathbf {x} _{n})/n}$

be their mean. Let the p×p positive-definite matrix

${\displaystyle {\mathbf {W} }=\sum _{i=1}^{n}(\mathbf {x} _{i}-{\overline {\mathbf {x} }})(\mathbf {x} _{i}-{\overline {\mathbf {x} }})'/(n-1)}$

be their "sample variance" matrix. (The transpose of any matrix M is denoted above by M′). Let μ be some known p×1 column vector (in applications a hypothesized value of a population mean). Then Hotelling's T-square statistic is

${\displaystyle t^{2}=n({\overline {\mathbf {x} }}-{\mathbf {\mu } })'{\mathbf {W} }^{-1}({\overline {\mathbf {x} }}-{\mathbf {\mu } }).}$

Note that ${\displaystyle t^{2}}$ is closely related to the squared Mahalanobis distance.

In particular, it can be shown [2] that if ${\displaystyle {\mathbf {x} }_{1},\dots ,{\mathbf {x} }_{n}\sim N_{p}(\mu ,{\mathbf {V} })}$, are independent, and ${\displaystyle {\overline {\mathbf {x} }}}$ and ${\displaystyle {\mathbf {W} }}$ are as defined above then ${\displaystyle {\mathbf {W} }}$ has a Wishart distribution with n − 1 degrees of freedom

${\displaystyle \mathbf {W} \sim W_{p}(V,n-1)}$.

and is independent of ${\displaystyle {\overline {\mathbf {x} }}}$, and

${\displaystyle {\overline {\mathbf {x} }}\sim N_{p}(\mu ,V/n)}$

This implies that:

${\displaystyle t^{2}=n({\overline {\mathbf {x} }}-{\mathbf {\mu } })'{\mathbf {W} }^{-1}({\overline {\mathbf {x} }}-{\mathbf {\mu } })\sim T^{2}(p,n-1).}$

## Hotelling's two-sample T-square statistic

If ${\displaystyle {\mathbf {x} }_{1},\dots ,{\mathbf {x} }_{n_{x}}\sim N_{p}(\mu ,{\mathbf {V} })}$ and ${\displaystyle {\mathbf {y} }_{1},\dots ,{\mathbf {y} }_{n_{y}}\sim N_{p}(\mu ,{\mathbf {V} })}$, with the samples independently drawn from two independent multivariate normal distributions with the same mean and covariance, and we define

${\displaystyle {\overline {\mathbf {x} }}={\frac {1}{n_{x}}}\sum _{i=1}^{n_{x}}\mathbf {x} _{i}\qquad {\overline {\mathbf {y} }}={\frac {1}{n_{y}}}\sum _{i=1}^{n_{y}}\mathbf {y} _{i}}$

as the sample means, and

${\displaystyle {\mathbf {W} }={\frac {\sum _{i=1}^{n_{x}}(\mathbf {x} _{i}-{\overline {\mathbf {x} }})(\mathbf {x} _{i}-{\overline {\mathbf {x} }})'+\sum _{i=1}^{n_{y}}(\mathbf {y} _{i}-{\overline {\mathbf {y} }})(\mathbf {y} _{i}-{\overline {\mathbf {y} }})'}{n_{x}+n_{y}-2}}}$

as the unbiased pooled covariance matrix estimate, then Hotelling's two-sample T-square statistic is

${\displaystyle t^{2}={\frac {n_{x}n_{y}}{n_{x}+n_{y}}}({\overline {\mathbf {x} }}-{\overline {\mathbf {y} }})'{\mathbf {W} }^{-1}({\overline {\mathbf {x} }}-{\overline {\mathbf {y} }})\sim T^{2}(p,n_{x}+n_{y}-2)}$

and it can be related to the F-distribution by

${\displaystyle {\frac {n_{x}+n_{y}-p-1}{(n_{x}+n_{y}-2)p}}t^{2}\sim F(p,n_{x}+n_{y}-1-p).}$[2]

• Wilks' lambda distribution (in multivariate statistics Wilks' ${\displaystyle \Lambda }$ is to Hotelling's ${\displaystyle T^{2}}$ as Snedecor's ${\displaystyle F}$ is to Student's ${\displaystyle t}$ in univariate statistics).