This repository has been archived on 2021-05-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2015-10-15 18:18:56 +02:00

22 lines
340 B
Matlab

load thymusglandweights.dat
n = 10;
x = thymusglandweights;
m = 5000;
for i = 1:m
idx = randi(length(x), n,1);
y = x(idx);
[h,p] = ttest(y, 34.3);
if h == 1
disp(['p-value: ', num2str(p)]);
disp(['mu: ', num2str(mean(y))]);
disp(['mu total: ', num2str(mean(x))]);
break
end
end