Switch to unified view

a b/Semantic Features/isNotGreaterTTest.m
1
function [ p ] = isNotGreaterTTest( x1, x2, y1, y2 )
2
%isGreaterTTest "mean of X1 is greater than mean of X2"
3
%   High p -> Hnull: X1 = X2 (X1 <= X2)
4
%   Low  p -> Halt : X1 > X2 
5
6
%x2 should be rt. 
7
x1 = round(x1); %convert to classifications
8
x2 = round(x2);
9
y1 = round(y1);
10
y2 = round(y2);
11
x1Success = (x1 == y1);
12
x2Success = (x2 == y2);
13
[is, p, confInt, stats] = ttest2(x1Success, x2Success, 'tail', 'right', 'Vartype', 'unequal');
14
%[is, p, confInt, stats] = ttest2(x1Success, x2Success, 0.01, 'right', 'unequal'); %for older matlab versions
15
16
%should change to just return is so can use as a logic test
17
18
end
19