title: Random boolean generator
body: <p>is there a method which allows me to generate a boolean based on some percentages?</p>
  
  <p>For example I need a generator which has a 25% chance of giving me false.</p>
  
  <p>Right now I am doing :</p>
  
  <pre><code>val rand = new Random()
  val a = List(true,true,true,false)
  val isFailure = a(rand.nextInt(4))
  </code></pre>
  
  <p>I am doing this to get my "25%" chance of failure but I am not sure if this is the correct way and I am pretty sure there is a better way.</p>
  
  <p>Can someone guide me on where to look or how to do it?</p>