why does rbinom(1,1) differ from sample(0:1,1) with the same seed?
This rather legitimate question was posted on X validated last week, the answer being that the C codes behind both functions do not use pseudo-random generators in the same manner....continue reading.