Path: blob/master/lessons/lesson_08/extra-materials/e_log_examples.ipynb
1904 views
Exponential functions and logarithms
Compounding
If I have a loan and I have to pay 50% a year interest, payable on the last day of the year, I repay 1.5 * the original loan amount
If that loan compounds every 6 months, I repay a little more than 1.5 * the original amount
If that loan compounds every month, I have to pay back even more.
And the number keeps getting higher the more you compound... until you reach e!
Exponential functions
What is e? It is simply a number (known as Euler's number):
The np.exp() function raises e to some power
e is a significant number, because it is the base rate of growth shared by all continually growing processes.
For example, if I have 10 dollars, and it grows 100% in 1 year (compounding continuously), I end up with 10*e^1 dollars:
Side note: When e is raised to a power, it is known as the exponential function. Technically, any number can be the base, and it would still be known as an exponential function (such as 2^5). But in our context, the base of the exponential function is assumed to be e.
Anyway, what if I only have 20% growth instead of 100% growth?
Logarithms
Logarithms invert raising something to a power. Here is an example:
Another example
Natural Logarithm -- Inverting e
The 'natural logarithm' inverts e. Becuase it is so common, you don't need to specify the base in numpy.
One interpretation of the (natural) logarithm is it gives you the time needed to reach a certain level of growth. For example, if I want growth by a factor of 2.718, it will take me 1 unit of time (assuming a 100% growth rate):
If I want growth by a factor of 7.389, it will take me 2 units of time:
If I want growth by a factor of 1, it will take me 0 units of time: