01 / 21
\( T^2 \)

Hotelling's \( T^2 \)

The multivariate generalization of the Student's \( t \)-test: how to test hypotheses about mean vectors when you have correlated variables.

Statistics Multivariate Analysis

Why Go Multivariate?

In many real-world problems we measure several variables simultaneously on each subject: blood pressure and heart rate, test scores across subjects, chemical concentrations in a sample. Running separate univariate \( t \)-tests for each variable inflates the Type I error rate and ignores the correlation structure among variables.

From \( t \) to \( T^2 \)

Univariate \( t \)-test
One variable \( X \). Tests \( H_0\!: \mu = \mu_0 \) using \( t = \frac{\bar{x} - \mu_0}{s / \sqrt{n}} \).
Multivariate \( T^2 \)
\( p \) variables. Tests \( H_0\!: \boldsymbol{\mu} = \boldsymbol{\mu}_0 \) using the mean vector and sample covariance matrix \( \mathbf{S} \).

The Key Ingredients

\( \bar{\mathbf{x}} \)
Sample mean vector: a \( p \times 1 \) column of variable means.
\( \boldsymbol{\mu}_0 \)
Hypothesized mean vector under \( H_0 \).
\( \mathbf{S} \)
Sample covariance matrix (\( p \times p \)), capturing variances and correlations.

The \( T^2 \) Statistic

1
Deviation: Compute \( \mathbf{d} = \bar{\mathbf{x}} - \boldsymbol{\mu}_0 \), the \( p \times 1 \) difference vector.
2
Standardize: Multiply by \( \mathbf{S}^{-1} \) to account for variance and covariance.
3
Quadratic form: \( \mathbf{d}^\top \mathbf{S}^{-1} \mathbf{d} \) gives a scalar measuring the squared Mahalanobis distance.
4
Scale by \( n \): Multiply to account for sample size.

Geometric Intuition

\( x_1 \) \( x_2 \) \( \boldsymbol{\mu}_0 \) \( \bar{\mathbf{x}} \) \( \mathbf{d} \) Confidence ellipse
(constant \( T^2 \) contour)

\( T^2 \) measures the squared Mahalanobis distance from the sample mean \( \bar{\mathbf{x}} \) to the hypothesized mean \( \boldsymbol{\mu}_0 \). The ellipse represents a contour of constant \( T^2 \): if \( \bar{\mathbf{x}} \) falls outside the critical ellipse, we reject \( H_0 \).

The \( F \)-Transformation

Under \( H_0 \), \( T^2 \) does not follow a standard distribution directly. We transform it into an \( F \)-statistic for critical value lookup:

\( p \)
Number of variables (numerator df)
\( n - p \)
Denominator degrees of freedom
Reject \( H_0 \)
When \( F > F_{\alpha,\;p,\;n-p} \)

Required Assumptions

1
Multivariate normality: The \( p \)-dimensional observations \( \mathbf{x}_1, \dots, \mathbf{x}_n \) are drawn from a multivariate normal distribution.
2
Random sampling: Observations are independent and identically distributed (i.i.d.).
3
Non-singular covariance: The population covariance matrix \( \boldsymbol{\Sigma} \) is positive definite (so \( \mathbf{S}^{-1} \) exists). Requires \( n > p \).
4
No extreme outliers: \( T^2 \) is sensitive to outliers since it relies on the sample mean and covariance.

\( T^2 \) vs. Multiple \( t \)-tests

Hotelling's \( T^2 \) Separate \( t \)-tests
Variables tested All \( p \) simultaneously One at a time
Correlation Fully accounted for Ignored
Type I error Controlled at \( \alpha \) Inflated: \( 1 - (1-\alpha)^p \)
Power Higher when variables correlated May miss multivariate signal
Output Single \( F \)-statistic \( p \) separate \( p \)-values

Step-by-Step Procedure

1
State hypotheses: \( H_0\!: \boldsymbol{\mu} = \boldsymbol{\mu}_0 \) vs. \( H_1\!: \boldsymbol{\mu} \neq \boldsymbol{\mu}_0 \).
2
Compute \( \bar{\mathbf{x}} \): Calculate the sample mean vector from your \( n \) observations.
3
Compute \( \mathbf{S} \): Calculate the \( p \times p \) sample covariance matrix.
4
Calculate \( T^2 \): \( T^2 = n\,(\bar{\mathbf{x}} - \boldsymbol{\mu}_0)^\top \mathbf{S}^{-1} (\bar{\mathbf{x}} - \boldsymbol{\mu}_0) \).
5
Transform to \( F \): \( F = \dfrac{n - p}{p(n-1)} T^2 \).
6
Decision: Reject \( H_0 \) if \( F > F_{\alpha,\;p,\;n-p} \).

Example 1: \( p = 2 \) Variables

A sample of \( n = 20 \) patients has mean blood pressure and cholesterol: \( \bar{\mathbf{x}} = \begin{pmatrix} 130 \\ 210 \end{pmatrix} \). Test against the healthy standard \( \boldsymbol{\mu}_0 = \begin{pmatrix} 120 \\ 200 \end{pmatrix} \) with:

Example 1: Decision

We compare to \( F_{0.05,\;2,\;18} = 3.55 \).

\( F = 11.10 \)
Observed test statistic
\( F_{\text{crit}} = 3.55 \)
Critical value at \( \alpha = 0.05 \)

Example 2: Two-Sample \( T^2 \)

Hotelling's \( T^2 \) extends to two independent samples. Given groups with sizes \( n_1, n_2 \) and means \( \bar{\mathbf{x}}_1, \bar{\mathbf{x}}_2 \), and a pooled covariance \( \mathbf{S}_p \):

Example 3: Paired \( T^2 \)

For paired multivariate data (e.g., before/after treatment on \( p \) variables), compute the difference vectors \( \mathbf{d}_i = \mathbf{x}_{i,\text{after}} - \mathbf{x}_{i,\text{before}} \), then apply the one-sample \( T^2 \) to the differences:

Common Mistakes

✕ Using \( n < p \)
If the sample size is smaller than the number of variables, \( \mathbf{S} \) is singular and \( \mathbf{S}^{-1} \) does not exist. You need \( n > p \).
✕ Ignoring normality
Hotelling's \( T^2 \) assumes multivariate normality. Skewed or heavy-tailed data can inflate the statistic. Always check with Q-Q plots or Mardia's test.
✕ Multiple separate \( t \)-tests
Running \( p \) univariate tests at \( \alpha = 0.05 \) inflates the family-wise error rate. Use \( T^2 \) for the omnibus test first.

Summary: Three Variants

One-Sample Two-Sample Paired
Hypothesis \( \boldsymbol{\mu} = \boldsymbol{\mu}_0 \) \( \boldsymbol{\mu}_1 = \boldsymbol{\mu}_2 \) \( \boldsymbol{\mu}_d = \mathbf{0} \)
Data input \( \bar{\mathbf{x}},\;\mathbf{S} \) \( \bar{\mathbf{x}}_1, \bar{\mathbf{x}}_2,\;\mathbf{S}_p \) \( \bar{\mathbf{d}},\;\mathbf{S}_d \)
\( F \) df \( p,\;n-p \) \( p,\;n_1\!+\!n_2\!-\!p\!-\!1 \) \( p,\;n-p \)
Assumes MVN, \( \mathbf{S} \) invertible MVN, equal \( \boldsymbol{\Sigma} \) MVN of differences

Question 1 of 5

When \( p = 1 \), Hotelling's \( T^2 \) reduces to which of the following?

Question 2 of 5

What role does \( \mathbf{S}^{-1} \) play in the \( T^2 \) statistic?

Question 3 of 5

You have \( p = 4 \) variables and \( n = 25 \) observations. After computing \( T^2 = 18.5 \), what is the corresponding \( F \)-statistic?

Question 4 of 5

Why is it problematic to run separate univariate \( t \)-tests instead of Hotelling's \( T^2 \)?

Question 5 of 5

For the two-sample Hotelling's \( T^2 \) test, which additional assumption is required beyond those of the one-sample test?