load('../Data/StudData2014.txt')

hogde=StudData2014(:,1);
hogdeMor=StudData2014(:,2);
hogdeFar=StudData2014(:,3);
kjonn=StudData2014(:,4);
har=StudData2014(:,5);
auge=StudData2014(:,6);
Matlab=StudData2014(:,7);



%The event A: brown hair
flystHar=find(har==1);
antlystHar= length(flystHar)

%The event B: brown eyes
fblaaAuge=find(auge==1);
antblaaAuge=length(fblaaAuge)

% A \cap B, brown eys and brown hair
fblondogblaa=find(auge==1 & har==1);
antblondogblaa=length(fblondogblaa)

%Pr(A \cup B)
pr=(antlystHar+antblaaAuge-antblondogblaa)/length(har)

%Antall lys og bl? og kvinne
fblondblaakvinne=find(kjonn==2 & auge==1 & har==1);
antblondblaakvinne=length(fblondblaakvinne)
