%Plot hight
load('../Data/StudData2012.txt')
hist(StudData2012(:,4))
boxplot(StudData2012(:,4))
boxplot(StudData2012(:,4),StudData2012(:,1))

%Make vectors with hight of men and women

indexMann=find(StudData2012(:,1)==1);
indexKvinne=find(StudData2012(:,1)==2);
hogdeMann=StudData2012(indexMann,4);
hogdeKvinne=StudData2012(indexKvinne,4);

%histograms
subplot(1,2,1)
hist(hogdeMann)
subplot(1,2,2)
hist(hogdeKvinne)

%mean
mean(hogdeMann)
mean(hogdeKvinne)

antmenn=length(indexMann)
antkvinner=length(indexKvinne)

%Probability hypothesis test
1-normcdf(mean(hogdeMann),179.8,sqrt(6.5^2/antmenn))
1-normcdf(mean(hogdeKvinne),167.2,sqrt(6.5^2/antkvinner))