S | M | T | W | T | F | S |
---|---|---|---|---|---|---|

« Apr | Jun » | |||||

1 | 2 | 3 | 4 | 5 | ||

6 | 7 | 8 | 9 | 10 | 11 | 12 |

13 | 14 | 15 | 16 | 17 | 18 | 19 |

20 | 21 | 22 | 23 | 24 | 25 | 26 |

27 | 28 | 29 | 30 | 31 |

## Archive for May 20th, 2012

## Will Today be the Day? Labor Predictor

One question I have on my mind a lot lately, as I’m sure every pregnant woman starts asking, is “what are the odds of my baby coming today?” or “in the next couple of days?”. The trouble is, it’s really hard to find any kind of answer to that question online. Some babies come early, some come late. Any that come between 37 weeks and 42 are considered ‘right on time’. Well, the math nerd in me wasn’t satisfied with that answer.

I previously found this chart online, which uses a normal distribution of mean 40 weeks (or 280 days) and standard deviation of 10 days to estimate the probability of going into labor. Or N(280,10^{2}) for you statisticians out there. The normal distribution is symmetric, which would mean one’s odds of going into labor one day before one’s due date is the same as going into labor one day after. I suspect the actual probability distribution of spontaneous labor is closer to a left skew, or negative skew, normal than a standard normal distribution. A negative skew would mean one’s odds of a very premature labor are greater than one’s odds of a very postmature labor. After all, you *could* go into labor at 34 weeks (x = -42 days). According to the normal distribution N(280,10^{2}), 6 in every 1 million babies would be born at 34 weeks and 6 in every 1 million babies to be born at 46 weeks (x = 42 days). Given that 4 million babies are born each year in the US, that would be 24 babies would be born at 46 weeks gestation per year in the US alone! Of course these days doctors tend not to let women go more than 42 weeks due to health risks, so it’s impossible to say how far those women would have gone in their pregnancies. Still, I doubt 24 of them would have made it to 46 weeks. Baby’s got to run out of room eventually, and at some point the female body just can’t handle it anymore!

A skewed normal and normal distribution are very similar when you’re close to the middle (ie close to the due date.) The two distributions are less similar when you get further from the middle (ie further from the due date.) I was really interested in knowing how likely labor was TODAY, approximately 6 weeks before my due date, so the normal distribution wasn’t going to cut it.

I wanted to estimate a skewed distribution, but how to do that without any data? Fortunately spacefem.com cites several studies which indicates the true likelihood is approximately normal, so I need a skewed normal distribution that is close to N(280,10^{2}) – characteristic one. Our doctor also told us 10% babies are delivered prematurely (before 37 weeks) – characteristic two. (The normal distribution N(280,10^{2}) predicts only 3% of babies will be delivered prematurely). We also know that roughly half of pregnant women go into labor before their due date, and half afterwards – characteristic 3. Skewed distributions have three parameters (location, scale and shape), so all I had to do was tweak these parameters until I have a distribution with all three characteristics. Should be easy, right?

Five hours later…

I wanted to create my model using excel, rather than Matlab or R, two programs especially designed for statistics. I haven’t touched either in a while, and didn’t want to re-learn them. Excel has support for doing normal distributions, but nothing for skewed normal. That meant I had to implement the functions on my own, and my calculus skills are only slightly less rusty than my Matlab or R skills. At some point I probably should have given up and switched over to Matlab, but I was stubborn and determined to get it! It was a matter of pride.

In the end I came up with the following distribution. This distribution shows approximately 10% of babies will be premature, half of all pregnancies will be early while half will be late, and the squared error between the two distributions is less than 2 X 10^{-3}. For another sanity check, it shows a mean average deliver date as 279 days, or 39 weeks 6 days.

My model (blue) as compared to the normal distribution (red). I plotted them both assuming ‘0 days’ as the due date instead of 280 to make it easier to read.

Interesting side note: while the model shows half of women go into labor before their due date, the day with the highest probability of spontaneous labor is 7 days after her due date, which matches conventional wisdom!

So what does this mean for me? Given that zippy isn’t here yet, I have a **0.1%** chance of going into labor today and a **1.36%** chance of going into labor in the next seven days! That’s 30 times higher than the prediction I was getting with the normal distribution!

Of course this is just an estimate, and all meant to be in good fun. Without data, my model is only a guesstimate. Nevertheless, my math nerd itch has been scratched.

You can try the tool out for yourself here.

Posted in Life | Tags: Doing the Math