generate boolean values given a probability
807589Nov 5 2008 — edited Nov 5 2008Hi,
I have to solve the following problem:
Generate a boolean value given that the probability of generating "true" is P
I didn't find many things on internet...I found the following class which seems to be perfect for my purpose
(see method binomial):
http://wordhoard.northwestern.edu/userman/javadoc/edu/northwestern/at/utils/math/randomnumbers/RandomVariable.html
The problem is that I cannot get this package...
Is someone able to help me?
Many thanks,
Gaia