title: Generate a random boolean 70% True, 30% false
body: <p>I have the following function that generates a random boolean.
  choose_direction: function () {</p>
  
  <pre><code> var random_boolean = Math.random() &gt;= 0.5;
      if (random_boolean) {
          trade.call()
          prev_trade.goingUp = true
          console.log('Trade: CALL!!!!!!!!!!!!!!!!!!!!!!')
      } else {
          trade.put()
          prev_trade.goingUp = false
          console.log('Trade: PUT!!!!!!!!!!!!!!!!!!!!!!!!')
      }
  }
  </code></pre>
  
  <p>However, I need the distribution to be unfair. More specifically, I want the output to be 70% of the time true and 30% of the time false.</p>