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. 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. Definition If the vector is Gaussian multivariate-distributed with zero mean and unit covariance matrix and is a matrix with unit scale matrix and m degrees of freedom with a Wishart distribution , then the quadratic form has a Hotelling distribution (with parameters and ): Furthermore, if a random variable X has Hotelling's T-squared distribution, , then: 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. The sample covariance matrix of the mean reads . The Hotelling's t-squared statistic is then defined as: 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. 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 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. Two-sample statistic If and , with the samples independently