Hotelling’s T-square: Real Statistics Capabilities

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:

  1. the samples have paired values from the same population
  2. the samples are from populations with the same covariance matrices
  3. 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.

Hotelling's T-square dialog

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.

Hotelling's T-square analysis

Figure 2 – Hotelling’s T-square data analysis tool

6 Responses to Hotelling’s T-square: Real Statistics Capabilities

  1. Salome says:

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


    • Charles says:

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

      • Thep says:

        Hi, I have a similar problem. I have tried to change the input parameters for R1 and R2 of these functions and it still gives me a #VALUE! error output. I have checked that the data is numerical, I have tried it on a different set of data, I have re-started Excel, and I have tried to use Excel’s evaluate formula tool, but the output is still all errors. My solver is on, the ver() function outputs correctly, and other functions in the Real Statistics package is working.

        Thank you for your help.

  2. Ravikumar says:

    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?

    • Charles says:

      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.

  3. Thep says:

    Hi, I’ve figured out the issue. The formula is working, but because the data is limited (low N’s), the calculated denominators approach 0, leading Excel to return an error value. With larger/different values, the functions are working perfectly.

    Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *