----------------- help for t2demo -----------------Tsquared Demonstration ----------------------

t2demo

Description -----------

t2demo creates data for 2 group t-tests on variable X and variable Y. You can then compare the results of the univariate t-tests on X an Y with the multivariate Tsquare test comparing the centroids of X and Y.

You can vary... the differences between Xbar1 and Xbar2 (by moving the values for group 1) the differences between Ybar1 and Ybar2 (by moving the values for group 2) the correlation between X and Y the sample size for X and Y

This allows you to see that it is possible for the univariate t-tests for X and > Y to be non-significant but the multivariate test is significant.

Try some of the following...

Make the difference between Xbar1-Xbar2 = .2 Make the difference between Ybar1-Ybar2 = .2 Compare the univariate t-tests with the multivariate T2 test.

Change the value of r to .4. What happens to the multivariate T2 test.

Change the value of r to -.4. What happens to the multivariate T2 test.

Change the value of r to .99. Change the value of r to -.99. Can you visually see how the correlation impacts the ability to see separation between the groups? What value of r (.99 or -.99) leads to the clearest separation. .- Make the difference between Xbar1-Xbar2 = .2 Make the difference between Ybar1-Ybar2 = -.2 Change the value of r to .99. Change the value of r to -.99. Can you visually see how the correlation impacts the ability to see separation between the groups? What value of r (.99 or -.99) leads to the clearest separation. Is this different from above?

Author ------

Statistical Consulting Group Institute for Digital Research and Education, UCLA idrestat@ucla.edu