Best way to model aging in an animal

34 Views Asked by At

I'm trying to model aging in an animal population. The first thing I tried was this:

if (rand() > 1 - 1/lifespan) { die(); }

This (of course) gave me an exponential distribution, so I realized I needed something better. So I tried this:

if (rand() > 1 - age/(lifespan*lifespan)) { die(); }

Which is better. The "top" of the distribution is at lifespan. However looking at the distribution it still doesn't look like a great model for aging, and I'm already out of my depth when it comes to statistics here. So my question is; is there a way to modify the code above to make it a decent model of aging?