title: Get random item based on multiple weights
body: <p>I'm trying to work out how to choose an item at random, based on a couple of weights. Let me explain.</p>
  <ul>
  <li>I have a person object which has an age group assigned, young, middle
  or old. This age group is a known variable.</li>
  <li>I have 3 groups, each with their own chance of being selected, but
  also weighted towards an age group.</li>
  </ul>
  <p>For example:</p>
  <ul>
  <li>Group 1 has a 50% chance of being chosen, but more if they are young.</li>
  <li>Group 2 has a 30% chance of being chosen by any age group.</li>
  <li>Group 3 has a 20% chance of being chosen, but more if they are middle
  aged.</li>
  </ul>
  <p>I'm not looking for a code hand out, but more theory to push me towards the correct answer. I know how to pick a group based on it's percentage alone, but I'm not quite sure how to weight it based on age group..</p>
  <p>Thanks in advance. :)</p>