News for hackers. Stuff that matters.
Re:Why Are US Presidential Elections So Close? by ryanmonroe on Thursday November 03, 2016 @06:07PM (#12868446)
Pretty amazing. If the outcome is determined by 100 million independent coin flips, the probability of a margin greater than one tenth of a percent is 1.5e-23. In R

    n      <- 100000000
    diff   <- 0.1/100
    a_wins <- n*(1-diff)/2
    b_wins <- n*(1+diff)/2
    p1 <- pbinom(a_wins, size = n, prob = 0.5)
    p2 <- pbinom(b_wins, size = n, prob = 0.5, lower.tail = F)
    p1 + p2 # = 1.523959e-23

There are no comments on this comment yet.