Approximating the impact of inflation

7 comments
The other day someone mentioned to me a rule of thumb that he was using to estimate the number of years \(n\) it would take for inflation to destroy half of the purchasing power of today's money:
\[ n = \frac{70}{p}\]
Here \(p\) is the inflation in percent, e.g. if the inflation rate is \(2\%\) then today's money would buy only half of today's goods and services in 35 years. You can also think of a saving account with an interest rate of \(2\%\) that would double your money in 35 years.

It is not difficult to derive this formula. The starting point is:
\[
2K = K (1 + \frac{p}{100})^n
\]
This is equivalent to:
\[
2 = (1 + \frac{p}{100})^n
\]
Taking the log gives:
\[
\log(2) = n \log(1 + \frac{p}{100})
\]
The first term of the Taylor series approximation of \(\log(1+x)\) for small \(x\) is \(x\). Hence for small \(p\) I can set:
\[
\log(2) \doteq n \, \frac{p}{100}
\]
Next I have to estimate the value for \(\log(2)\). Writing it as an integral leads to:
\[
\log(2) = \int_1^2 \frac{1}{x} \,dx
\]
Using Simpson's rule I can approximate the integral with:
\[
\int_1^2 \frac{1}{x} \,dx \doteq \frac{2-1}{6} (1+4\frac{2}{1+2}+\frac{1}{2} )
= \frac{25}{36} \doteq 0.7
\]
Thus,
\[
n \doteq \frac{70}{p}
\]
Plotting the two formulas against each other reveals that the approximation works pretty well, even for inflation rates up to 10%.

R Code

Here is the R code to reproduce the plot.
curve(70/x, from=1, to=10, 
      xlab="Inflation rate p%", 
      ylab="Number of years for purchaing power to half", 
      main="Impact of inflation on purchasing power",
      col="blue", 
      type="p", pch=16, cex=0.5)
curve(log(2)/(log(1+x/100)), 
      from=1, to=10, add=TRUE, 
      col="red")
legend("topright", 
       legend=c("70/p","log(2)/log(1+p/100)"), 
       bty="n",
       col=c("blue", "red"), 
       pch=c(16,16), pt.cex=c(1,1))

7 comments :

  1. K=Kapital (if you read Marx, or capital in English).

    ReplyDelete
  2. It seems to be an interesting chart tool however I'm getting a "Failed to execute default browser. Failed to execute child process "chrome" (No such file or directory)" error when trying to plot using GoogleVis. Any idea how to correct this? Thanks!

    ReplyDelete
  3. Do you have a working internet connection when you execute your R code? What is the output of sessionInfo() in R on your system?

    ReplyDelete
  4. Hello,
    I have a question regarding this package: I want to use the command gvisMap to plot some sites on a map, and I'd like to use a different icon for each "type" of site.
    I tryed the following code:

    icons=paste0("{",
    "'default': {'normal': 'http://icons.iconarchive.com/",
    "icons/icons-land/vista-map-markers/48/",
    "Map-Marker-Ball-Azure-icon.png',\n",
    "'selected': 'http://icons.iconarchive.com/",
    "icons/icons-land/vista-map-markers/48/",
    "Map-Marker-Ball-Right-Azure-icon.png'",
    "}}"))and it changed all the markers (as it is supposed to). Is there a way I can modify this so that my data identified with a "1" on some variable will be plotted with the icon 1, on the data with a "0" with the icon 0 ?
    Thanks in advance

    ReplyDelete
  5. I am not sure. Perhaps the plotGoogleMaps package is a better alternative, see the following blog post: https://aschinchon.wordpress.com/2014/12/09/going-bananas-1-superman-was-born-in-kentucky/

    ReplyDelete
  6. ok I will have a look, thanks for your quick answer

    ReplyDelete