title: Java: How do I simulate probability?
body: <p>I have a set of over 100 different probabilities ranging from 0.007379 all the way to 0.913855 (These probabilities were collected from an actuary table <a href="http://www.ssa.gov/oact/STATS/table4c6.html" rel="nofollow">http://www.ssa.gov/oact/STATS/table4c6.html</a>).  In Java, how can I use these probabilities to determine whether something will happen or not?  Something along these lines...</p>
  
  <pre><code>public boolean prob(double probability){
    if (you get lucky)
      return true;
    return false;
  }
  </code></pre>