Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

generate boolean values given a probability

807589Nov 5 2008 — edited Nov 5 2008
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 3 2008
Added on Nov 5 2008
3 comments
367 views