Used to find the upper bound in the Adjusted Wald Interval for an estimated binomial rate.
z = z-score to use. 1.960 -> 95% margin
margin -> ties should correspond to the z-score. This routine uses both but does not have the smarts to convert between the two.
z score defaults to 1.960, and margin defaults to the matching 0.95 (95%), so unless the confidence level needs changing they can be omitted.
Some samples 5 tries, 0 drops 95% margin is 0%, calculates: 0%%
5 tries, 5 drops 95% margin is 54.928...%, calculates: 54.93%%
1000 tries, 400 drops 95% margin is 37.0072%, calculates: 37.01%%