title: Generating a random number with weighted probability - 'Distribution' gem
body: <p>I would like to create a random number generator, that generates a random decimal number:</p>
  
  <ul>
  <li>Greater than 0.0</li>
  <li>Less than 15.0</li>
  <li>Where the probability of that number being close to 2.0 is relatively high</li>
  <li>The probability of it being near 15.0 or very close to zero is very low</li>
  </ul>
  
  <p>I'm terrifically poor at mathematics but my research seems to tell me I want to pull a random number from a Cumulative Distribution Function resembling a Fisher–Snedecor (F) pattern, a bit like this one:</p>
  
  <p><a href="http://cdn.app.compendium.com/uploads/user/458939f4-fe08-4dbc-b271-efca0f5a2682/742d7708-efd3-492c-abff-6044d78e3bbd/Image/6303a2314437d8fcf2f72d9a56b1293a/f_distribution_probability.png" rel="nofollow">http://cdn.app.compendium.com/uploads/user/458939f4-fe08-4dbc-b271-efca0f5a2682/742d7708-efd3-492c-abff-6044d78e3bbd/Image/6303a2314437d8fcf2f72d9a56b1293a/f_distribution_probability.png</a></p>
  
  <p>I am using a Ruby gem called Distribution (<a href="https://github.com/sciruby/distribution" rel="nofollow">https://github.com/sciruby/distribution</a>) to try and achieve this. It looks like the right tool, but I'm having a terrible time trying to understand how to use it to achieve the desired outcome :( Any help please.</p>