Real Statistics Functions: The Real Statistics Resource Pack provides the T2TEST supplemental function to handle the various Hotelling T2 tests.
T2TEST(R1, R2, type) = the p-value for Hotelling’s T2 test where type takes the value 0, 1, 2 or 3.
A type of 0 represents the one sample case, where R1 is the sample and R2 is a column vector representing the population mean column vector being tested (e.g. for Example 1 of One Sample Hotelling’s T-square, R1 is B4:F28 and R2 is I4:I8).
Types 1, 2 and 3 represent two sample tests, where R1 and R2 are the samples. As for the TTEST, the types have the following meanings:
- the samples have paired values from the same population
- the samples are from populations with the same covariance matrices
- the samples are from populations with different covariance matrices
The Real Statistics Resource Pack also provides the following functions, where R1, R2 and type are as described above.
HotellingT2 (R1, R2, type) = T2 statistic
HotellingF (R1, R2, type) = F statistic
Hotellingdf (R1, R2, type) = df2 parameter (the df1 parameter is always equal to the number of columns in R1)
Finally, the following array function combines all of the above functions:
Hotelling(R1, R2, type, lab): outputs a column range with the values T-square, df1, df2, F and p-value for Hotelling T2 test for the data in ranges R1 and R2.
Here type is as described above. If lab = TRUE a column of labels is added to the output, while if lab = FALSE (default) no labels are added.
Real Statistics Data Analysis Tool: The Real Statistics Resource Pack provides the Hotelling’s T-square data analysis tool.
For Example 1 of Hotelling’s T-square Test with Unequal Covariance Matrices, enter Ctrl-m and double click on Multivariate Analyses option. From the dialog box that appears select the Hotelling’s T-square option and click on the OK button. Now fill in the fields in the dialog box that appears as shown in Figure 1.
Figure 1 – Hotelling’s T-square dialog box
Note that the input cannot contain any non-numeric data. Thus Input Range 2 must be E5:G23 and not E5:G25.
The output is shown in Figure 2.
Figure 2 – Hotelling’s T-square data analysis tool