# Dividing By Zero Is Like A Punch In The Face…

…because they both hurt your brain.

So apparently time flies when you’re sitting at work running statistical simulations. 🙂

In case you were wondering, I just so happened to look at the clock and realized the hour. Given that I’ve been on campus since 9am, and up and working since 6am, I think I should probably go home. And I will. As soon as this current simulation finishes running.

Why on earth are you still on campus?

I had a meeting with my Undergraduate Research Assistant Justin today. We’ve been working on a simulation study that is testing a hopefully improved method for estimating the abundance of animal populations given only harvest data. Justin had very observantly noticed that our simulations were sometimes breaking down. That is, the model was ending without completing the task of analyzing the data.

Weird, right?

Anyway, because of that I’ve been on campus playing. Seriously. I’ve spent the last 3 or so hours working through the model that simulates a population of animals in the wild. So far, I’ve found a few interesting things. The most significant issue was that there existed a significant probability that our model would produce a population that was negative. As in, less than zero animals. Clearly that can’t be – except maybe in Bizarro World1.

I also noticed that some of the code was permitting division by zero. GASP! How did I miss that before? Of course, our model was adjusting for these instances by thankfully ignoring them. Regardless, as a big-ole math and stats nerd, I couldn’t let that go uncorrected. Dividing by zero is asking for trouble. Serious, serious trouble. The worst kind of trouble.

Not sure what dividing by zero will do? Consider these images.

Moral of the story: dividing by zero is dangerous, and not just mathematically speaking.

1 Bizarro World – best explained by watching this clip.