Births and moon phase

Introduction

A few days ago I was talking to a friend of mine about how some days are busier at hospitals than others. I’ve been told that when we are at a full moon hospitals receive more woman to give birth.

I got puzzled by that statement and decided to check on it.

Getting some data

Births

I was worried that it would be hard to get some info on births, since any medical relevant data are usually very expensive. At first, I tried to get it from IBGE (Brazilian entity responsible for census). No luck.

Then I decided that birth location should not be relevant since the moon would affect entire earth if it was the case. Searching on internet I found a dataset from SSA (EUA Social Security Administration) with birth amount by date from 2000 to 2014.

Birth data

Moon phase

How moon phase works

First I had to look how Lunar phase works, before reading about it I thought the place you were on Earth would affect what phase of the moon you would see. Wrong. Regardless where you are (Brazil, Canada, Japan, etc) you are going to see the same moon phase.

I was expecting to find a moon phase table easy over the web but I was wrong. I found some sites that does the math for you and give you the results but I was not in the mood to write a scraper for that.
After some research I found an old Python code that does the math, but it was written in Python 2. I was expecting to be easy to convert it to Python 3 but part of math was related to Julian days and datetime library changed since Python 2.

Then, I hacked it to use jdcal and generated a table with moon phase from 2000 to 2014.

Moon data

Joining data

Since datasets are not that big I joined then on Excel using VLOOKUP. I’ve also added some extra columns like weekday, Excel date, day type (working day, weekend).

Full dataset

Analysis

Correlation

So I got all data needed to answer the question: Is moon cycle correlated to amount of births?

Chart

Just to get a glimpse on how the data plots. Curious pattern.

Births vs % illuminated

Correlation results

Looks like there is no correlation on moon cycle and birth amount.

Births vs % illuminated correlation

Means

What if only a full moon affect births? Well, lets compare means.

Means

Hypothesis test

Null hypothesis: There is no difference between average of births in full moon and average of births in other phase of the moon.

t-test

P-Value greater than 0.05, so accept null hypothesis. There no statistical difference between those means.

Biphasic Chart

I got puzzled by the biphasic pattern of the plot. I started to wonder if something else was affecting births or if there were some seasonality on the series.

Births vs % illuminated

Let’s plot data on time series.

births by date

As expected, too much data to see something. Scattering it would be better.

births by date scattered

Way better. Also biphasic, something is going on. Next post I’m going to try to figure it out.

Conclusion

There is no significant evidence that full moons affect births, although looks like there is some pattern on this data.

References

https://en.wikipedia.org/wiki/Lunar_phase
http://bazaar.launchpad.net/~keturn/py-moon-phase/trunk/annotate/head:/moon.py
https://en.wikipedia.org/wiki/Julian_day
https://oneau.wordpress.com/2011/08/30/jdcal/
https://github.com/phn/jdcal
https://github.com/fivethirtyeight/data/tree/master/births