title: How to test if mortality rate is correct
body: <p>This question is related to <a href="https://stackoverflow.com/questions/49360142/get-the-mean-age-of-all-turtles-on-the-time-of-death">a question</a> I asked some time ago.</p>
  
  <p>I am trying to create a population in NetLogo. Therefore, I am trying to start with the mortality rate. However, I am not sure how to test if my code works. The age of the oldest dying turtles seems to be fine, however when I print the mean death-ages it is way too high and I don't know how to solve that.</p>
  
  <p>The model is available <a href="https://box.hu-berlin.de/f/13e000b5ccf0411ca77e/?dl=1" rel="nofollow noreferrer">here</a>.</p>
  
  <p>The problem might be the calculation of the probability of dying which I did as follows:</p>
  
  <pre><code>  if (gender = "female") [
      let die-val mortality-female age ; mortality prob included for the age of the turtle
      if (die-val &gt;= random-float 1)[
         set prob-die? true
      ]
    ]
  </code></pre>