Computing interest and composition of functions: In this week, we are creating a simple and compound interest calculator in EXCEL. These two calculators will be used to solve interest questions in week 6. Please keep a copy of this for use during the week 6 activity. Simple Interest. Simple interest is computed only once a year. Let s say we wish to place $1000.00 in the bank with an interest rate of 5%. At the end of the year, we would have our original amount 0f $1000.00 plus 5% interest or 0.05 * 1000.00 (recall that interest is expressed as 5% but used in math equations by moving the decimal point two places, 0.05). From an equation standpoint we have, This simplifies to (factor the $1000.00) Since 0.05 represents the rate and we will not always earn 5%, we can allow r to represent rate. And since the amount we initially deposited may change, we can allow P to represent the principle amount deposited. This becomes a simple calculator for simple interest for 1 year. But the number of years can vary. To include years in our calculator, we can allow t to represent time in years and have the following simple interest equation. Let s create a simple interest calculator in EXCEL. Starting with labels A1 Simple Interest Calculator (we are heading this so we know its function later) A3 Principle A4 Rate A5 1+r We will calculate this A6 time in yrs A8 Amount (will be our answer.)
Now we can fill out the numbers and desired calculation in column B B3 enter the amount deposited (in this case 1000) B4 enter interest rate in decimal form (0.05) B5 enter =1+B4 (to find (1+r)) B6 enter time in years. (1) B8 enter =B3*B5^6 This is actually the equation You have just created a simple interest calculator. Can you answer the question, how much will you have if you deposit $2500 at 3.5% for 10 years, simple interest? Constants (variables), Functions and Composition of functions: Constants and variables are cells like B3, B4 and B6. In the cells we placed one number and they are not affected by any changes to any other cells. In cell B5 we added numbers using the cell B3 as one of the numbers. Since B3 is changeable, we actually created a function in B5. A function is any calculation using another cell as part of the calculation. To represent a function, we must begin with the = (equal) sign to allow EXCEL to understand we are calculating. In B3, B4, B6 we have constants and variables and in B5 we have a function. In B8 we wrote the function =B3*B5 B6. This is a function, but because it combines constants B3, B6 and a function B5, B8 is actually a special type of function called a composition of functions. Any time you use a computed answer as part of a new function, the new function is a composition of functions. Compound Interest. Compound interest is the act of giving out the earned interest more than just at the end of the year. In this case, let n be the number of times that you earn the interest within the year. Thus, if you earn interest monthly, you will have 12 interest payments and n=12. If you earn interest quarterly, n=4. Your interest rate during the time you earn interest will be r/n. And the number of times you earn interest will be need to be included in the exponent. Thus, the main difference between simple interest
and compound interest in the equation is that you replace (1+r) with (1+r/n) n and your interest equation becomes, {( ) } Using rules of exponents this simplifies to ( ) We can now create the labels for a compound interest calculator. A10 Compound interest calculator A12 Principle A13 Rate A14 n A15 1+r/n A16 time in years A18 Amount For our first example, let s deposit $2000 compounded monthly (n=12) at 4% (r=0.04) for five years (t=5) Since we know the principle (2000), the number of compounds (12), the rate (0.4) and the time (5), enter these values into their appropriate boxes. B12 2000 B14 12 B13.04 B16 5 Next the two calculated (functions0 B15 enter = 1+B13/B14 And the final amount box B18 enter =B12*B15^(B14*B16) The result is you will have $3052.49 at the end of 5 years.
Now you have both a simple and compound interest calculator. Please save these until week 6 activity. (The best way to do this is to email this to everyone in your group so you each have a copy) Thanks We wish to look at one more feature of EXCEL Today. We wish to graph over time, the amount of funds in the bank. Since we wish to save the calculators for week 6, Click on Sheet2 at the left hand bottom of the spread sheet. This will provide a clean spreadsheet and assist us in not destroying the original for later. Recreate the simple interest calculator, but where amount is enter year (in A8) and Amount in (in B8) We are going to create a T-chart with years in column A and the amount in savings for each year in column B In A9 enter 0 for starting value In A10 enter 1 for the end of the first year. In B9 enter = B3 This will make sure that the original amount will change if you change the principle above. In Cell B10 we enter =$B$3*$B$5^A10 The $B$3 means that when we copy cell B10, we will still reference cell B3, Same with $B$5. However the A10 cell will refer to the cell immediately to the left of the new cell.
Next, highlight cells A10 and B10. With the cells A10 and B10 highlighted, you are going to grab little square at the right hand bottom of the highlighting rectangle. Once you have grabbed the square, drag the it to cell B18. When you finishing dragging the little square, all cells through B18 will auto populate. (If you missed the little square go back and repeat.) Notice that the column A automatically grew by one. Thus, the year changed without our need to inform EXCEL. Also if we examine the cell B18 we find =$B$3*$B$5^A18. Notice that B# and B5 did not change but A18 changed by one in each row. Hence, we are actually calculating simple interest for each year. Our goal is to graph the amount per year.
Highlight the cells we wish to graph Click on the insert tab Click on the scatter tab and pick the picture of points When you finish you will have a scatter plot: 1800 1600 1400 1200 1000 800 600 400 200 0 Amount 0 2 4 6 8 10 Amount
If you wish to graph the function associated with this, left click on one of the data points. A pop-up window will appear and click on Add Trendline This will create a another pop-up window. Since the formulas are a function of time and time is in the exponent spot make sure you choose an exponential function. Click close and the trendline should appear. The resulting graph is
1800 1600 1400 1200 1000 800 600 400 200 0 Amount 0 2 4 6 8 10 Amount Expon. (Amount)