Hotelling's T-squared distribution#Two-sample statistic
{{Short description|Type of probability distribution}}
{{DISPLAYTITLE:Hotelling's T-squared distribution}}
{{redirect|Multivariate testing}}
{{Probability distribution
| name = Hotelling's T2 distribution
| type = density
| pdf_image = 325px|
| cdf_image = 325px|
| parameters = p - dimension of the random variables
m - related to the sample size|
| support = if
otherwise.
}}
In statistics, particularly in hypothesis testing, the Hotelling's T-squared distribution (T2), proposed by Harold Hotelling, is a multivariate probability distribution that is tightly related to the F-distribution and is most notable for arising as the distribution of a set of sample statistics that are natural generalizations of the statistics underlying the Student's t-distribution.
The Hotelling's t-squared statistic (t2) is a generalization of Student's t-statistic that is used in multivariate hypothesis testing.{{cite book|author1=Johnson, R.A.|author2=Wichern, D.W.|year=2002|title=Applied multivariate statistical analysis|volume=5|issue=8|publisher=Prentice hall}}
Motivation
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.{{cite journal
|author-link=Harold Hotelling |first=H. |last=Hotelling
|year=1931
|title=The generalization of Student's ratio
|journal=Annals of Mathematical Statistics
|volume=2 |issue=3 |pages=360–378
|doi=10.1214/aoms/1177732979
|doi-access=free}}
Definition
If the vector is Gaussian multivariate-distributed with zero mean and unit covariance matrix and is a random matrix with a Wishart distribution with unit scale matrix and m degrees of freedom, and d and M are independent of each other, then the quadratic form has a Hotelling distribution (with parameters and ):Eric W. Weisstein, [http://mathworld.wolfram.com/HotellingT-SquaredDistribution.html MathWorld]
:
It can be shown that if a random variable X has Hotelling's T-squared distribution, , then:
:
\frac{m-p+1}{pm} X\sim F_{p,m-p+1}
where is the F-distribution with parameters p and m − p + 1.
Hotelling ''t''-squared statistic
Let be the sample covariance:
:
where we denote transpose by an apostrophe. It can be shown that is a positive (semi) definite matrix and follows a p-variate Wishart distribution with n − 1 degrees of freedom.{{cite book |first=K. V. |last=Mardia |first2=J. T. |last2=Kent |first3=J. M. |last3=Bibby |year=1979 |title=Multivariate Analysis |publisher=Academic Press |isbn=978-0-12-471250-8 }}
The sample covariance matrix of the mean reads .{{cite journal |last1=Fogelmark |first1=Karl |last2=Lomholt |first2=Michael |last3=Irbäck |first3=Anders |last4=Ambjörnsson |first4=Tobias |title=Fitting a function to time-dependent ensemble averaged data |journal=Scientific Reports |date=3 May 2018 |volume=8 |issue=1 |page=6984 |doi=10.1038/s41598-018-24983-y |url=https://www.nature.com/articles/s41598-018-24983-y |access-date=19 August 2024|pmc=5934400 }}
The Hotelling's t-squared statistic is then defined as:{{Cite web | url=http://www.itl.nist.gov/div898/handbook/pmc/section5/pmc543.htm | title=6.5.4.3. Hotelling's T squared}}
:
t^2=(\overline{\mathbf x}-\boldsymbol{\mu})'\hat{\mathbf \Sigma}_\overline{\mathbf x}^{-1} (\overline{\mathbf x}-\boldsymbol{\mathbf\mu})=n(\overline{\mathbf x}-\boldsymbol{\mu})'\hat{\mathbf \Sigma}^{-1} (\overline{\mathbf x}-\boldsymbol{\mathbf\mu}),
which is proportional to the Mahalanobis 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.
From the distribution,
:
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.
=== Motivation ===
{{further|Multivariate normal distribution#Interval}}
Let denote a p-variate normal distribution with location and known covariance . Let
:
be n independent identically distributed (iid) random variables, which may be represented as column vectors of real numbers. Define
:
to be the sample mean with covariance . It can be shown that
:
where is the chi-squared distribution with p degrees of freedom.End of chapter 4.2 of {{harvp|Johnson, R.A.|Wichern, D.W.|2002}}
{{Collapse top|title=Proof}}
{{math proof|Every positive-semidefinite symmetric matrix has a positive-semidefinite symmetric square root , and if it is nonsingular, then its inverse has a positive-definite square root .
Since
\operatorname{var}\left( \overline{\boldsymbol x} \right) = \mathbf\Sigma_\overline{\mathbf x} , we have
\begin{align}
\operatorname{var} \left( \mathbf\Sigma_\overline{\boldsymbol x}^{-1/2} \overline{\boldsymbol x} \right) & = \mathbf\Sigma_\overline{\boldsymbol x}^{-1/2} \Big( \operatorname{var}\left( \overline{\boldsymbol x} \right) \Big) \left( \mathbf\Sigma_\overline{\boldsymbol x}^{-1/2} \right)^T \\[5pt]
& = \mathbf\Sigma_\overline{\boldsymbol x}^{-1/2} \Big( \operatorname{var}\left( \overline{\boldsymbol x} \right) \Big) \mathbf\Sigma_\overline{\boldsymbol x}^{-1/2} \text{ because } \mathbf\Sigma_\overline{\boldsymbol x} \text{ is symmetric} \\[5pt]
& = \left( \mathbf\Sigma_\overline{\boldsymbol x}^{-1/2} \mathbf\Sigma_\overline{\boldsymbol x}^{1/2} \right) \left( \mathbf\Sigma_\overline{\boldsymbol x}^{1/2} \mathbf\Sigma_\overline{\boldsymbol x}^{-1/2} \right) \\[5pt]
& = \mathbf I_p.
\end{align}
Consequently
and this is simply the sum of squares of independent standard normal random variables. Thus its distribution is
}}
Alternatively, one can argue using density functions and characteristic functions, as follows.
{{math proof|
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:{{cite book|author=Billingsley, P.|title=Probability and measure|year=1995|edition=3rd|publisher=Wiley|isbn=978-0-471-00710-4|chapter=26. Characteristic Functions}}
:
\begin{align}
\varphi_{\mathbf y}(\theta) &=\operatorname{E} e^{i \theta \mathbf y}, \\[5pt]
&= \operatorname{E} e^{i \theta (\overline{\mathbf x}-\boldsymbol{\mu})'({\mathbf \Sigma}/n)^{-1}(\overline{\mathbf x}-\boldsymbol{\mathbf\mu})} \\[5pt]
&= \int e^{i \theta (\overline{\mathbf x}-\boldsymbol{\mu})'n{\mathbf \Sigma}^{-1}(\overline{\mathbf x}-\boldsymbol{\mathbf\mu})} (2\pi)^{-p/2} |\boldsymbol{\Sigma}/n|^{-1/2}\, e^{ -(1/2) (\overline{\mathbf x}-\boldsymbol\mu)' n \boldsymbol\Sigma^{-1} (\overline{\mathbf x}-\boldsymbol\mu) } \, dx_1 \cdots dx_p
\end{align}
There are two exponentials inside the integral, so by multiplying the exponentials we add the exponents together, obtaining:
:
\begin{align}
&= \int (2\pi)^{-p/2}| \boldsymbol\Sigma/n|^{-1/2}\, e^{ -(1/2)(\overline{\mathbf x} - \boldsymbol\mu)' n(\boldsymbol\Sigma^{-1}-2 i \theta \boldsymbol\Sigma^{-1})(\overline{\mathbf x}-\boldsymbol\mu) }\,dx_1 \cdots dx_p
\end{align}
Now take the term off the integral, and multiply everything by an identity , bringing one of them inside the integral:
:
\begin{align}
&= |(\boldsymbol\Sigma^{-1}-2 i \theta \boldsymbol\Sigma^{-1})^{-1} / n|^{1/2} |\boldsymbol\Sigma/n|^{-1/2} \int (2\pi)^{-p/2} |(\boldsymbol\Sigma^{-1}-2 i \theta \boldsymbol\Sigma^{-1})^{-1} / n|^{-1/2} \, e^{ -(1/2)n(\overline{\mathbf x}-\boldsymbol\mu)'(\boldsymbol\Sigma^{-1}-2 i \theta \boldsymbol\Sigma^{-1})(\overline{\mathbf x}-\boldsymbol\mu) }\,dx_1 \cdots dx_p
\end{align}
But the term inside the integral is precisely the probability density function of a multivariate normal distribution with covariance matrix and mean , so when integrating over all , it must yield per the probability axioms.{{clarify|reason=The integral will only converge if the covariance matrix is positive definite. What guarantees that the aforementioned covariance matrix will be so?|date=September 2020}} We thus end up with:
:
\begin{align}
& = \left|(\boldsymbol\Sigma^{-1}-2 i \theta \boldsymbol\Sigma^{-1})^{-1} \cdot \frac{1}{n} \right|^{1/2} |\boldsymbol\Sigma/n|^{-1/2} \\
& = \left|(\boldsymbol\Sigma^{-1}-2 i \theta \boldsymbol\Sigma^{-1})^{-1} \cdot \frac{1}{\cancel{n}} \cdot \cancel{n} \cdot \boldsymbol\Sigma^{-1} \right|^{1/2} \\
& = \left| \left[ (\cancel{\boldsymbol\Sigma^{-1}} -2i \theta \cancel{\boldsymbol\Sigma^{-1}} ) \cancel{\boldsymbol\Sigma} \right]^{-1} \right|^{1/2} \\
& = |\mathbf I_p-2 i \theta \mathbf I_p|^{-1/2}
\end{align}
where is an identity matrix of dimension . Finally, calculating the determinant, we obtain:
:
\begin{align}
& = (1-2 i \theta)^{-p/2}
\end{align}
which is the characteristic function for a chi-square distribution with degrees of freedom.
}}
{{Collapse bottom}}
Two-sample statistic
If and , with the samples independently drawn from two independent multivariate normal distributions with the same mean and covariance, and we define
:
as the sample means, and
:
:
as the respective sample covariance matrices. Then
:
is the unbiased pooled covariance matrix estimate (an extension of pooled variance).{{anchor|Pooled covariance matrix}}
Finally, the Hotelling's two-sample t-squared statistic is
:
\sim T^2(p, n_x+n_y-2)
=Related concepts=
It can be related to the F-distribution by
:
The non-null distribution of this statistic is the noncentral F-distribution (the ratio of a non-central Chi-squared random variable and an independent central Chi-squared random variable)
:
with
:
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.{{cite journal|last1=Marozzi|first1=M.|title=Multivariate tests based on interpoint distances with application to magnetic resonance imaging|journal=Statistical Methods in Medical Research|volume=25|issue=6|pages=2593–2610|date=2016|doi=10.1177/0962280214529104|pmid=24740998}}{{cite journal|last1=Marozzi|first1=M.|title=Multivariate multidistance tests for high-dimensional low sample size case-control studies|journal=Statistics in Medicine|date=2015|volume=34|issue=9|pages=1511–1526|doi=10.1002/sim.6418|pmid=25630579}}
See also
- Student's t-test in univariate statistics
- Student's t-distribution in univariate probability theory
- Multivariate Student distribution
- F-distribution (commonly tabulated or available in software libraries, and hence used for testing the T-squared statistic using the relationship given above)
- Wilks's lambda distribution (in multivariate statistics, Wilks's Λ is to Hotelling's T2 as Snedecor's F is to Student's t in univariate statistics)
References
{{reflist}}
External links
- {{SpringerEOM | title=Hotelling T2-distribution |id=H/h048070 |first=A.V. |last=Prokhorov}}
{{ProbDistributions|continuous-semi-infinite}}
{{DEFAULTSORT:Hotelling's T-Squared Distribution}}