Generating values for binomial or Poisson distributions