Created
October 15, 2016 11:21
-
-
Save vjcitn/f224425a527414f353a108e2dfa3d7fc to your computer and use it in GitHub Desktop.
simple implementation of lincoln petersen population size estimation applied to letters
This file contains hidden or 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
lincpet = function(ssize=17) { | |
s1 = sample(letters, size=ssize, replace=FALSE) | |
s2 = sample(letters, size=ssize, replace=FALSE) | |
ssize^2/length(intersect(s1,s2)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment