prob.tie<-function(n,p){ c( exact=sum(dbinom(0:n,n,p)^2), approx=1/sqrt(4*pi*n*p*(1-p)) ) } > prob.tie(10,.8) exact approx 0.2238044 0.2230155 > prob.tie(100,.8) exact approx 0.07053579 0.07052370 > prob.tie(1000,.8) exact approx 0.02230190 0.02230155 > options(digits=12) > prob.tie(1e4,.8) exact approx 0.00705238082422 0.00705236979435 > prob.tie(1e5,.8) exact approx 0.00223015549369 0.00223015514519 > prob.tie(1e6,.8) exact approx 0.000705236990454 0.000705236979435 > prob.tie(1e7,.8) exact approx 0.000223015514868 0.000223015514519 Accurate to 9 significant digits!