Is there a way to find equation for relationship between three variables in a table?

58 Views Asked by At

First, apologies: my math skills are very limited, so please provide any answers in terms a kindergartner would understand.

My question: I have a table of data that I need to use in a program I'm writing, but I only have it on paper and nobody knows the source. So I'd like to know if it's possible to reverse engineer the equation used to create it. The variables are Number of Payments, Interest Rate, and Charge per $100. I've entered a small portion of it into Excel. I can use Excel to get the equation for one row or column (i.e. a graph with one line), but I'm not sure it's correct and I suspect (hope) that all the data is based on the same equation. Any advice?

Portion of Table

1

There are 1 best solutions below

1
On BEST ANSWER

It is a bit hard to decipher the meaning of variables from what you said, but it looks like someone just tried to create the table for the \$100 loan with fixed annual interest rate $r$ (from 2% to 3%) compounded continuously that is paid off in $n$ months with equal monthly payments at the end of each month.

The underlying mathematics is very simple. Continuous compounding merely means that, if you do nothing, your initial debt $D$ grows exponentially in time according to the law $D(t)=e^{rt}$ where $r$ is the annual interest rate (in absolute units, so what we call $2\%$ means $r=0.02$, say) and $t$ is time in years. Switching to months (month=$\frac 1{12}$ of a year, we see that if your debt by the end of the $k-th$ month was $D_k$, it will be $e^{r/12}D_k$ by the end of the $k+1$-st month. If you make a payment $p$ at the end of the month, it is properly reduced by $p$, so the recursion is (the starting loan date can be viewed as the end of the $0$-th month) $$ D_0=D,\qquad, D_{k+1}=e^{r/12}D_k-p $$ The recurrence relation can be rewritten as $$ e^{-(k+1)r/12}D_{k+1}=e^{-kr/12}D_k-e^{-(k+1)r/12}p $$ or $$ e^{-(k+1)r/12}p=e^{-kr/12}D_k-e^{-(k+1)r/12}D_{k+1}\,. $$ Adding over $k=0,\dots,n-1$, taking into account that $D_n=0$ (which means that the debt is paid in full by the end of the $n$-th month), summing the geometric progression on the left and telescoping the sum on the right (I assume that the 21-st century kindergartner knows that $\sum_{k=0}^{n-1}q^k=\frac{1-q^n}{1-q}$ and that $(a_0-a_1)+(a_1-a_2)+\dots+(a_{n-1}-a_n)=a_0-a_n$ or there has really been no progress in child mathematical education for the last 2 centuries despite pouring millions of dollars into various "education reforms"), we get $$ \frac{1-e^{-rn/12}}{e^{r/12}-1}p=D_0-0=D\,. $$ Thus, $$ p=D\frac{e^{r/12}-1}{1-e^{-rn/12}} $$ for the monthly payment.

The total payment $P$ is $np$ and the total charge is $$ P-D=D[n\frac{e^{r/12}-1}{1-e^{-rn/12}}-1]\,. $$ That is your formula (with $D=100$, $r=0.02,0,0225,0.025,0.0275,0.03$ and $n=1,2,3,4,5$ and the values in the table (in dollars) rounded to the nearest cent according to the common rounding rules).

Feel free to ask any questions if anything is unclear.