Rome Didn't Fall in A Day.

Objective Truth Exists, and is Accessible to Everyone.

All Human Problems can be Solved with Enough Knowledge, Wealth, Social Cooperation and Time.

Photo: Rusty Peak, Anchorage, Alaska


Wednesday, April 29, 2015

Ro and the History of the Ebola Epidemic in West Africa

A chart of the Basic Reproduction Number (Ro) shows the history of the Ebola epidemic in West Africa.   Ro measures the rate of transmission of disease, and can be calculated from the history of daily new cases.  Ro can be considered analogous to acceleration in physics – cumulative cases represent position; daily new cases represent velocity; and Ro is the rate of change in daily new cases.

Ro rose rapidly in May and June of 2014, then fell steadily thanks to the implementation of public health measures.   Ro fell below the critical level of 1.0 at the end of October, reaching a minimum of 0.9 by January, 2015.  Since then, progress against the epidemic has slowed.   Ro has climbed back towards 1.0, indicating the epidemic may reach a steady state or resume growth in the rate of disease transmission. 
The current disease transmission rate of about 40 new cases per day is still very dangerous, and tragic for every victim.  More stringent efforts are necessary to contain the disease.
The Basic Reproduction Number, Ro
The basic reproduction ratio (Ro) is the measure of how quickly a disease spreads.  Ro is simply the number of new infections caused by each case of the disease.   Highly contagious diseases such as measles can have Ro values up to 15.  Many common diseases, including seasonal flu, have Ro values of approximately 1.3.  This means that on average, each patient with the flu will give the bug to 1.3 additional people.  As long as Ro is greater than 1, an epidemic is growing.   When Ro is less than 1, the disease is shrinking and the outbreak will eventually end.

Case numbers from the Ebola epidemic in West Africa allow calculation of Ro for the history of the outbreak. 

I have tracked the cumulative case numbers for the West Africa Ebola outbreak since early August, 2014.   The cumulative case number includes all suspected, probable and confirmed cases reported by the World Health Organization (WHO).  Considering the known issue of under-reporting of cases, I believe that this number is the most accurate representation of the epidemic from the available data, as illnesses misdiagnosed as Ebola may be offset by unreported cases of the actual disease.

The first case of Ebola in the current outbreak is believed to be a two-year old boy, who contracted the disease after playing under a tree frequented by bats.  The boy died December 6, 2013.    Doctors Without Borders began international efforts to combat the disease, in March, 2014, followed soon afterward by the World Health Organization.   By early May, transmission of the disease declined to nearly zero.  However, the disease was not successfully contained, and transmission rates increased. By late May, the cumulative case count was growing exponentially.  Exponential continued until about October, 2014, leading to considerable anxiety about the future course of the epidemic.  It appears that the most effective procedure in fighting the epidemic was simple public education about patient isolation, sanitation, safe care, and safe burials.  It is my belief that public health education was the essential factor in combatting the epidemic.  The rate of transmission declined below the critical level of Ro = 1 before the arrival of most international aid and the construction of new Ebola treatment centers.    If the disease had continued to grow exponentially, the new international treatment facilities would have been completely inadequate. 

The cumulative case chart follows an S-shaped pattern on a linear scale.   This chart represents the total number of confirmed, probable and suspected cases reported periodically by the World Health Organization (WHO).  I interpolated the figures to arrive at common reporting dates for all of the countries involved in the epidemic.  This S-shaped pattern has been described as the characteristic pattern for cumulative cases in previous, smaller Ebola outbreaks. 
On a logarithmic chart, cumulative cases form a straight line from late May until October, 2014.  This pattern of exponential growth was broken in mid-October, and shows a progressive flattening of the cumulative case chart until January, 2015. 
The chart of daily new cases is derived from the history of cumulative cases.  I interpolated the cumulative case numbers to a daily count, and then took a 9-day rolling average to smooth the variations due to irregular reporting periods.  Daily new cases rose sharply from 20 cases per day in late July, 2014 to approach 140 cases per day in September.   The exact peak of the epidemic is hard to determine, due to chaotic reporting and significant data revisions during October, 2014.  Daily new cases began to decline in early December, 2014.  The rate of decline flattened significantly in mid-January, 2015, and progress since that date has been slow.
In order to see the history of Ro for the epidemic, I used a 6th order polynomial regression to smooth the daily new cases data further.  The function has “edge effects” with unnecessary high-frequency waves at the tails of the function.  
I spent a ridiculous amount of time trying to remove these artifacts, and finally chose a simple eye-ball fit to the data, using an arbitrary smoothing function on the end-tail of the polynomial expression.   The following chart shows the modified fit to the data.
To calculate Ro, I assumed an eight-day average interval between an initial case and subsequent infections resulting from contact with the infected patient.  The chart of Ro using the original polynomial fit shows a sharp rise in June 2014 and reaches a peak in July.  Although the number of cumulative cases continued to rise sharply, Ro began falling in late summer of last year.  Ro can be considered analogous to acceleration in physics – cumulative cases represent position; daily new cases represent velocity; and Ro is the rate of change in daily new cases.  Ro crossed the critical value of 1 in late October, 2014.   At that point (according to the smoothed function), the number of daily new cases began to fall. 
The number of daily new cases fell rapidly after Ro dropped below 1.0.   The rate of decline changed in mid-January, seen by flattening of the curve on the daily new cases chart.  At that point, Ro reached a minimum of about 0.9. 

Since mid-January , progress in the epidemic has been slow.  Although the number of daily new cases continues to fall, the rate has been progressively slower.  Ro has climbed back toward 1.0. 

The next few weeks will be critical in determining whether the Ebola epidemic in West Africa will be contained, reach a steady-state, or resume growing.  The current level of disease transmission, at about 40 cases per day, is still very dangerous.   And tragic for every victim.

World Health Organization Ebola Situation Reports

Colin Freeman, November 6, 2014, Magic Formula That Will Determine if Ebola is Beaten, The Telegraph, UK.

Thursday, April 9, 2015

Cows, Robots, The Google Car and Thomas Piketty

This post was originally published on April 9, 2015.  I revised it on December 14, 2016, to add spiffy photos for a more attractive post.  In the past 20 months, development of self-driving vehicles has proceeded as expected, including a demonstration by Uber of a self-driving truck, nicknamed Otto.  The truck drove 120 miles from Fort Collins to Colorado Springs, transporting Budweiser beer, as shown below.    DR, 12/14/2016
This blog post follows on my previous post “America is Inventing Again”.  This post looks at the social and economic disruption resulting from new inventions.  Computers and automation have been eroding jobs in office clerical and factory professions since 1980 or earlier.  Google’s self-driving car technology now threatens another 3.6 million jobs in the United States.

The ease and efficiency of replacing labor with capital is a key point in Thomas Piketty’s work.  Increasing automation is expected to increase wealth inequality, as fewer workers receive paychecks, and a larger share of the value of production accrues to owners of capital.  While new technologies offer clear benefits in economic efficiency and safety, it is a fair question to ask where we are going as a society, and to cast a troubled look at Kurt Vonnegut’s novel “Player Piano”.

It was an improbable scene.  Cows, ready for milking, walked from the field and formed a queue in the cattle chute, like shoppers in a supermarket check-out line.  When a cow reached the head of the line, she stepped into a glass-sided stall where she received a tasty treat.  In the stall, a robot surveyed and weighted the cow.  A laser-guided device washed the udders, attached suction cups and milked the cow.   Milk flowed through lines to a gathering vessel, where the quality, volume and temperature of the milk was measured and recorded.  Visitors watched the process through the glass walls of the stall, and as the milking proceeded, a few curious cows stretched over the glass for a better look at the visitors.  When the milking was done, the cow walked back outside to pasture, with no human interaction except for the curious gaze of visitors, and the equally curious gaze of the cow in return.

The robotic milking facility is an experimental dairy farm operated by Michigan State University.  The manager of the farm proudly showed us how the health of the cattle is monitored by the weight and temperature of the cow and the frequency, volume, and quality of the milk.  Any changes are noted by computer and immediately brought to the attention of the dairy manager.  A standard dairy using traditional milking machines would employ eight to ten workers, who would manage the herd, milk the cows and haul the milk containers.  The robotic facility allowed a single person to run the entire dairy operation, spending his hours studying a computer screen.  The manager of the experimental farm told us that the number of robotic dairy farms in Michigan is going up exponentially.  He didn’t say anything about the laborers displaced by automation.  Clearly, they must find other work.

 We are building robots and putting people out of business. 
 With a nod to Kurt Vonnegut, so it goes.

The Player Piano Society
I’m not the first person to notice.  Kurt Vonnegut’s first novel, published in 1952, was Player Piano (a particularly apt title).   Vonnegut drew freely on earlier dystopian novels Brave New World (Aldous Huxley) and We (Yevgeny Zanyatin), published in 1931 and 1921, respectively.   Player Piano describes a dystopian futuristic society with massive unemployment, due to the displacement of workers by machines.  Only a small percentage of people with the greatest intelligence and education could aspire to an actual job, in which they would create and run the machines that displace human labor.

It is clear that Vonnegut correctly foresaw that automation and technology would put many people out of work.  Further, Vonnegut foresaw that future jobs would require more education and more intellectual challenge than earlier jobs.  Our remaining question is how far technology and economic forces will take us toward the “Player Piano Society”.

Secular Change in the American Economy
This blog has previously noted a secular change in the American economy indicated by progressive weakening in the job market.   

In each of the past eleven recessions, job recovery has been progressively slower.  Job losses during a recession have followed approximately the same trajectory in each recession, but job recovery has been much flatter, in nearly linear fashion ever since World War II.  Recent recessions, especially the great recession of 2008, have also been deeper than earlier recessions, with greater job losses.

I saw this happen during the course of my career in the petroleum industry.  I was shocked, as a newly minted manger in 1987, when the head of our Human Resources department gave a presentation showing his vision for the future company.  The company he envisioned had one-third of the total employees, and half as many geologists and engineers.  I was baffled.  We had a mission to make the company grow.  But the HR executive was correct.  In layoff after layoff, we fired capable employees who were no longer necessary to the company.   A department of draftsmen with 15 employees was reduced to five, then one, then zero.  In one division, eight secretaries were reduced to four, and then to one.   The company implemented enterprise-wide accounting software, and a department of twenty-eight accountants collapsed to a single accountant.  With computer workstations and information systems, specialists became more productive, and the number of geologists and engineers was cut in half, exactly as envisioned by the Human Resources executive fifteen years earlier.

Data from the Bureau of Labor Statistics shows the decline of several professions due to automation.  Office clerical professions have lost about 1,000,000 jobs since 1997.  The job titles showing the greatest losses can be expected:  Typist, Data Entry Keyer, Information Clerk, Telemarketer, Office Machine Operator, and Telephone Operator – all made obsolete by the computer.   The job title Secretary has shown surprising growth of about 500,000 jobs.  Perhaps this growth reflects re-classification and re-assignment of the clerical workers previously doing other work.

Industrial jobs show a similar decline, in jobs such as these:  Hand Packers and Packagers, Team Assemblers, Tool-and-Die Makers, Machine Feeders and Offbearers, Sewing Machine Operators, etc.   This is only a sampling of industrial jobs, not a comprehensive list.   Over 600,000 jobs have been lost in these categories since 1997.  Research by the Boston Consulting Group, reported in Yahoo Finance, says that 25% of all factory jobs world-wide will be replaced by robots in the next decade.    Robots are currently doing 10% of factory work.

The next category of jobs lost to automation will be in the area of transportation.

Job Losses from Self-Driving Cars
I discussed the Google Car at some length in my last post, “America is Inventing Again”

Apple, Incorporated also has an initiative to develop self-driving cars.  Apple’s concept would involve fleets of autonomous taxis, universally available in cities.  Apple’s concept would reduce individual car ownership, and reduce the total number of vehicles needed and manufactured.  But the most important societal change resulting from self-driving cars is generally overlooked.  Self-driving cars will put a lot of people out of work.  The Bureau of Labor Statistics reported the following numbers for people employed as drivers in the United States in 2013.
Truck Drivers, Delivery and Route Workers
Truck Drivers, Tractor-Trailer
Bus Drivers, School
Driver/Sales Workers
Bus Drivers
Taxi Drivers and Chauffeurs

Many of these jobs involve repetitive routes, or city routes which can be easily captured in a database.   Safety, of course, will be the major motivation for replacing many drivers, particularly school bus drivers, but cost will also be a consideration.  Long-haul (tractor-trailer) truckers may be particularly vulnerable to being replaced, because a robotic driver does not need to sleep, and is not limited to 8 hours of driving by federal regulations.   The productivity of the capital in each truck can be increased three-fold by replacing the driver with a robot.

National Public Radio reports that Truck Driver is now the most common profession in 29 of our 50 states.  If all of the professional drivers in America were replaced by self-driving vehicles, it would add 2.5% to the nationwide unemployment rate.

Google’s self-driving technology will put lots of people out of work. 

Opportunity for Young Workers
The “millennial generation” is the first generation in America to have a lower standard of living than their parents (previously documented in this blog,,   Millennials came of age during a time of economic disruption from the great recession, and were hit harder than other generations by unemployment and under-employment.  Simple observation of young people on Facebook shows that they are acutely aware of declining opportunity as a result of automation.  The social result is a generation which is increasingly cynical, jaded and politically disaffected.  This is not healthy for our society.

Thomas Piketty
Thomas Piketty is an economist and author of the controversial book “Capital in the Twenty-First Century”.   The title is a subtle nod to Marx’s “Das Kapital”.  Piketty’s book is a welcome return to the idea that macro-economics is not simply about the productivity of a society, but should also be concerned with the well-being of individuals and groups of people in that society. 

Piketty’s essential thesis is that if the return on capital exceeds the growth in the economy (as it does), the owners of capital will increase their share of total wealth, leading to greater wealth inequality.  The well-documented increase in wealth inequality in the United States since 1990 would seem to support Piketty’s conclusion.

Economics graduate student Matthew Rognlie is one of Piketty’s many critics.  Rognlie raises the issue of the future return on capital (ROC).  Piketty believes ROC will increase; Rognlie believes that ROC will decrease.  The future return on capital will depend largely on how easily capital can replace labor.  The evidence shows that many workers have been replaced by machines over the past 35 years, and the trend will probably continue.   I’m still with Piketty.

Areas of declining employment due to automation include clerical work, factory workers, packers and delivery workers, and most recently, technical “knowledge workers”.   We are on the cusp of another large displacement of workers by automated driving technology.   The automated technology will improve safety, lower costs and utilize the capital invested in vehicles more efficiently.   But the technology has a social cost borne by displaced workers, their families, and taxpayers.

I disagree with Piketty somewhat on his prescribed remedies for wealth inequality.  The issue of capital versus labor, going back to Karl Marx, cannot be solved simply by taxation and redistribution of wealth.   The opportunity for meaningful employment and productivity is essential for human dignity.   It is necessary for each person on this planet to validate our existence by the positive changes we bring about in the world.  We need to earn our own way, and our economic system fails if it does not provide that opportunity. 

I am no Luddite.  I favor innovation, new technology, and economic efficiency.  I believe that society cannot stand still, and must advance and change.  But I think it is a fair question to ask the inventors who are relentlessly replacing human labor with machines, “Where are we going?”  Are we turning into the Player Piano Society?  

Can workers displaced by technology easily obtain new employment with equal compensation, allowing them the dignity of earning a living?  Can we provide sufficient opportunity to the youth, who are entering the job market without experience and skills?  What will be the impact on society if we fail in these things?

Perhaps we should demand that for every new technology that eliminates a job, inventors must create another technology that creates a new job, accessible to the displaced workers.
Job recovery has been progressively slower in each recession since World War II.

NPR infographic showing the most common job in each state, from 1978 to 2014.
National Public Radio (NPR) recently published a fascinating infographic on their website, showing the most common job in each state from 1978 to 2014.  In 1978, the most common job in 20 states was secretary.  With the advent of the personal computer in 1980, secretarial jobs declined, until by 2014, secretary was the most common job in only five states.  Meanwhile, truck driver took the place of secretary as the nation’s top job.  By 1996, and still today, truck driver is the most common job in 29 of our 50 states.  But driving, as a profession, is likely to be the next major target of automation.
25% of manufacturing jobs to go to robots in next decade.  Robots currently perform 10% of factory work.

Bureau of Labor Statistics data
[As an editorial comment, the BLS database is TRULY AWFUL.  Job descriptions are changed frequently from year-to-year, with no attempt to reconcile them or make data comparable to prior years.]    

Google is leading in terms of developing self-driving cars.  Competitors started later, but are serious in their efforts to bring their own vehicles to market.  Both old-line companies and giant new technology companies are participating in the race to bring the first and best autonomous vehicles to market.
Apple’s effort is perhaps the most interesting.  Apple is pursuing a synthesis of the new transportation ideas.  Their vehicles will be self-driving, like Google’s; their vehicles will be all-electric, like Tesla’s.  And their business model will involve fleets of cars available anywhere, like taxis, and accessible by mobile devices like Uber’s ride-sharing service.  This concept, for many people, would over-turn the paradigm of self-ownership of a vehicle.  As a society, the Apple concept would be more efficient.  A fleet of autonomous taxis would require fewer vehicles on the road, and require fewer vehicles to be manufactured.

A fairly comically stupid article about how driverless cars will put traffic policemen out of work – without noting that 3.6 million commercial drivers will be put out of work. 

Critique of Piketty by grad student Matthew Rognlie.   Key issue is future return on capital – Piketty believe ROC will increase; Rognlie believes it will decrease.  Another expression of ROC is how easily capital replaces labor.  – think about Google’s autonomous cars replacing drivers.  It still seems pretty easy to me.  I’m still with Piketty.

Discussion of America’s skills gap.  We have 9 million unemployed, and 5 million available jobs.  But the available jobs require higher skills, and our unemployed workers are not capable of filling those jobs. 

Federal Reserve Economic Database