Skip to content

Instantly share code, notes, and snippets.

@robdimarco
Created January 6, 2016 03:47
Show Gist options
  • Save robdimarco/defa5baa586041849391 to your computer and use it in GitHub Desktop.
Save robdimarco/defa5baa586041849391 to your computer and use it in GitHub Desktop.
require 'distribution';
def prob(n, p); Distribution::Normal.rng(n*p, (n*p*(1-p))**0.5).call / n; end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment