Friday, September 4, 2020

Log scales, rounding errors, and debt

Well, it occurred to me that I can get GDP all the way back to the start of the USA (from MeasuringWorth) and that I have data on public and private debt going back to 1834 (from Steve Keen) so I thought I'd do a graph showing the private-to-public (P-to-P) ratio and how it influences GDP growth. That was a mistake.

I can't start by showing you how P-to-P influences growth. I have to start by looking at it.

So here is a graph that shows the P-to-P ratio, the Real GDP growth rate, and an HP-smoothed version of that growth rate:

Graph #1

Impressive, huh?

Andrew Jackson was elected President in 1828 [note 1: For those concerned about having enough time to count the votes in our upcoming Presidential election, Wikipedia points out that the 1828 election "was held from Friday, October 31 to Tuesday, December 2, 1828."]

NPR tells us that
When Jackson took office, the national debt was about $58 million. Six years later, it was all gone. Paid off. And the government was actually running a surplus, taking in more money than it was spending.
By 1835, the Federal debt was all gone, and that year the government ran a surplus.

NPR says "about $58 million" debt in 1829. Steve Keen has $60.09 million at the end of 1828 and $50.12 at the end of 1829. NPR's number is close to Keen's.

Keen shows the government debt falling to $4.95 million by 1833, and $0.71 million (or $710,000) by 1834. For private debt in 1834 Keen has $625.10 million. For the P-to-P ratio I divide 625.10 by 0.71 and get 880.4. So in 1834, private debt was 880.4 times as big as the government debt.[Note 2: In this text I'm using the numbers as shown to do the calculations. These numbers are rounded to two decimal places. But in the spreadsheet, there are more than two digits to the right of the decimal point. In the spreadsheet, I don't get "880.4 times as big as the government debt". I get 874.6 times as big. You've heard of "rounding errors"? This is one.]

By the way, we're looking at debt here and using numbers like "about $58 million" to describe how much we're in the hole. We're using positive numbers to describe how much we're in the hole. So then, if the government has the debt all paid off and has a surplus, we have to use a negative number to indicate the size of the surplus. A negative number to describe how far out of the hole we are. Weird, but it makes sense in a mathematical sort of way.

In 1835 Keen has private debt at 782.45, and government debt at -0.15 million, a surplus of $150,000. For the P-to-P calculation I divide 782.45 by -0.15 and get -5216.33: Private debt was 5216.33 times bigger than the government surplus that year. (Or in the spreadsheet, 5217.6 times bigger.)

Anyway, that's why the graph starts out just below a thousand, then drops to a little below -5000 the next year, and then back up to over 3000 in 1836 when private debt was 912.31 million and government debt was 0.30 million. After that, the numbers move in smaller steps. But in the first three years the P-to-P numbers are so big they make the numbers that come later look like zeroes.

But a graph that seems to show nothing is not very interesting. So I changed the vertical axis to a log scale:

Graph #2
I didn't change any of the debt numbers. I didn't change any of the GDP numbers. Only the numbers on the vertical scale are different. Each number on the vertical scale is ten times the number below it, and those numbers are equally spaced. The distance from 1 to 10 is the same as the distance from 10 to 100 for example. This gives more space on the graph to small numbers, and less space to big numbers. So the numbers between zero and 100 on my graph now have some room to breathe, and we can see that they're not all zero.

Each number on the vertical scale is ten times bigger than the number below it. Starting at the top, we go from 10000 to 1000 to 100 to 10 to 1 to 0.1. Below 0.1 is 0.01 and below that is 0.001. But I only allowed one decimal place for numbers on the vertical scale, so both the 0.01 and the 0.001 got chopped off at 0.0. So it goes.

Those two numbers cannot both be zero. That would be like the first two inch-marks on a tape measure both being one inch. That would be unacceptable.

Actually, neither of those numbers can be zero, because each number on the vertical scale is ten times smaller than the number above it. For any number on this vertical scale to be zero, the number above it would have to be zero. And as you can see as you go up the vertical scale, those numbers are not zero.

See, this is my idea of something more interesting than my first graph.

Oh yeah... the low, jiggy line, the kinda reddish line on Graph #2, that's percent change in Real GDP, rather like this one from FRED. But there are a lot of missing pieces in my red line. Yeah. Because as Excel says,


"Negative or zero values cannot be plotted correctly on log charts. Only positive values can be interpreted on a logarithmic scale."

It's obvious if you think about it. Each value on the log scale is one-tenth the size of the value above it. If you start with a dollar, the next number down the scale is a dime and the next below that is a penny. Below that, one-tenth of a penny. There is no such coin but if there was, and if  you had a million of em, it would be a lot of money. Certainly not zero.

Take one-tenth of a penny, and take one-tenth of it. It's still more than zero. Take one-tenth of one-tenth of one-tenth of one-tenth of one-tenth of it, and it's still more than zero. It isn't much, but it's more than zero. Yeah, we can just call it zero, and that works in the real world, but it is not proper arithmetic.

If you do proper arithmetic, like for a graph, you can keep going down the log scale forever, getting smaller and smaller values, and you never get to zero. Simply put, there is no zero level on a log scale graph. And if you can't get to zero, you can't go below zero to the negative numbers. Not on a log scale graph.

And that is why Excel says "Negative or zero values cannot be plotted correctly on log charts." Now you know.

And that's why there are missing pieces on the red line. When the RGDP growth number is zero or below, that piece of the red line cannot be plotted.

And it's why the blue line on Graph #2 starts at the year 1836. The line that goes from 1834 to 1835 ends at the -5000 number, and the line that goes from 1835 to 1836 starts at the -5000 number, and neither of those lines can be plotted on a log scale graph. So the blue line starts at the 1836 value, at a value that's something over 3000, not zero, and not below zero.

Confused? It's all Andrew Jackson's fault!

No comments: