Permutation test for binomial data
Based on Jake Vanderplas' presentation Statistics for Hackers video, section 2 Shuffling It's almost the same setup as in the presentation, the only missing piece is how to break down binomial data into individual examples (Bernoulli trials). One way is to represent it with a sequence of k 1s and (n - k) 0s. For example, n=5, k=2 could...
world.hey.com