If the vector <math>d</math> is [[Multivariate normal distribution|Gaussian multivariate-distributed]] with zero mean and unit [[covariance matrix]] <math>N(\mathbf{0}_{p}, \mathbf{I}_{p, p})</math> and <math>M</math> is a <math>p \times p</math> matrix with unit [[scale matrix]] and ''m'' [[degrees of freedom (statistics)|degrees of freedom]] with a [[Wishart distribution]] <math>W(\mathbf{I}_{p, p}, m)</math>, then the [[Quadratic form (statistics)|Quadratic form]] <math>m d^T M^{-1} d</math> has a Hotelling distribution,<math>T^2(p, m)</math>, with parameter <math>p</math> and <math>m</math>.<ref>Eric W. Weisstein, ''[http://mathworld.wolfram.com/HotellingT-SquaredDistribution.html MathWorld]''</ref>
If the vector <math>d</math> is [[Multivariate normal distribution|Gaussian multivariate-distributed]] with zero mean and unit [[covariance matrix]] <math>N(\mathbf{0}_{p}, \mathbf{I}_{p, p})</math> and <math>M</math> is a <math>p \times p</math> matrix with unit [[scale matrix]] and ''m'' [[degrees of freedom (statistics)|degrees of freedom]] with a [[Wishart distribution]] <math>W(\mathbf{I}_{p, p}, m)</math>, then the [[Quadratic form (statistics)|quadratic form]] <math>X</math> has a Hotelling distribution (with parameters <math>p</math> and <math>m</math>):<ref>Eric W. Weisstein, ''[http://mathworld.wolfram.com/HotellingT-SquaredDistribution.html MathWorld]''</ref>
:<math>X = m d^T M^{-1} d \sim T^2(p, m).</math>
If a random variable ''X'' has Hotelling's ''T''-squared distribution, <math>X \sim T^2_{p,m}</math>, then:<ref name=H1931/>
Furthermore, if a random variable ''X'' has Hotelling's ''T''-squared distribution, <math>X \sim T^2_{p,m}</math>, then:<ref name=H1931/>
The distribution arises in multivariate statistics in undertaking tests of the differences between the (multivariate) means of different populations, where tests for univariate problems would make use of a t-test.
The distribution is named for Harold Hotelling, who developed it as a generalization of Student's t-distribution.[1]
The Hotelling's t-squared statistic is then defined as:[5]
which is proportional to the distance between the sample mean and . Because of this, one should expect the statistic to assume low values if , and high values if they are different.
where is the F-distribution with parameters p and n − p.
In order to calculate a p-value (unrelated to p variable here), note that the distribution of equivalently implies that
Then, use the quantity on the left hand side to evaluate the p-value corresponding to the sample, which comes from the F-distribution. A confidence region may also be determined using similar logic.
To show this use the fact that
and derive the characteristic function of the random variable . As usual, let denote the determinant of the argument, as in .
By definition of characteristic function, we have:[7]
There are two exponentials inside the integral, so by multiplying the exponentials we add the exponents together, obtaining:
Now take the term off the integral, and multiply everything by an identity , bringing one of them inside the integral:
where is the difference vector between the population means.
In the two-variable case, the formula simplifies nicely allowing appreciation of how the correlation, ,
between the variables affects . If we define
and
then
Thus, if the differences in the two rows of the vector are of the same sign, in general, becomes smaller as becomes more positive. If the differences are of opposite sign becomes larger as becomes more positive.
A univariate special case can be found in Welch's t-test.
More robust and powerful tests than Hotelling's two-sample test have been proposed in the literature, see for example the interpoint distance based tests which can be applied also when the number of variables is comparable with, or even larger than, the number of subjects.[8][9]
F-distribution (commonly tabulated or available in software libraries, and hence used for testing the T-squared statistic using the relationship given above)
^Billingsley, P. (1995). "26. Characteristic Functions". Probability and measure (3rd ed.). Wiley. ISBN978-0-471-00710-4.
^Marozzi, M. (2016). "Multivariate tests based on interpoint distances with application to magnetic resonance imaging". Statistical Methods in Medical Research. 25 (6): 2593–2610. doi:10.1177/0962280214529104. PMID24740998.
^Marozzi, M. (2015). "Multivariate multidistance tests for high-dimensional low sample size case-control studies". Statistics in Medicine. 34 (9): 1511–1526. doi:10.1002/sim.6418. PMID25630579.