Created
August 9, 2014 16:06
-
-
Save DavidBruant/4fd1384487c867b04d21 to your computer and use it in GitHub Desktop.
draw with replacement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function yesProbabilityOverNDraws(p, n){ | |
return p * ( (1- Math.pow(1-p, n) ) )/(1- (1-p)); | |
} | |
console.log(yesProbabilityOverNDraws(0.01, 10) ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment