Joint mean test for setosa
Section of Estimation and inference for the multivariate normal, part of Statistical learning
Joint mean test for setosa
| Type | Section |
| Taught in | Estimation and inference for the multivariate normal |
| Part | Statistical learning |
The one-sample test is applied here to the two sepal measurements of Iris setosa, with illustrative null mean (5.0, 3.4) cm. That vector is a chosen comparison point. It is not a biological standard. The probability from the F calibration is exact under independent bivariate normal sampling, with n>p and nonsingular S.
x <- as.matrix(subset(iris, Species == "setosa")[, 1:2])
n <- nrow(x); p <- ncol(x)
d <- colMeans(x) - c(5.0, 3.4)
T2 <- n * drop(t(d) %*% solve(cov(x), d))
Fstat <- (n - p) * T2 / (p * (n - 1))
c(T_squared = T2, F = Fstat,
df1 = p, df2 = n - p,
p_value = pf(Fstat, p, n - p, lower.tail = FALSE))T_squared F df1 df2 p_value
0.4323 0.2117 2.0000 48.0000 0.8099
The computed p-value is 0.81. At the 5\% level this joint null is not rejected. A failure to reject does not establish that the true mean equals (5.0, 3.4). The reference distribution F_{p,n-p} is the exact null law only under the independent normal sampling used to derive the F calibration. The p-value does not check that sampling model.
Hotelling’s T^2=n(\bar{\mathbf{x}}-\boldsymbol{\mu}_0)^\top S^{-1}(\bar{\mathbf{x}}-\boldsymbol{\mu}_0) is n times the squared Mahalanobis distance of the sample mean from the hypothesised mean, in the metric of the sample covariance. It is a strictly decreasing function of the likelihood ratio. Under independent normal sampling with n>p,
\frac{n-p}{p(n-1)}T^2\sim F_{p,\,n-p}
when the null mean is true. When p=1 the statistic is the square of the ordinary t statistic. The two-sample version uses the same geometry with the pooled covariance and the coefficient n_1 n_2/(n_1+n_2).
Used in
See also
Invariance of the maximum likelihood estimator · Wishart distribution · Sampling law of the normal mean and scatter · Multivariate central limit theorem · The limit of Hotelling’s statistic · Null distribution of Hotelling’s · Two-sample Hotelling test · Likelihood of a multivariate normal sample