The “sample” function in the statistical programming language R is biased… See screenshot. Possible fix: github.com/daqana/dqsample
1
12
2
30
Was reported fixed in R 3.6.0 @eddelbuettel
2
2
6
$ docker run --rm -ti r-base:3.5.3 Rscript -e 'print(table(sample(1717986919,1000000,replace=TRUE)%%2))' 0 1 466675 533325 $ docker run --rm -ti r-base:3.6.2 Rscript -e 'print(table(sample(1717986919,1000000,replace=TRUE)%%2))' 0 1 499802 500198 $

Dec 27, 2019 · 10:38 PM UTC

7