Katie,
The stats extension can provide you with the binomial distribution and its cdf. I'm happy to let someone better versed in probability to correct me, but I believe that to find a random binomial between 0 and n, given the probability p, one can provide a uniform random number between 0 and 1, x, and then find the number of successes, K, for which the probability of 0 to K successes equals x. Unfortunately, the stats extension does not provide the inverse binomial, but we can calculate it from the binomial cdf. You can check the following code against what R yields. I don't have R on this machine, but I'll check when I get a chance.
extensions [stats]
to-report random-binomial [n p]
let x random-float 1
report binomial-inverse n x p
end
to-report binomial-inverse [n x p]
let r 0
while [stats:binomial-sum-to n r p <= x] [set r r + 1]
report r
end
Charles