function mc_study(system,apriori,n)

losses=zeros(2,n);
for i=1:n
    system.x=apriori.H(:,1)+sqrt(diag(apriori.H(:,2:5))).*randn(4,1);
    losses(:,i)=srovnej(system,apriori);
end
losses(2,:)=losses(2,:)./losses(1,:);


%hist(losses(1,:));
%title([mean(losses(1,:)) median(losses(1,:))])
%AXIS([0 5 ylim])

figure
hist(losses(2,:));
title([mean(losses(2,:)) median(losses(2,:))])

end