Statistics Toolbox | ![]() ![]() |
Hotelling's T2 (Fourth Output)
The last output of the princomp
function, t2
, is Hotelling's T2, a statistical measure of the multivariate distance of each observation from the center of the data set. This is an analytical way to find the most extreme points in the data.
[st2, index] = sort(t2); % Sort in ascending order. st2 = flipud(st2); % Values in descending order. index = flipud(index); % Indices in descending order. extreme = index(1) extreme = 213 names(extreme,:) ans = New York, NY
It is not surprising that the ratings for New York are the furthest from the average U.S. town.
![]() | The Component Variances (Third Output) | Factor Analysis | ![]() |