|
a |
|
b/Semantic Features/isNotSameTTest.m |
|
|
1 |
function [ p ] = isNotSameTTest( x1, x2, y1, y2 ) |
|
|
2 |
%isNotSameTTest 'both' "means are not equal" (two-tailed test) |
|
|
3 |
% High p -> Hnull: 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, 'Vartype', 'unequal'); |
|
|
14 |
|
|
|
15 |
%should change to just return is so can use as a logic test |
|
|
16 |
|
|
|
17 |
end |
|
|
18 |
|