a=[0:45]; y=binomial_pdf(a,45,0.5); a(17) # ans = 16 sum(y(1:17)) # ans = 0.036227 y(17) 1.0/46 y(17) / ( (1.0/46) + y(17) ) 1.0 - y(17) / ( (1.0/46) + y(17) ) 2.0/46 1.0 - y(17) / ( (2.0/46) + y(17) ) disp "find the best prob ratio we could possibly have" z=binomial_pdf(a,45,16.0/45.0); z(17) z(17)/(y(17)+z(17)) #ans = 0.12347 #ans = 0.87043