%Exercise 2.1
clear all
samples=nchoosek([160,220,850,510,110],2)
summary=[samples mean(samples,2),var(samples,0,2)]
EXBAR=sum(summary(:,3))/length(summary(:,3))
VAR=sum(summary(:,3).^2)/length(summary(:,3))-EXBAR^2
SE=sqrt(VAR)
 
clear all
samples=nchoosek([160,220,850,510,110],4)
summary=[samples mean(samples,2),var(samples,0,2)]
EXBAR=sum(summary(:,5))/length(summary(:,5))
VAR=sum(summary(:,5).^2)/length(summary(:,5))-EXBAR^2
SE=sqrt(VAR)