Site icon R-bloggers

Simulating dinosaur populations, with R

[This article was first published on Revolutions, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

So it turns out that the 1990 Michael Crichton novel Jurassic Park is, indeed, a work of fiction. (Personal note: despite the snark to follow, the book is one of my all-time favorites — I clearly remember devouring it in 24 hours straight while ill in a hostel in France.) If the monsters and melodrama didn't give it away, then this chart seals the deal:

Not the most glaring issue with #JurassicPark, but this plot from Michael Crichton's original 1990 novel looks pretty darn weird. /1 pic.twitter.com/8dQujwIVNf

— David Gerard (@EmpiricalDave) November 29, 2018

That chart seemed like a clever plot point at the time. The smooth bell curve was evidence for our protagonists that the dinosaurs were not, in fact, a controlled population produced in a lab by scientists: they were breeding. But besides the fact that the chart suggested half of a Procompsognathid was somehow roaming the Costa Rican forest, it was too smooth. David Gerard simulated a population of 29 dinosaurs (drawing their heights from a Normal distribution, and plotting it in R), and the resulting chart was invariably much more jagged:

The problem with this is that the density estimate still looks too clean. I made a few density plots in R (using the default settings) from data generated from a Gaussian. /13 pic.twitter.com/hb4uoRkCv4

— David Gerard (@EmpiricalDave) November 29, 2018

Check out the whole Twitter thread: not only is it an interesting plot-check for a great book, it's a great Statistics lesson soon.

Twitter: David Gerard's Jurassic Park thread

To leave a comment for the author, please follow the link and comment on their blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.