perform a paired t test on these two groups group1 = [25, 28, 23, 26, 27, 24, 29, 26, 28, 22, 25, 27, 23, 24, 26]; group2 = [28, 31, 26, 29, 30, 27, 32, 29, 31, 25, 28, 30, 26, 27, 29]; in matlab

main.m
% Define the two groups
group1 = [25, 28, 23, 26, 27, 24, 29, 26, 28, 22, 25, 27, 23, 24, 26];
group2 = [28, 31, 26, 29, 30, 27, 32, 29, 31, 25, 28, 30, 26, 27, 29];

% Perform paired t-test
[h, p, ci, stats] = ttest(group1, group2);
234 chars
7 lines

related categories

gistlibby LogSnag