Ttest2 on 2 matrices - does it operate on columns sequentially?

7 views (last 30 days)
Hi , I am getting myself confused about what type of Matlab function I need to use to effectively TTest two matrices one of size 3390 x 90 and the second 2160x 90 . The columns are identical in both, just the rows vary in length
I want to T Test Col 1 of the first matrix with Col 1 of second matrix , Col 2 with Col 2 and so on up to Col 90 .
If I run something like;
ttest2(matrix 1,matrix 2 ,'Alpha',0.01)
The result displays 90 columns with a 1 for significant and 0 for Null is true but is it actually comparing col 1 with col 1 etc between the matrices ?
Anyone know this?

Accepted Answer

Brendan Hamm
Brendan Hamm on 30 Jul 2015
You are correct. The columns of matrix1 are compared with the corresponding columns of matrix2. A value of 1 is indicative of a rejection of the Null in favor of the alternative hypothesis and a value of 0 is indicative of a failure to reject the null hypothesis. In this case the Null is that the corresponding columns are samples from normal distributions with equal means and equal (but unknown) variances.

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!