I believe that the following post by @technocrat in this topic is not right.
I believe in this case he might be confusing pbinom
with rbinom
, as pbinom
indeed gives same result over any number of replications.
pbinom(., n, p)
calculates the CDF of Bin(n, p)
distribution, whereas rbinom(., n, p)
generates (pseudo) random observations from the same distribution. So, to get reproducible results, set.seed
can be used. But as CDF uniquely characterizes a distribution, so pbinom
will always return the same result.