
HOTELLING TWO SAMPLE TSQUAREName:
Here, U_{1} is a vector of population means from sample 1, that is, the hypothesized means for each column of matrix 1. Likewise, U_{2} is a vector of population means from sample 2, that is, the hypothesized means for each column of matrix 2. The 2sample t ^{2} test statistic is defined as:
where contains the sample means for each of the columns of matrix 1, contains the sample means for each of the columns of matrix 2, N_{1} is the sample size for matrix 1, N_{2} is the sample size for matrix 2, and is the inverse of the pooled variancecovariance matrices of and . T ^{2} is distributed as F(p,n1+n2p1) where n1 is the number of obserations for matrix 1, n2 is the number of observations for matrix 2, p is the number of columns (variables), and F is the F distribution. We reject the null hypothesis if the t ^{2} test statistic is greater than the critical value from the F distribution. This command returns a parameter that contains the value of the Hotelling T ^{2} test statistic. The critical values corresponding to alpha = .10, .05, .01, and .005 are saved in the internal parameters B90, B95, B99, and B995 respectively.
where <mat1> is a matrix containing the data for the first sample of the 2sample Hotelling t ^{2} test; where <mat2> is a matrix containing the data for the second sample of the 2sample Hotelling t ^{2} test; and where <par> is a parameter where the value of the 2sample Hotelling t ^{2} test statistic is saved.
HOTELLING 2 SAMPLE TSQUARE HOTELLING 2 SAMPLE T2
SKIP 25 READ IRIS.DAT X1 X2 X3 X4 TAG SKIP 0 LET Z1 = X1 LET Z2 = X2 LET Z3 = X3 LET Z4 = X4 RETAIN X1 X2 X3 X4 SUBSET TAG = 1 RETAIN Z1 Z2 Z3 Z4 SUBSET TAG = 2 LET N1 = SIZE X1 LET N2 = SIZE Z1 LET M = MATRIX DEFINITION X1 N1 4 LET N = MATRIX DEFINITION Z1 N2 4 LET A = 2SAMPLE HOTELLING TSQUARE M N PRINT "2SAMPLE HOTELLING TSQUARE TEST STATISTIC = ^A" PRINT "90% CRITICAL VALUE = ^B90" PRINT "95% CRITICAL VALUE = ^B95" PRINT "99% CRITICAL VALUE = ^B99" 
Date created: 6/5/2001
Last updated: 7/9/2001
Please email comments on this WWW page to
alan.heckert@nist.gov.