Monthly Archives: January 2012

my operations research meme

I loved Tallys Yunes’ challenge to come up with OR memes to bring awareness about O.R. to the masses. Mine is below.

OR meme with sheldon cooper

After my blog posts on OR pick up lines (here and here), I felt like I just had to make an OR meme featuring Ryan Gosling. Here it is.

OR meme Ryan Gosling

Please make an OR meme and send it to Tallys and me.


a second look at life expectancy: childbirth and bath tubs

In my previous post, I tried to unravel life expectancy curves. The comments on this post were fantastic (thank you, readers!). They were so good that I decided to share some of the readers’ information and reply to a request.

First, I was asked if the mortality rates follow a “bath tub” shape. If you have taken a course on reliability, you have seen hazard rates. Many processes and widgets have a “bath tub” curve, meaning that there is some break-in failure (this is what a warranty is for), there is an extended period of time with a low incidence of failure during a widget’s useful life, and then there is wear-out failure. People are like widgets in this regard. Below is the CDC’s recent mortality estimates for men and women as a function of age. Do to low infant mortality rates, there isn’t much of a tub there, but mortality does decrease for the first 10 years of life for girls and boys (using reliability terms, this is break-in failure). After the age of 10, the mortality curve for boys dramatically rises and diverges from the curve for girls.

bath tub mortality

The bathtub curve for mortality

Second, the link between women’s life expectancy and childbirth is quite real. The figure below from the Red Blog (courtesy of Hans Rosling) captures international life expectancy rates as a function of the number of children a country has, on average. Michael also points out that the growing life expectancy disparity between men and women reflects this: “As family sizes grow, life expectancies drop. It seems to me that the widening gender gap from 1920 onwards tends to support your notions about childbirth reducing female life expectancy.” Hans Rosling talks about this figure in the must-see video at the bottom of this post.

Smaller families = longer lives

David Smith found an entire article about life expectancies in England in 1550-1800. Life expectancies were between 35-40. The figure below is not differentiated between gender, but it is indeed fascinating. The article itself discusses childbirth quite a bit, although not so much on the relationship between childbirth and life expectancy. They note that lower life expectancies were caused by poverty and lack of nutrition, which in turn encouraged people to have fewer children.

Life expectancy in England

The following video of Hans Rosling talking about life expectancy over time is a real treat.


A look at life expectancy over the years

I was poking around for some health data for a project I am working on and came across an interesting life expectancy table from the CDC that reports the life expectancy from birth based on birth year back to 1900. Below, I show a plot of life expectancies as a function of birth year according to gender. I found a few things surprising:

(1) Women have been outliving men for a long time. I thought this was a relatively new phenomenon.  It isn’t.  Women had a better life expectancy than men at all ages as far back as 1850 (and perhaps longer–I don’t have the data). This is shocking. I thought the risk of childbirth and unsanitary conditions during childbirth would have significantly shortened women’s lives up until the early 1920s. I guess I was wrong.

(2) That blip in life expectancy occurred in 1918. My educated guess is that Spanish influenza caused the blip, since the flu disproportionately affects infants. This is incredibly sad.

(3) There are many blips before about 1945, and life expectancies have looked smoother ever since. I would guess that the widespread use of childhood immunizations has greatly reduced the outbreaks of disease that periodically occur. These diseases are often fatal for infants. The first flu vaccine was introduced in 1945. Many others were introduced near that time (see this timeline and this CDC timeline).

Life expectancy based on the year of birth

Life expectancy at birth as a function of birth year

This figure is life expectancy at birth. The infant mortality rate plummeted over the course of the 20th century, meaning that much of the improvement in life expectancy is merely caused by a drop in infant mortality. Below, I plotted the life expectancy at age 5 according to the year of birth.

(1) Here, you can see how the life expectancy is much higher at age 5 than at birth for those birth near 1900, even when not accounting for the first five years of life that went by.  This underscores the seriousness of infant mortality at the time. There are few differences between the life expectancy at birth and at age 5 for those born after the year 2000, and in general, the life expectancy curves are flatter than those at birth.

The smoothness may be due to each of the points being a moving average rather than “proof” that the lack of smoothness in the first graph was caused by childhood diseases (which is what I suspect).

(2) The disparity between women and men has increased over time. It looks like the disparity has been reduced somewhat in the past 20 years, but the difference between men and women now is much greater than it was in 1900. Married men live longer. Could the life expectancy rates be less disparate if more people were married? I don’t have data to answer that question.

Life expectancy

Life expectancy at age 5 as a function of birth year

To plot how much of the increase in life expectancy is caused by improvements in infant mortality, below I plotted the difference in the life expectancy at age 5 and at birth. I normalized these life expectancies by five years to compare apples to apples. Boys and girls born in 1900 and who survived infancy would live 12.9 and 12.5 years longer than their life expectancies at birth, respectively. Interestingly, boys have been disproportionately affected by infant mortality over the years by a small margin, and the figure below reflects this. If you know why, please leave a comment.

Difference in life expectancy at 5 years and at birth

Difference in life expectancy at 5 years and at birth


Who will be the Republican nominee?

The race for the Republican Presidential nomination has changed so much in the past week that it is hard to keep up. I enjoy reading Nate Silver’s NY Times blog when I have a chance. A week ago (Jan 16) he wrote a post entitled “National Polls Suggest Romney is Overwhelming Favorite for GOP Nomination, where he noted that Romney had a 19 point lead in the polls. He wrote

Just how safe is a 19-point lead at this point in the campaign? Based on historical precedent, it is enough to all but assure that Mr. Romney will be the Republican nominee.

Silver compared the average size of the lead following the New Hampshire primary across the past 20+ years of Presidential campaigns. He sorted the results according to decreasing “Size of Lead” the top candidate had in the polls. The image below is from Silver’s blog, where it suggests that Romney has this race all but wrapped up.

It looks almost impossible for Romney to blow it. I stopped following the election news until Gingrich surged ahead and the recount in Iowa led to Santorum winning the caucus.

A mere week later, it looks like Romney’s campaign is in serious trouble. Today (Jan 23), Silver wrote a post entitled “Some Signs GOP Establish Backing Romney is Tenuous.”  His forecasting model for the Florida primary on January 31 now predicts that Newt Gingrich has an 81% chance of winning. This is largely because Silver weighs “momentum” in his model, which Gingrich has in spades.

Two months ago, I blogged about how Obama will win the election next year. I was only half-serious about my prediction. Although the model seems to work, it is based on historical trends that may not sway voters today. Plus, I had no idea who the Republican nominee would be. Despite my prediction, I certainly envisioned a tight race that Obama could lose. Not so much these days.

A lot has changed in the past week (and certainly in the past two months!)

My question is, what models are useful for making predictions in the Republican race? Will the issue of “electability” ever become important to primary voters?

 


the license plate game: the raw numbers

My last post discussed how one might estimate how many state license plates one would expect to see on a road trip. I made a spreadsheet to compute the probability of seeing each state license plate.

Assumptions

  1. The probability of seeing a state license plate A in another state B depends on the distance between their state capitals. It is scaled by the  number of licensed drivers in state A. (This indirectly means that the probability does not depend on how long we are in a state).
  2. Seeing state license plates A, B, etc. are independent from other license plates in a given state D.
  3. Seeing given state license plate A is independent when driving across states B, C,…
  4. We do not adjust for round trips.

The distance between state capitals was found here. The number of licensed drivers per state is here. I estimated the odds of seeing a license plate from state A in state B is captured by this formula:

P = exp(-K * (Distance from A to B in miles) / # of licensed drivers)

with K = 7000 – 2000*Summer01 – 1000*ExpensiveGas01. Summer01 is 1 if it is summer break and 0 otherwise. ExpensiveGas01 is 1 if it gas is “expensive” and AAA predicts that road trips will be down and 0 otherwise. I didn’t have time to properly identify a meaningful formula or calibrate the parameters. Suggestions here are welcome!

Validation

  • We predicted 28.3 states for our summer trip from Richmond to Chicago. We saw ~35. Here, the discrepancy seemed to be the amount of time we spent in each state. We went through fewer states, but was in each state (especially Kentucky and Indiana) a relatively long time.
  • We predicted 26.8 license plates for our winter trip from Richmond to Vermont. We saw 26. Not bad!

The results make me conclude that the first assumption is probably not true: the probabilities do depend on how long we are in a state. When driving to Vermont, we went through many (8) little states. When driving to Chicago, we went through fewer (5) states but were in each state for longer.  Moreover, many of the Midwest states are not “destination” states. Take Indiana for instance. I love Hoosiers as much as the next person, but Indiana truly is the “Crossroads of America”–it’s a state that many people from other states drive through. It’s a better place to spot license plates than, say, Delaware. I didn’t take that into account.

Below is a detailed review of our winter trip numbers. It indicates the predicted probability of seeing each state license plate and whether we actually saw it. As asterisk (*) indicates whether the model is “off”–whether we (1) did not see a state with probability greater than 0.5 or (2) did not see a state with a probability of 0.5 or lower.

A copy of my spreadsheet is here if you want to see how I computed the numbers.

State Cumulative probability of seeing each state      States we saw
Alabama 0.671 *
Alaska 0 Yes *
Arizona 0.065
Arkansas 0.060
California 0.961 Yes
Colorado 0.083 Yes *
Connecticut 1 Yes
Delaware 1 Yes
District of Columbia 1 Yes
Florida 0.999 Yes
Georgia 0.971 Yes
Hawaii 0
Idaho 0
Illinois 0.973 Yes
Indiana 0.950 *
Iowa 0.056
Kansas 0.028
Kentucky 0.710 *
Louisiana 0.236
Maine 0.565 Yes
Maryland 1 Yes
Massachusetts 1 Yes
Michigan 0.990 *
Minnesota 0.269
Mississippi 0.060 Yes *
Missouri 0.563 Yes
Montana 0
Nebraska 0.001
Nevada 3.53E-06
New Hampshire 0.911 Yes
New Jersey 1 Yes
New Mexico 3.14E-05
New York 1 Yes
North Carolina 0.999 Yes
North Dakota 0
Ohio 0.998 Yes
Oklahoma 0.032 Yes *
Oregon 0.0006
Pennsylvania 0.999 Yes
Rhode Island 0.863 *
South Carolina 0.878 Yes
South Dakota 0
Tennessee 0.841 *
Texas 0.983 Yes
Utah 5.61E-05
Vermont 1 Yes
Virginia 1 Yes
Washington 0.037
West Virginia 0.416
Wisconsin 0.671 Yes
Wyoming 0

the license plate game

My family took a lot of road trips when I grew up. To combat boredom, we tried to see how many state license plates we would see on our trip. On a trip to see Mount Rushmore, we found almost all of the states.

As an adult and geek, the license plate game has (subtlety?) changed. Now, I combat boredom by talking with my husband about how to come up with a probability distribution for how many state license plates we would expect to see on a road trip from point A to point B.

We took two road trips this year: one from Richmond, VA to Chicago, IL over the summer, the second from Richmond, VA to Burlington, VT over the winter break. We saw ~35 states in our first trip and ~25 states in our second trip.  My husband and I immediately noticed that we accrued license plates at a slower rate on our winter trip, which we suspect was from fewer people making road trips over the winter as compared to summer.

We wondered if one could estimate how many license plates you would expect to see in a road trip based on

  • the states you drive through,
  • the time of year (more people take road trips in the summer)

The state that you are in determines how likely you are to see other state license plates based on their relative distances as well as the number of licensed drivers in other states.

We simplified the problem to avoid looking at how long you drove through a state as well as interstate connectivity issues. That is, there is no difference between driving through West Virginia on I-70 and driving through Pennsylvania on I-80. Additionally, if you are in I-80 in Illinois, you are connected to neighbor states Iowa and Indiana but not neighbor states Missouri and Wisconsin, and therefore, one might expect to see Iowa and Indiana plates. We ignored this and just noted that you would be in Illinois, which gives the likelihood of seeing license plates from other states regardless of “route distance.”

My next post summarizes the model, the assumptions, and the results.

Have you tallied license plates on road trips? What do you think are the salient aspects of this problem to include in a probability model?


all quiet on the OR blog front

It’s been quiet in the operations research blogosphere today. It seems that many OR bloggers are taking the day off due to SOPA and PIPA (Go here to read about how SOPA works) or perhaps just due a busy semester. Mike Trick is taking the day off from blogging and tweeting.

I didn’t realize I was supposed to take the day off from tweeting until I already tweeted. To be respectful of the blackout that I am supposed to be observing, I decided to postpone a new blog post until tomorrow. After being prodded by a few of my tweeps, I decided to blog about the SOPA blackout.  I am not alone.  FemaleScienceProfessor also blogged about SOPA and PIPA today.

Please let me know why you decided to blackout today (or not) and what media you are refraining from using for the day.

If you want to wait until tomorrow to leave a comment, I’ll respect that ;-)

 


Follow

Get every new post delivered to your Inbox.

Join 2,179 other followers