function [chlev_ul] = get_chance_level_upper_limit2(n1,n2);
a = n1;
b = n2;
t = a+b;
p1 = (a+2)/(t+4);
s2 = p1*(1-p1)/(t+4);
s1 = sqrt(s2);
xm = norminv(0.975);    % z(1-alpha/2) where alpha=0.05
pl = p1-xm*s1;
pu = p1+xm*s1;
lbound = 1-pu;
ubound = 1-pl;
chlev_ul = ubound;
return;
