Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Hotelling's T-squared distribution
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Type of probability distribution}} {{DISPLAYTITLE:Hotelling's ''T''-squared distribution}} {{redirect|Multivariate testing}} {{Probability distribution | name = Hotelling's T<sup>2</sup> distribution | type = density | pdf_image = [[Image:Hotelling-pdf.png|325px]]| | cdf_image = [[Image:Hotelling-cdf.png|325px]]| | parameters = ''p'' - dimension of the random variables <br/> ''m'' - related to the sample size| | support = <math>x \in (0, +\infty)\;</math> if <math>p = 1</math><br/> <math>x \in [0, +\infty)\;</math> otherwise. }} In [[statistics]], particularly in [[hypothesis testing]], the '''Hotelling's ''T''-squared distribution''' ('''''T''<sup>2</sup>'''), proposed by [[Harold Hotelling]],<ref name=H1931 /> is a [[multivariate probability distribution]] that is tightly related to the [[F-distribution|''F''-distribution]] and is most notable for arising as the distribution of a set of [[statistic|sample statistics]] that are natural generalizations of the statistics underlying the [[Student's t-distribution|Student's ''t''-distribution]]. The '''Hotelling's ''t''-squared statistic''' ('''''t''<sup>2</sup>''') is a generalization of [[Student's t-statistic|Student's ''t''-statistic]] that is used in [[multivariate statistics|multivariate]] [[hypothesis testing]].<ref name='jonhson'>{{cite book|author1=Johnson, R.A.|author2=Wichern, D.W.|year=2002|title=Applied multivariate statistical analysis|volume=5|issue=8|publisher=Prentice hall}}</ref> ==Motivation== The distribution arises in [[multivariate statistics]] in undertaking [[statistical hypothesis test|tests]] of the differences between the (multivariate) means of different populations, where tests for univariate problems would make use of a [[t-test|''t''-test]]. The distribution is named for [[Harold Hotelling]], who developed it as a generalization of Student's ''t''-distribution.<ref name=H1931>{{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}}</ref> ==Definition== 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> random matrix with a [[Wishart distribution]] <math>W(\mathbf{I}_{p, p}, m)</math> with unit [[scale matrix]] and ''m'' [[degrees of freedom (statistics)|degrees of freedom]], and ''d'' and ''M'' are independent of each other, 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> It can be shown<!-- But someone should put a proof of this fact somewhere in this article. --> that if a random variable ''X'' has Hotelling's ''T''-squared distribution, <math>X \sim T^2_{p,m}</math>, then:<ref name=H1931/> :<math> \frac{m-p+1}{pm} X\sim F_{p,m-p+1} </math> where <math>F_{p,m-p+1}</math> is the [[F-distribution|''F''-distribution]] with parameters ''p'' and ''m'' − ''p'' + 1. ==Hotelling ''t''-squared statistic== Let <math>\hat{\mathbf \Sigma}</math> be the [[sample covariance]]: : <math> \hat{\mathbf \Sigma} = \frac 1 {n-1} \sum_{i=1}^n (\mathbf{x}_i -\overline{\mathbf{x}}) (\mathbf{x}_i-\overline{\mathbf{x}})' </math> where we denote [[transpose]] by an [[apostrophe]]. It can be shown that <math>\hat{\mathbf \Sigma}</math> is a [[positive-definite matrix|positive (semi) definite]] matrix and <math>(n-1)\hat{\mathbf \Sigma}</math> follows a ''p''-variate [[Wishart distribution]] with ''n'' − 1 degrees of freedom.<ref name="MKB">{{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 }}</ref> The sample covariance matrix of the mean reads <math>\hat{\mathbf \Sigma}_\overline{\mathbf x}=\hat{\mathbf \Sigma}/n</math>.<ref name="Fogelmark2018">{{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 }}</ref> The '''Hotelling's ''t''-squared statistic''' is then defined as:<ref>{{Cite web | url=http://www.itl.nist.gov/div898/handbook/pmc/section5/pmc543.htm | title=6.5.4.3. Hotelling's ''T'' squared}}</ref> : <math> 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}), </math> which is proportional to the [[Mahalanobis distance]] between the sample mean and <math>\boldsymbol{\mu}</math>. Because of this, one should expect the statistic to assume low values if <math>\overline{\mathbf x} \approx \boldsymbol{\mu}</math>, and high values if they are different. From the [[#Distribution|distribution]], :<math>t^2 \sim T^2_{p,n-1}=\frac{p(n-1)}{n-p} F_{p,n-p} ,</math> where <math>F_{p,n-p}</math> is the [[F-distribution|''F''-distribution]] with parameters ''p'' and ''n'' − ''p''. In order to calculate a [[p-value|''p''-value]] (unrelated to ''p'' variable here), note that the distribution of <math>t^2</math> equivalently implies that :<math> \frac{n-p} {p(n-1)} t^2 \sim F_{p,n-p} .</math> 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 <math>\mathcal{N}_p(\boldsymbol{\mu},{\mathbf \Sigma})</math> denote a [[multivariate normal distribution|''p''-variate normal distribution]] with [[location parameter|location]] <math>\boldsymbol{\mu}</math> and known [[covariance matrix|covariance]] <math>{\mathbf \Sigma}</math>. Let :<math>{\mathbf x}_1,\dots,{\mathbf x}_n\sim \mathcal{N}_p(\boldsymbol{\mu},{\mathbf \Sigma})</math> be ''n'' independent identically distributed (iid) [[random variable]]s, which may be represented as <math>p\times1</math> column vectors of real numbers. Define :<math>\overline{\mathbf x}=\frac{\mathbf{x}_1+\cdots+\mathbf{x}_n}{n}</math> to be the [[sample mean]] with covariance <math>{\mathbf \Sigma}_\overline{\mathbf x}={\mathbf \Sigma}/ n</math>. It can be shown that :<math>(\overline{\mathbf x}-\boldsymbol{\mu})'{\mathbf \Sigma}_\overline{\mathbf x}^{-1}(\overline{\mathbf x}-\boldsymbol{\mathbf\mu})\sim\chi^2_p ,</math> where <math>\chi^2_p</math> is the [[chi-squared distribution]] with ''p'' degrees of freedom.<ref>End of chapter 4.2 of {{harvp|Johnson, R.A.|Wichern, D.W.|2002}}</ref> {{Collapse top|title=Proof}} {{math proof|Every positive-semidefinite symmetric matrix <math display=inline> \boldsymbol M</math> has a positive-semidefinite symmetric square root <math display=inline> \boldsymbol M^{1/2} </math>, and if it is nonsingular, then its inverse has a positive-definite square root <math display=inline> \boldsymbol M^{-1/2} </math>. Since <math display=inline> \operatorname{var}\left( \overline{\boldsymbol x} \right) = \mathbf\Sigma_\overline{\mathbf x} </math>, we have <math display=block> \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} </math> Consequently <math display=block> (\overline{\boldsymbol x}- \boldsymbol \mu)^T \mathbf\Sigma_\overline{x}^{-1} (\overline{\boldsymbol x}- \boldsymbol \mu) = \left( \mathbf\Sigma_\overline{x}^{-1/2} (\overline{\boldsymbol x}- \boldsymbol \mu) \right)^T \left( \mathbf\Sigma_\overline{x}^{-1/2} (\overline{\boldsymbol x}- \boldsymbol \mu) \right) </math> and this is simply the sum of squares of <math display=inline> p </math> independent standard normal random variables. Thus its distribution is <math display=inline> \chi^2_p. </math> }} Alternatively, one can argue using density functions and characteristic functions, as follows. {{math proof| To show this use the fact that <math>\overline{\mathbf x}\sim \mathcal{N}_p(\boldsymbol{\mu},{\mathbf \Sigma}/n)</math> and derive the [[Characteristic function (probability theory)|characteristic function]] of the random variable <math>\mathbf y = (\bar{\mathbf x}-\boldsymbol{\mu})'{\mathbf \Sigma}_\bar{\mathbf x}^{-1}(\bar{\mathbf x}-\boldsymbol{\mathbf\mu}) = (\bar{\mathbf x}-\boldsymbol{\mu})'({\mathbf \Sigma} / n)^{-1}(\bar{\mathbf x}-\boldsymbol{\mathbf\mu})</math>. As usual, let <math>| \cdot |</math> denote the [[determinant]] of the argument, as in <math>| \boldsymbol\Sigma |</math>. By definition of characteristic function, we have:<ref>{{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}}</ref> :<math> \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} </math> There are two exponentials inside the integral, so by multiplying the exponentials we add the exponents together, obtaining: :<math> \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} </math> Now take the term <math>|\boldsymbol\Sigma/n|^{-1/2}</math> off the integral, and multiply everything by an identity <math>I = |(\boldsymbol\Sigma^{-1}-2 i \theta \boldsymbol\Sigma^{-1})^{-1} / n|^{1/2} \;\cdot\; |(\boldsymbol\Sigma^{-1}-2 i \theta \boldsymbol\Sigma^{-1})^{-1} / n|^{-1/2}</math>, bringing one of them inside the integral: :<math> \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} </math> But the term inside the integral is precisely the probability density function of a [[multivariate normal distribution]] with covariance matrix <math>(\boldsymbol\Sigma^{-1}-2 i \theta \boldsymbol\Sigma^{-1})^{-1} / n = \left[ n (\boldsymbol\Sigma^{-1}-2 i \theta \boldsymbol\Sigma^{-1}) \right]^{-1}</math> and mean <math>\mu</math>, so when integrating over all <math>x_1, \dots, x_p</math>, it must yield <math>1</math> 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: :<math> \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} </math> where <math>I_p</math> is an identity matrix of dimension <math>p</math>. Finally, calculating the determinant, we obtain: :<math> \begin{align} & = (1-2 i \theta)^{-p/2} \end{align} </math> which is the characteristic function for a [[chi-square distribution]] with <math>p</math> degrees of freedom. <math>\;\;\;\blacksquare</math> }} {{Collapse bottom}} ==Two-sample statistic== If <math>{\mathbf x}_1,\dots,{\mathbf x}_{n_x}\sim N_p(\boldsymbol{\mu},{\mathbf \Sigma})</math> and <math>{\mathbf y}_1,\dots,{\mathbf y}_{n_y}\sim N_p(\boldsymbol{\mu},{\mathbf \Sigma})</math>, with the samples [[statistical independence|independently]] drawn from two [[statistical independence|independent]] [[multivariate normal distribution]]s with the same mean and covariance, and we define :<math>\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</math> as the sample means, and :<math>\hat{\mathbf \Sigma}_{\mathbf x}=\frac{1}{n_x-1}\sum_{i=1}^{n_{x}} (\mathbf{x}_i-\overline{\mathbf x})(\mathbf{x}_i-\overline{\mathbf x})'</math> :<math>\hat{\mathbf \Sigma}_{\mathbf y}=\frac{1}{n_y-1}\sum_{i=1}^{n_{y}} (\mathbf{y}_i-\overline{\mathbf y})(\mathbf{y}_i-\overline{\mathbf y})'</math> as the respective sample covariance matrices. Then :<math>\hat{\mathbf \Sigma}= \frac{(n_x - 1) \hat{\mathbf \Sigma}_{\mathbf x} + (n_y - 1) \hat{\mathbf \Sigma}_{\mathbf y}}{n_x+n_y-2}</math> 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 :<math>t^2 = \frac{n_x n_y}{n_x+n_y}(\overline{\mathbf x}-\overline{\mathbf y})'\hat{\mathbf \Sigma}^{-1}(\overline{\mathbf x}-\overline{\mathbf y}) \sim T^2(p, n_x+n_y-2)</math> ===Related concepts=== It can be related to the F-distribution by<ref name="MKB"/> :<math>\frac{n_x+n_y-p-1}{(n_x+n_y-2)p}t^2 \sim F(p,n_x+n_y-1-p).</math> The non-null distribution of this statistic is the [[noncentral F-distribution]] (the ratio of a [[Noncentral chi-squared distribution|non-central Chi-squared]] random variable and an independent central [[Chi-squared distribution|Chi-squared]] random variable) :<math>\frac{n_x+n_y-p-1}{(n_x+n_y-2)p}t^2 \sim F(p,n_x+n_y-1-p;\delta),</math> with :<math>\delta = \frac{n_x n_y}{n_x+n_y}\boldsymbol{d}'\mathbf{\Sigma}^{-1}\boldsymbol{d},</math> where <math>\boldsymbol{d}=\mathbf{\overline{x} - \overline{y}}</math> is the difference vector between the population means. In the two-variable case, the formula simplifies nicely allowing appreciation of how the correlation, <math>\rho</math>, between the variables affects <math>t^2</math>. If we define :<math>d_{1} = \overline{x}_{1}-\overline{y}_{1}, \qquad d_{2} = \overline{x}_{2}-\overline{y}_{2}</math> and :<math>s_1 = \sqrt{\Sigma_{11}} \qquad s_2 = \sqrt{\Sigma_{22}} \qquad \rho = \Sigma_{12}/(s_1 s_2) = \Sigma_{21}/(s_1 s_2)</math> then :<math>t^2 = \frac{n_x n_y}{(n_x+n_y)(1-\rho ^2)} \left [ \left ( \frac{d_1}{s_1} \right )^2+\left ( \frac{d_2}{s_2} \right )^2-2\rho \left ( \frac{d_1}{s_1} \right )\left ( \frac{d_2}{s_2} \right ) \right ] </math> Thus, if the differences in the two rows of the vector <math>\mathbf d = \overline{\mathbf x}-\overline{\mathbf y}</math> are of the same sign, in general, <math>t^2</math> becomes smaller as <math>\rho</math> becomes more positive. If the differences are of opposite sign <math>t^2</math> becomes larger as <math>\rho</math> 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.<ref>{{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}}</ref><ref>{{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}}</ref> ==See also== *[[Student's t-test|Student's ''t''-test]] in univariate statistics * [[Student's t-distribution|Student's ''t''-distribution]] in univariate probability theory * [[Multivariate Student distribution]] * [[F-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]], [[Samuel S. Wilks|Wilks's]] ''Λ'' is to Hotelling's ''T''<sup>2</sup> as [[George W. Snedecor|Snedecor's]] ''F'' is to [[William Sealy Gosset|Student's]] ''t'' in univariate statistics) ==References== {{reflist}} ==External links== * {{SpringerEOM | title=Hotelling ''T''<sup>2</sup>-distribution |id=H/h048070 |first=A.V. |last=Prokhorov}} {{ProbDistributions|continuous-semi-infinite}} {{DEFAULTSORT:Hotelling's T-Squared Distribution}} [[Category:Continuous distributions]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Anchor
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:Collapse bottom
(
edit
)
Template:Collapse top
(
edit
)
Template:Further
(
edit
)
Template:Harvp
(
edit
)
Template:Math proof
(
edit
)
Template:ProbDistributions
(
edit
)
Template:Probability distribution
(
edit
)
Template:Redirect
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:SpringerEOM
(
edit
)