python3 binomial-select.py # First experiment. Arm1 is much better than arm2. # Error decreases quickly p1 = 0.9, p2 = 0.2 Both have 1 simulations. Prob. of wrong arm choice 0.15 Both have 2 simulations. Prob. of wrong arm choice 0.059 Both have 3 simulations. Prob. of wrong arm choice 0.025259999999999994 Both have 4 simulations. Prob. of wrong arm choice 0.011246000000000004 Both have 5 simulations. Prob. of wrong arm choice 0.0051226799999999975 Both have 6 simulations. Prob. of wrong arm choice 0.0023690782400000005 Both have 7 simulations. Prob. of wrong arm choice 0.0011075557344000003 Both have 8 simulations. Prob. of wrong arm choice 0.0005220228824960002 Both have 9 simulations. Prob. of wrong arm choice 0.0002476139391167996 Both have 10 simulations. Prob. of wrong arm choice 0.0001180533944963841 # Second experiment - arms closer together # Probability of error drops, but much slower p1 = 0.5, p2 = 0.4 Both have 1 simulations. Prob. of wrong arm choice 0.45000000000000007 Both have 2 simulations. Prob. of wrong arm choice 0.425 Both have 3 simulations. Prob. of wrong arm choice 0.4065 Both have 4 simulations. Prob. of wrong arm choice 0.39125000000000015 Both have 5 simulations. Prob. of wrong arm choice 0.37804499999999996 Both have 6 simulations. Prob. of wrong arm choice 0.36628250000000023 Both have 7 simulations. Prob. of wrong arm choice 0.3556102500000004 Both have 8 simulations. Prob. of wrong arm choice 0.34580112500000043 Both have 9 simulations. Prob. of wrong arm choice 0.33669845249999975 Both have 10 simulations. Prob. of wrong arm choice 0.3281886762500006 # Arms very close. 10 simulations is not enough p1 = 0.5, p2 = 0.49 Both have 1 simulations. Prob. of wrong arm choice 0.495 Both have 2 simulations. Prob. of wrong arm choice 0.49249999999999994 Both have 3 simulations. Prob. of wrong arm choice 0.4906252499999999 Both have 4 simulations. Prob. of wrong arm choice 0.4890631250000001 Both have 5 simulations. Prob. of wrong arm choice 0.48769640623124977 Both have 6 simulations. Prob. of wrong arm choice 0.4864664843093751 Both have 7 simulations. Prob. of wrong arm choice 0.48533916977422065 Both have 8 simulations. Prob. of wrong arm choice 0.48429248312774176 Both have 9 simulations. Prob. of wrong arm choice 0.4833113130366886 Both have 10 simulations. Prob. of wrong arm choice 0.48238474543395365 # Arms extremely close p1 = 0.5, p2 = 0.49999 Both have 1 simulations. Prob. of wrong arm choice 0.499995 Both have 2 simulations. Prob. of wrong arm choice 0.4999925 Both have 3 simulations. Prob. of wrong arm choice 0.49999062500000024 Both have 4 simulations. Prob. of wrong arm choice 0.49998906250000086 Both have 5 simulations. Prob. of wrong arm choice 0.4999876953125009 Both have 6 simulations. Prob. of wrong arm choice 0.4999864648437519 Both have 7 simulations. Prob. of wrong arm choice 0.4999853369140652 Both have 8 simulations. Prob. of wrong arm choice 0.4999842895507847 Both have 9 simulations. Prob. of wrong arm choice 0.4999833076477082 Both have 10 simulations. Prob. of wrong arm choice 0.49998238029480513 # The remaining experiments are the same, but we print results less frequently # and go up to 32 simulations each p1 = 0.9, p2 = 0.2 Both have 1 simulations. Prob. of wrong arm choice 0.15 Both have 2 simulations. Prob. of wrong arm choice 0.059 Both have 4 simulations. Prob. of wrong arm choice 0.011246000000000004 Both have 8 simulations. Prob. of wrong arm choice 0.0005220228824960002 Both have 16 simulations. Prob. of wrong arm choice 1.485045900139101e-06 Both have 32 simulations. Prob. of wrong arm choice 1.6290741775267398e-11 p1 = 0.5, p2 = 0.4 Both have 1 simulations. Prob. of wrong arm choice 0.45000000000000007 Both have 2 simulations. Prob. of wrong arm choice 0.425 Both have 4 simulations. Prob. of wrong arm choice 0.39125000000000015 Both have 8 simulations. Prob. of wrong arm choice 0.34580112500000043 Both have 16 simulations. Prob. of wrong arm choice 0.28587248838323653 Both have 32 simulations. Prob. of wrong arm choice 0.21101388026526183 p1 = 0.5, p2 = 0.49 Both have 1 simulations. Prob. of wrong arm choice 0.495 Both have 2 simulations. Prob. of wrong arm choice 0.49249999999999994 Both have 4 simulations. Prob. of wrong arm choice 0.4890631250000001 Both have 8 simulations. Prob. of wrong arm choice 0.48429248312774176 Both have 16 simulations. Prob. of wrong arm choice 0.47761811979347407 Both have 32 simulations. Prob. of wrong arm choice 0.46824030016951507 p1 = 0.5, p2 = 0.49999 Both have 1 simulations. Prob. of wrong arm choice 0.499995 Both have 2 simulations. Prob. of wrong arm choice 0.4999925 Both have 4 simulations. Prob. of wrong arm choice 0.49998906250000086 Both have 8 simulations. Prob. of wrong arm choice 0.4999842895507847 Both have 16 simulations. Prob. of wrong arm choice 0.4999776080105575 Both have 32 simulations. Prob. of wrong arm choice 0.4999682090388194