**Real Statistics Functions**: The Real Statistics Resource Pack provides the T2TEST supplemental function to handle the various Hotelling T^{2} tests.

**T2TEST**(R1, R2, *type*) = the p-value for Hotelling’s T^{2} 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*) = T^{2} statistic

**HotellingF** (R1, R2, *type*) = F statistic

**Hotellingdf** (R1, R2, *type*) = *df*2 parameter (the *df*1 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*, *df*1, *df*2, *F* and p-value for Hotelling T^{2} 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**

I am not able to find the ‘Hotelling T-square tests’ in the installed Add-ins Real Statistics tools window in Excels 2007.

Can you help me out?

After pressing Ctrl-m or clicking on the tool in the Add-Ins ribbon, double click on the Multivariate Analyses option. The Hotelling T-square tests will be one of the choices on the next dialog box that appears.

Charles

Hello!

I followed the steps of Hotelling T-square test, but it always produced the following results.

Hotelling T-square Test

One-sample test

#VALUE! #VALUE!

#VALUE! #VALUE!

#VALUE! #VALUE!

#VALUE! #VALUE!

#VALUE! #VALUE!

If you send me an Excel spreadsheet with your data and results, I’ll try to find out what has gone wrong.

Charles