 
TI83 Plus/TI84 Finite
Math
Contents:
Simple interest, compound interest, effective rate, annuities, sinking funds,
loan amortization, rate of return, present value,
Interest accumulated, principal remaining,
alpha, beta, correlation coeffficient, r Squared, meanvariance optimization,
least squares
best fit, and much more.
Last Revised:
3/23/2015
INDEX:
To facilitate lookup, the instructions are divided into
the following categories:
I. Interest 
Simple Interest, Compound Interest, Interest Compounded Continuously, Effective Interest Rate.
II. Annuities and Mortgages 
Ordinary Annuities, Annuities Due, Sinking Funds,
III. Loans  Car Loans, Loan Amortization Table by hand,
Loan Amortization Table SemiAutomated
method, Loan Amortization Table Calculator Program,
IV. Investments – Price of a bond; Interest to Maturity of a Bond,
Present Value, Internal Rate of
return (Irr),
Modified Internal Rate of Return (mirr),
V. A few Portfolio Calculations  Alpha, Beta, CorrCoef, and R Squared,
Geometric Return, A smidgen of meanvariance
optimization.
VI. Least Squares  Least Squares with
Calc,
RELEASE DATE: 3/20/15 Latest
Revision: 3/23/15
© 2003 Frank Kizer
NOTE: See copy restrictions and printing
hints at the end of this document.
General:
* TMV Solver  Unless otherwise indicated, all calculations will be
with the TMV Solver. To access
this, press APPS, ENTER, ENTER.
*
Most
of these instructions will be carried out using a problem as an example. Note that some of the
problems could be solved, possibly even easier, without the Finance
APP, but this document deals with
that APP only.
* Minus Signs  Note that some
answers will have a minus sign before them. These are there because
the
calculator follows the cashflow sign convention in which cash outflows
(investments for example)
are negative and inflows are positive. For many
problems, you can ignore this sign. When it's
important, that will be indicated.
* Setting N, P/Y, and C/Y  As a general rule, when there are no periodic
payments, such as in
interest calculations, "N" is set equal to the number of years
and P/Y is set at 1. C/Y will be set to
the number of compounding periods a year. Notice that for
daily compounding, C/Y will be set at 360
or possibly 365 for some problems. For loans, annuities, and other
such things with periodic payments,
P/Y will be set for the number of payments a year, "N" will be
the number of payments, and C/Y will be
set for the number of compoundings per year.
* Note to Students: The presence of this document does not imply
that students should rely solely on the calculator
to find the answers to their problems. Doing the problems by hand
definitely helps to understand the problem and
gives good practice in manipulating the formulas. I encourage students to
use the calculator to check their answers
and to obtain answers only when allowed by the professor.
I. Simple and Compound Interest.
1. Simple Interest:
Comment: Simple interest can be easily obtained from the formula I=PRT,
but for nonstudents and others who may rely solely on the
calculator, I will include simple
interest. Suppose a student had $1000 which she did not need for 3 years. If she
invested it for 3 years at 5%
annual interest, how much did she
have at the end of the 3 years?
a) Enter values so that the display appears as
follows: N=1; I%=5*3; PV = 1000; PMT=0; P/Y =1; C/Y=1; END.
b) Set the cursor on FV and press ALPHA; SOLVE.
Note that SOLVE is the third function of the ENTER key. The answer will be
1150.
Ignore the negative sign.
c) Note that if you want the interest accumulated, then
just subtract $1000 from the answer obtained in the above operation.
Note that this works fine in all cases except when you want to find the
interest. Suppose that instead of the above
problem, the problem was the same except that the
student wanted to know what interest she would need to have
$1150 in three
years.
a) Enter values so that the display appears as follows: N=1; PV = 1000; PMT=0;
FV=1150; P/Y =1; C/Y=1; END.
b) Set the cursor opposite I% and press ALPHA; SOLVE.
The answer will be 15.
c) Move the cursor over past 15 and enter ÷, 3; then
press ENTER. The correct answer, 5, will be displayed.
2. Compound Interest:
Ex 1: Suppose that you
invest $5000 for 6.5 years at 5.25% interest compounded quarterly,
how much money will you have at the
end of the period?
a) Press APPS, ENTER, ENTER
to display the TMV Solver.
b) Enter values so
that the following display is completed: N=6.5; I%=5.25; PV = 5000; PMT=0;
P/Y =1; C/Y=4; END.
c) Set the cursor on FV and
press ALPHA; SOLVE. Note that SOLVE is the third function of the
ENTER
key. Your answer should be 7017.93.
d) Note that if you want the
interest accumulated, then just subtract $5000 from the answer
obtained in the above operation.
Ex 2:
Suppose that you have $1200 and you need $1800 in 7 years, at what
interest compounded
quarterly, will you need to invest
the money to earn this amount?
a) Enter values so that the
following display is completed: N=7; I%=0; PV = 1200; PMT=0;
FV=1800,
P/Y =1; C/Y=4; END.
b) Set the cursor on I%, and
press ALPHA; SOLVE. Note that SOLVE is the third function of the
ENTER
key. Your answer should be 5.835 rounded to 3 decimal places.
EX
3: Interest Compounded Continuously:
Although the
formula A=Pe^{rt} is just about as easy to work with as using the Finance APP, some
users have difficulty
working with the
formula to obtain time or rate. So, I will include this example of
continuous compounding.
Let's take
the information in Ex 2 above except that we have interest compounded
continuously.
a)
Enter the information exactly as in Ex 2 except that for C/Y, enter 1E10.
Do that by pressing 2, 2ND
EE (the comma key), 9, ENTER.
b) Set the
cursor on I%, and press ALPHA; SOLVE. Note that SOLVE is the third function of
the
ENTER key. Your answer should be 5.792 rounded to 3 decimal
places.
EX 4: Time to
Double Investment at Continuous Compounding:
Suppose you want to know
how long would be required to double your investment at an interest rate of 5
percent with continuous
compounding.
a) Take any convenient
value such as $100 and double it to get $200.
b) Enter values so that
the following display is completed: N=; I%=5; PV = 100; PMT=0; FV=200, P/Y =1;
C/Y=1E10; END
c) Set the cursor
opposite N and press ALPHA; SOLVE. . The answer would be 13.86… or about
13 years and 315 days..
3.
Effective Interest Rate:
Suppose that a one bank tells you that it pays
3.9% compounded monthly and another tells you
that it pays 4% compounded semiannually. Which
one is the best investment?
a) Press APPS, ENTER, move the cursor down to C:EFF( and press
ENTER. (Alternatively, you
may press ALPHA C.) "EFF ("
will be pasted to the screen.
b) Enter 3.9, 12) and press ENTER. The
effective interest rate will be 3.97%.
c) Press 2nd, ENTRY (the second function of
ENTER); then edit the entry so that you have
EFF(4, 2); then press
ENTER. Your answer will be 4.04. So, this is the best investment.
II. Annuities and Mortgages:
1. Ordinary Annuities:
For our purposes, an
ordinary annuity will be one in which equal payments are made at equal
periods of time, the
compounding period is the same as the payment period, and the payments
are made at the end of the
period. Note Well: Because there are payments in an annuity, "N" in
the TMV Solver must set equal
to the number of payment periods.
Ex. 1: Suppose that you
pay $20,000 each year into an annuity for 7 years. If the interest is 6%
compounded annually, how much
will you have at the end of the period?
a) Press APPS, ENTER, ENTER to display the
TMV Solver.
b) Enter values so that the following display
is completed: N=7; I%=6; PV = 0;PMT=20000;
P/Y =1; C/Y=1; END.
c) Set the cursor on FV
and press ALPHA, SOLVE. Note that SOLVE is the third function of the
ENTER
key. Your answer should be 167876.75.
2. Annuities Due:
Annuities Due have the same setup as ordinary annuities, except that BEGIN is
highlighted
instead of END.
Ex. 1: Suppose that you
pay $500 each year into an annuity due for 7 years. If the interest is
6% compounded annually, how
much will you have at the end of the year?
a) Press APPS, ENTER, ENTER to
display the TMV Solver.
b) Enter values so that the following display
is completed: N=7; I%=6; PV = 0;PMT=500;
P/Y =1; C/Y=1; BEGIN
c) Set the cursor on FV and
press ALPHA, SOLVE. Note that SOLVE is the third function of the
ENTER
key. Your answer should be 4448.73..., rounded to 2 decimal places.
3. Sinking Funds:
Sinking funds have the same
characteristics as annuities, but they are for purposes other than an
annuity. They may be to
accumulate enough money to buy a car, pay off a loan, or any other purpose.
Follow the same
procedure for these as for annuities.
4. Mortgages:
Suppose a family buys
a home for $200000 and makes a down payment of $20000. They take
out a $180000 mortgage at
7.5% for 30 years. What is the monthly payment required to
amortize this loan? How
much interest is paid on this loan?
Payment:
a) Press APPS, ENTER, ENTER to display the TMV Solver.
b) Enter values so that the following display
is completed: N=360; I%=7.5; PV =
180000; FV=0; PMT=0; P/Y =12; C/Y=12; END.
c) Set the cursor
on PMT and
press ALPHA, SOLVE. Note that SOLVE is the third function of
the ENTER
key. Your answer should be 1258.59, rounded to 2 decimal places.
Interest:
You
can calculate the interest either using the calculator or by hand.
Calculator
a) After calculating the paymet, set the cursor on FV and press APP, ENTER, and
movethe cursor
down to ƩInt( and press ENTER. The expression ƩInt( will be displayed opposite
FV.
b) Enter the months spread, for example 1 to 360 so that you have ƩInt(1, 360).
c) Press ENTER and the value 273091.00 will be displayed opposite FV.
By Hand:
a) To calculate by hand, use the following formula:
Total Interest = Monthly Payment * Number of Months  Original Amount of Loan.
You may get a small difference between these two methods because of rounding.
NOTE: You can also use ƩPrn( and bal( in the same way. For example,
ƩPrn(5, 9) will give you the
amount of principal paid in that period and bal(3) will give you the balance
after payment 3.
5.
Mortgage Loan Calculations:
Calculate Individual values:
Suppose you have an 10year loan of $80,000.00 at 8.5 percent with payments
each month.
Make an amortization table for the first three payments. You
might first want to make a table
such as
that in Figure 1 below to enter your data. The calculated data has
already been entered in
this table.
To
Calculate the Monthly Payment::
a) Press APPS, ENTER, ENTER
b) Put the following information in the display that appears:
N=10*12; I% = 8.5; PV=80000;
FV=0; P/Y=12;C/Y = 12; END.
c) Put the cursor at PMT, press ALPHA, SOLVE and the payment of 991.885 will be
displayed
opposite PMT.
To
Calculate a Specific Principal Balance:
a) From the Home screen,
press APPS, ENTER, move the cursor to display bal( on the Home screen.
b) Enter values so that your display looks like this:
bal(3) . The numbers inside the parentheses indicate the
balance will be calculated after the third payment.
c) Press ENTER and the value indicated in the Table 1 below for the third
payment will be displayed. You can
calculate additional balances by pressing 2nd, ENTER, and editing the payment
number.
To Calculate a Specific Principal Payment:
a) From the Home screen,
press APPS, ENTER, move the cursor to display
∑Prn(.
Press ENTER and
the term
∑Prn( will be pasted to the Home
screen.
b) Enter values so that your display looks like this: ∑Prn(3, 3) . The numbers inside the parentheses
indicate the principal payment will be calculated for the third payment.
c) Press ENTER and the value indicated in the Table 1 below for the third
payment will be displayed.
To
calculate a Specific Interest Payments.
a) From the Home screen,
press APPS, ENTER; move then cursor down ∑Int.
Press ENTER and
the term ∑Int
will be pasted to the Home
screen.
b) Enter values so that your display looks like this: ∑Int(3, 3) . The numbers inside the parentheses
indicate the principal payment will be calculated for the third payment.
c) Press ENTER and the value indicated in the table below for the third
payment will be displayed.
Of course you could fill out a few lines of a table such as that below using
this method, but there's a better method
which I've included in the amortization method below.
5. Amortization Table for a Loan:
General:
The manual procedure, which I will explain first, takes a lot of time if you
have to
calculate several loans or several lines on a table. Therefore, I have
added a little program
that I wrote to
save you some work. The program follows this explanation.
Manual Procedure:
General: The manual procedure, which I will explain
first, takes quite a lot of time if you have to
calculate several loans. Therefore, I
have added a little program that I wrote to save you some work.
The program follows this
explanation.
Details of Manual Procedure:
Suppose you have a 10year loan of $80,000.00 at 8.5 percent
with payments each month.
Make an amortization table for the first three payments. You
might first want to make a table
such as the following to enter your data. The calculated data has
already been entered in
this table.
Payment
Number 
Amount of
Payment 
Principal
Payment 
Interest
Payment 
Principal
Balance 
0 



$80,000.00 
1 
$991.89 
$425.22 
$566.67 
$79574.80 
2 
$991.89 
$428.23 
$563.65 
79146.54 
3 
$991.89 
$431.26 
$560.62 
78715.285 
Table 1
Semiautomated Method Using TVM Solver, Graph, and Table:
In previous versions I had not included this method because I thought that the
program would be
used by those who have considerable work of this type to do. The programs
seems not to have been
used much, so I am including this, somewhat tedious, I'm afraid, method to
add more flexibility.
a) First, I recommend that you make a table such as the one immediately
above. You might wanat to name the columns X, Y_{7}, Y_{8,}Y_{9,}Y_{0.
}b) Press APPS, ENTER, ENTER to display the TMV Solver.
c) Put the following information in the display that appears:
N=10*12; I% = 8.5; PV=80000;
FV=0; P/Y=12;C/Y = 12; END.
d) Put the cursor at PMT, press ALPHA, ENTER, and the payment of 991.885
will be displayed
opposite PMT.
e) Press Y= to go to the graphing
screen. We are going to enter some financial functions in positions
Y_{7}, Y_{8,}Y_{9,}Y_{0.
}(You could enter them in Y_{1}, etc. if you
prefer, but I am entering them so that the upper variables
can be used for other
functions.)
f) Place the cursor opposite Y_{7} and press APPS, ENTER. Now move the cursor down to tmv_Pmt
and press ENTER to paste tmv_Pmt opposite Y_{7}.
g) Place the cursor opposite Y_{8} and press APPS, ENTER.
Now move the cursor down to ΣPrn(
and press ENTER to paste ΣPrn(
opposite Y_{8}.
h) Enter characters so that you have
ΣPrn(X,X) opposite Y_{8}.
i) Place the cursor opposite Y_{9} and press APPS, ENTER. Now,
move the cursor down to bal( and press ENTER.
j) Enter characters so that you have
bal(X) opposite Y_{0}.
k) Press 2ND, TBLSET, and set TblStart = 0 and
ΔTbl=1 and Indpnt to Ask
l) Press 2ND, TABLE and enter the payment number or numbers that you want
information for.. When
you enter a number in the Xcolumn the values for theYvariables will be
entered. You will need to
scroll right to see the columns on the right since only three columns take up
the whole screen.
Obviously,
if you want to calculate a table for a different mortgage, just do the
calculation for the
payment again and then use the table to get the values for the second mortgage
without having
to make new entries in the Y= positions. Be sure to deselect the Yvariables
before graphing a
function or you'll tie your calculator up for some time graphing unwanted
stuff.
Using the Program: This is a simple program that should take only a
few minutes to enter if you
have some rudimentary knowledge of how to enter programs. You can find
information on entering
programs in your TI User Manual or in the programs
section on this Website. (Click on TI
Programming Keystrokes near the bottom of the navigation panel to the left.)
After one student has the
program stored in a calculator, it takes less than three minutes,
including setup to transfer the program to
in another student's calculator. NOTE: The colons to the left on the lines of code are automatically entered
when you enter the program by hand.
:PROGRAM: LAONAMRT
:"FKIZER V:050106"
: Disp "ENTR DATA IN APPS"
:Input "1ST PMT NO. ", B
:Input "LAST PMT NO. ", E
:1→X
:ClrList L_{1}, L_{2}, L_{3}, L_{4},_{ }L_{5
}
:For(P,B,E
:P→L_{1}(X)
:tmv_Pmt→L_{2}(X)
:∑Int( P,P→L_{3}(X)
:∑Prn( P,P→L_{4}(X)
:bal(P→L_{5}(X)
:X+1→X
:End
:Stop
Using the Program: Here's how to use this program, assuming you
already have it entered.
1) Follow the first three steps in the manual method described above; then
press 2nd, QUIT.
2) Pres, PRGM; move the cursor down to the name of the program you want to
use and press ENTER.
3) The statement 1ST PMT NO. will appear. Enter the number of the first
payment you want to
calculate
data for and press ENTER.
4) LAST PMT NO. will then appear. Enter the number for the last
payment you want to calculate
and press ENTER.
Obviously, if you want only one payment, that number will be entered for
both the first and last payment number.
5) The calculator will store the amounts for Payment, Interest, Principal
Payment, and Principal
Balance in that order in lists L_{1, }L_{2}, L_{3}, L_{4, }
and L_{5} .
6) To access the data tables, press STAT, ENTER.
7) You will notice that the data has only five characters (Numbers plus
decimal and negative sign, if
any.). If you want a more accurate answer, scroll to the number of interst
and a more accurate value
will be displayed below the tables containing the lists.
III. Loans:
Loans, car loans for example, have the same
structure as ordinary annuities. Let's do an example
to demonstrate that.
Ex 1: Suppose that a car costs $26,000 and
your down payment is $4000. The balance will be paid off in
36 monthly payments with a interest of 10% per
year on the unpaid balance. Find the monthly
payment.
a) Press APPS, ENTER, ENTER to
display the TMV Solver.
b)
Enter values so that the following display is completed: N=36; I%=10; PV =
22000;PMT=0;
FV=0; P/Y =12;
C/Y=12; END.
c) Set the cursor on PMT and press ALPHA,
SOLVE. Note that SOLVE is the third function of
the ENTER key. Your
answer should be 709.88, rounded to 2 decimal places.
IV. Investments:
1. Bonds:
Ex 1: Suppose
that a $1000, 10year, 8% bond is issued when the market rate is 7.5%.
Interest is paid
semiannually. What can you expect to pay for the bond?
a) Press APPS,
ENTER, ENTER to display the TMV Solver.
b)
Enter values so that the following display is completed: N=20; I%=7.5; PV =0;PMT=40;
FV=1000; P/Y =2;
C/Y=2; END. It's important to realize that the cost is based on the
interest
to maturity.
c) Set the cursor
on PV and press ALPHA,
SOLVE. Note that SOLVE is the third function of
the ENTER key. Your
answer should be 1034.74, rounded to 2 decimal places.
Ex 2:
Suppose that you have to pay $1034.74 for a $1000, 10year, 8% bond with
interest paid
twice a year.
What is the interest to maturity for the bond?
a)
Enter values so that the following display is completed: N=20; I%=0; PV =1034.74;PMT=40;
FV=1000; P/Y =2;
C/Y=2; END.
b) Set the
cursor on I% and press ALPHA,
SOLVE. Note that SOLVE is the third function of
the ENTER key. Your
answer should be 7.5%.
2.
Present value:
The
syntax for Net Present Value (NPV) is: npv(interest rate, CFO,
CFList[CFFreq]). Now,
let's
define what these mean:
Interest Rate = the rate by which to discount the
cash flows over one period.
CFO = the initial cash flow at time zero.
CFOList = A list of cash flow amounts AFTER the
initial cash flow, CFO.
CFFreq = How many there are of each amount.
The default is 1.
Ex.
1: Suppose you are offered an investment that will pay the cash flows
in the table below at
the end
of each year for the next 5 years. How much would you be willing to pay
for it if you
wanted
10 percent interest per year?
PERIOD 
CASH FLOWS 
0 
0 
1 
100 
2 
200 
3 
300 
4 
400 
5 
500 
a) Press STAT, ENTER to go to the lists. It there are numbers in the list
you choose to use,
you can erase those numbers by highlighting the list name, for example L_{1},
pressing CLEAR;
then ENTER. Do not use DEL.
b) Enter the numbers starting with 100 in list L_{1.
} To enter a number, just enter it and press ENTER.
c) Press 2nd, QUIT to leave the list.
d) Press APPS, ENTER, 7. "npv(" will be pasted to the home screen.
e) Make entries so that you have the following: npv(10, 0, L_{1}.
To enter L_{1}, press 2nd L_{1}. (L_{1}
is the second function of the number 1 key.)
f) Press ENTER. Your answer should be 1065.26 rounded to two decimal
places.
NOTE 1: Instead of using the lists, you could enter the following:
npv(10, 0, {100, 200, 300, 400, 500}). Then press ENTER. I frankly prefer
to use lists because
of the increased flexibility.
NOTE: If you have several CONSECUTIVE cash flows, you can create a
frequency table in
another list, L_{2, }for example. You will need to enter the
frequency for each of the CFO values,
even if it is 1. Your entry then would be npv(10, 0 L_{1}, L_{2}
.
Ex. 2: Suppose that we wanted to find the future value. Rather than
using the TMV solver for
each cash flow and adding them up, just multiply the answer from Ex. 1 by
(1+.10)^5. To do
that, press 2nd, Ans, x (multiply), (1+.10)^5. Your answer should be
1715.61.
Ex. 3: Suppose that you were offered the above investment for $800.
What is the NPV?
CFO is now 800. The cash outflow is negative. So, we would enter,
npv(10, 800, L_{1}. Your
answer should be 265.26 rounded to 2 decimal places.
3. Internal Rate of Return (Irr):
Suppose you
wanted to find the Irr for the npv example above.
a)
First enter all of the cash flows except the first in list L_{1}.
b) Press
APPS, ENTER, 8. The term "irr(" will be displayed on the home screen.
c) Make
entries so that you have the following: irr(800, L_{1}.Your
answer should be 19.538. This
assumes that the numbers in the table of cash flows above have been entered in
list L_{1}.
Comments:
If you get an error message using this procedure and don't understand why, go to
the home page,
click on "More Detalied P2" under TI FAQs, and read FAQ 56.
4.
Modified Internal Rate of Return (MIrr):
Step 1:
First we'll find the Future Value:
a) Press STAT,
ENTER to go to the lists. It there are numbers in the list you choose to
use,
you can erase those numbers by highlighting the list name, for example L_{1},
pressing CLEAR;
then ENTER. Do not use DEL.
b) Enter the numbers starting with 100 in list L_{1.
} To enter a number, just enter it and press ENTER.
c) Press 2nd, QUIT to leave the list.
d) Press APPS, ENTER, ENTER to display the TMV Solver.
e)
Enter values in the display as
follows:: N=5; I%=0; PV =800; PMT=0;
FV=1715.61; P/Y =1;
C/Y=; END.
Now, we want
to enter a calculated value into FV. To do that, place the cursor opposite FV,
press
CLEAR to
clear the value there; the do the following:
f) Press APPS, ENTER, 7. "npv(" will be pasted to the home screen.
g) Make entries so that you have the following: npv(10, 0, L_{1}).
To enter L_{1}, press 2nd L_{1}. (L_{1} is the
second function of the number 1 key.)
h) Now, we
want to multiply this by (1.1)^5. To do that enter 1.1^5. You
should now have
the this expression: npv(10, 0, L_{1})1.1^5. When you move
the cursor away from FV you
should have 1715.61
i) Set
the cursor on I% and press ALPHA, SOLVE. Note that SOLVE is the third
function of
the ENTER key. Your answer should be 16.48 rounded to two decimal places.
V. A Few Portrolio
Calculations:
1.
Alpha, Beta, CorrCoef, and RSquared:
Although they may seem
quite complex so far as their uses in a portfolio, in concept,
α and β are
quite simple mathematically.
The
α term is just the yintercept of the line y=mx
+b that you learned about somewhere around seventh grade and
β is
the slope of that line. Note
that these calculations are grouped together only because they result from the
same calculator
operation and not for any
financial reason.
Comments about alpha and
beta:
But the question my be, "Where
does the line come from?" Well, the xvalues are usually a benchmark; we'll use
the S&P 500,
and the yvalues are a fund or
stock that you want to investigate. The line is the leastsqures best linear fit
to the data points.
Alpha, as it applies to a
portfolio is the nonsystematic value that remains when the market value (the
S&P 550 data) is zero.
Although all of these values
can be calculated by hand using the list arithmetic, we'll use the function of
the calculator that
does all of the arithmetic.
Comments about r and r^{2}:
Although the terms r, and r^{2}
are somewhat more complex because of the arithmetic calculations involved, the
calculator
takes care of all of the
arithmetic. The correlation coefficient, r, is an indication of how
strongly the two data
groups are correlated. In our
case, how strongly is a fund correlated to the S&P 500. The term
r^{2} (also called R Squared
and R^{2} ) in statistics called the coefficient of determination, is as
follows: r^{2} = (explained variation)/(total
variation), where
explained variation is that predicted by the bestfit line.
For example, if r^{2 } is 90%, then 90% of the variation in the
bestfit
line is explained by the variation of the S&P 500.
So, let's calculate these
values for two different international funds.
FUND OR BENCHMARK 
YEARLY RETUNS 
α 
β 
r^{2} 
r 
S& P 500 
10.88, 4.91, 15.79, 5.49, 37.00, 26.46,
15.06, 2.11, 16.00, 32.39, 




Fund A 
13.89,16.27,19.26,13.43, 48.02, 52.20,
14.48,12.33, 18.72, 14.27 
0.73078 
1.1888 
0.7600 
0.8718 
Fund B 
20.84, 15.57, 26.64, 15.52, 44.10, 36.73,
11.04, 14.52,18.21. 15.14 
0.8707 
1.0691 
0.7582 
0.8707 
While we're at it let's find the averages.
We'll need them later.
For the S&P 500, press STAT, move the cursor to Math and press ENTER, ENTER. In
the display the
value for xbar =9.209.
For Fund A do the same except when you get the display 1Var Stats, press 2nd, L_{2}
to get 1Var Stats L_{2}.
Then press ENTER to get xbar = 10.217
Find the
Various Relationships:
Relationship
between S*P 500 and Fund A:
a) Press STAT, ENTER and
enter the S&P 500 returns in list L_{1} and the Fund A returns in list L_{2}.
b) Press STAT, go to CALC and press 8 for LinReg(a+bX).
c) Place the cursor opposite Xlist, press 2nd L_{1}; then 2nd L_{2 }
opposite Ylist.^{.
}d) On the screen that appears, move the cursor to "Calculate"
and press ENTER. The values listed in the table will appear.
Note that if you don't have the Stats Wizard,
press 8 and then ENTER.
Relationship between S&P 500
and Fund B:
a) Press STAT, ENTER and enter the data MSCI data in list L_{1}
and the Fund B data in list L_{3}.
b) Press STAT, go to CALC and press 8 for LinReg(a+bx).
c) Place the cursor opposite Xlist, press 2nd L_{1}; then 2nd L_{3
}opposite Ylist.^{.
}d) On the screen that appears, move the cursor to "Calculate"
and press ENTER. The values listed in the table will appear.
Note that if you don't have the Stats Wizard,
press 8 and enter the lists so that you have the following: LinReg(a+bx) L_{1},
L_{3};_{ }then
press ENTER to display that appears on the same
line as Fund B in the table above.
Comments:
Funds
A and B are two different international funds. These are usally compare to the
MSCI, but for this exercise, it
doesn't make any difference.You'll notice the two funds have
about the same correlation asindicated by the values of r. The values
for β indicate how much a fund return
moves when the benchmark moves a unit value. You'll
notice that Fund A moves somewhat
more than Fund B. The r^{2 }values
indicate that slightly more of the volatility of Fund A is explained
by the volatility of the S&P 500
than is Fund B.
Finally, alpha indicates the difference between the value as prdicted
by the slope, β, and the market return, in this
case the S&P 500.
For the market return,
α is zero. You'll
notice that Fund B is
somewhat higher.
2. Sharpe Ratio:
The Sharpe is a means of comparing returns of
investments over a broad range of assets. The ratio measures the excess return
of an asset relative to it's standard deviation.
Remember that alpha measures the excess return relative to it's beta. The excess
return is usually that above the 6months Tbill over
the same period. Suppose that an asset has a return over a certain period of
arithmetic mean of 12% and return of the 6months
Tbill arithmetic mean of 3.0%. Further suppose that the standard deviation is
15%. Then the Sharpe ratio is (123)/15 =0.6
3. Geometric Mean:
Let's do the geometric mean of the S&P 500 as
listed in the table at the beginning of this section.
a) Press STAT, ENTER and enter the returns data in list
L_{1} or whatever list is convenient.
b) Place the cursor on the list name of list L_{2}
or whatever list you choose, and enter 2nd, L_{1}/100 +1 and press
ENTER.
Now, we're going to use the
formula (products of L_{2})^{1/k} , where "k" is the number of
return values. In out case that's
10.
c) Press 2nd, STAT, move the cursor to MATH on the menu
that appears and press 6 for prod(.
d) Press 2nd, L_{2} so that you have prod(L_{2
}on the display. Press ENTER.
e) Now enter the following: (Ans)^{1/10}
1 . You may need to enter the entire exponent in parentheses if you have
an older
calculator. If you did the S&P returns, you should get 7.4.
4. MeanVariance Optimization:
We will be using this table as data.
FUND OR BENCHMARK 
YEARLY RETUNS 
α 
β 
r^{2} 
r 
S& P 500 
10.88, 4.91, 15.79, 5.49, 37.00, 26.46,
15.06, 2.11, 16.00, 32.39, 




Fund A 
13.89,16.27,19.26,13.43, 48.02, 52.20,
14.48,12.33, 18.72, 14.27 
0.73078 
1.1888 
0.7600 
0.8718 
Fund B 
20.84, 15.57, 26.64, 15.52, 44.10, 36.73,
11.04, 14.52,18.21. 15.14 
0.8707 
1.0691 
0.7582 
0.8707 
I'm going to do a very limited meanvariance
optimization. I realize that Excel or a portfolio optimizer is the preferred
method
of doing optimizations, but I'm thinking that maybe
doing it with a calculator will give some insight as to what is being done
in Excel. Caveat: I'm aware that meanvariance
optimization assumes that returns are normally distributed, that it often uses
historical rather than future data, and other
shortcomings. I'm not going to deal with those issues. This section if for
helping
students better understand what meanvariance
optimization is all about, not evaluation of
the effectiveness of procedures.
So, with that, let's write down the formulas for the
portfolio return and standard deviation.
Portfolio Expected Return:
E(R_{p}) = w^{T} µ Where w^{T}
is the transpose of the vector of the weights, w.
Standard Deviation of Portfolio:
σ_{p} =(w^{T} V w)^(1/2) Where w^{T}
is as explained immediately above, V is the variancecovariance matrix and w is
just the
vector of weights.
So, let's take a highly unrealistic portfolio of
S&P 500 and Fund A with the returns as given in the table above and a weighting of .25
for
the S&P and .75
for Fund A. So, that would give us a weighting vector as follows:
[[.25]
[.75]]
Let's put that in matrix [H] for heavy
The terms used for the return matrix would be as
follows:
So, µ =[[7.4]
[6.79]]
These values were obtained by taking the geometric means of the
values in the tables above where r, r^{2}
etc. are listed.
Let's put them in matrix [I]. Item 3, above, is a procedure for
doing geometric mean.
So, the formula for the return is as follows:
E(R_{p}) = w^{T} µ
So, in terms of our matrices, that would be as follows:
E(R_{p}) =[H]^{T} [I]
a) To get [H]^{T} , we put the numbers in matrix [H]. Then
press 2nd, QUIT to quit the matrix editor.
b) Press 2nd, MATRIX, move the cursor to highlight [H] and press ENTER.
c) Press 2nd, MATRIX, move the cursor to MATH, and press 2 for ^{T} .
You then should have [H]^{T} .
d) If you have the µ matrix in [I], then press x, the multiply sign; then press
2nd, MATRIX, and press 2
for matrix [I].
e) Press ENTER to get the answer of 6.94.
Portfolio Standard Deviation:
The portfolio standard deviation requires considerably more work.
Remember that the formula for the standard deviation
is as follows:
σ_{p} =(w^{T} V w)^(1/2)
The sticky point is getting the variancecovariance matrix, V. Remember that the
formula for that matrix is as follows:
σ_{xy} =1/n Ʃ_{i=1,n }(X_{i}X̄)(Y_{i}ȳ)
Where xbar and ybar are the arithmetic means.
So put the returns from the table above in matrix [A]. Put the S&P values in the
first column and those for Fund A in
the second column. Then in matrix [B], enter a 10 x 10 matrix with all 1s. To
save some time in entering all of the 1s,
you can go to the matrices and dimension [B] as a 10 x 10. Then go to the home
screen. Press 2nd, MATRIX, move
the cursor to MATH, select Fill( and press ENTER. Then enter information so that
you have Fill(1, [B]. Press ENTER
to fill the matrix. Note tha [B] must be entered from the list of matrices.
Let's do the variancecovariance matrix in two steps as follows:
Diff = [A]1/10*[B]*[A]> [C] Eq 1
The symbol > is obtained by pressing the STO button.
Covr = V =1/10*[C]^{T} [C] >[D]
Now, we want to implement the following equation for the standard deviation:
σ_{p} =(w^{T} V w)^(1/2)
Since we can't take the square root of a matrix, we'll have to solve for the
square; then take the square root of the number
inside the 1x1 matrix.
(σ_{p})^{2}=([H]^{T} *[D]* [H])
σ_{p =}√(σ_{p}^{2}
) (NOTE: Don't take the square root of Ans because it's a matrix. Take the
square root of the number inside the
matrix.
Here's a little program to do the above calculations. You'll need to put the
returns in matrix [A] and make a k x k matrix of 1s,
and the averages of the returns in ]I].
:MVOPT
:"FKIZER 06/09/14"
:Input "1ST. WEIGHT" , F
:Input "2ND WEIGHT , S
:Input "NO. RETURNS ",N
:[[F] [S]]> [H]
:[H]^{T} *[I]>[E]
:[A]1/N*[B]*[A]>[D]
:1/N*[D]^{T}*[D]>[C]
:[H]^{T} *[C]*[H]>[J]
:Matr►list([J]L_{6})
:ClrHome
:Disp "RETN ",[E]
:Disp "STD DEV ", √(L_{6})
I may be back later to add more detail as to what the matrices are doing for
the variancecovariance matrix,
but for now, that's it.
II. Solving Linear Programming Problems Graphically:
1) Graphical Linear Programming without the Inequality Application:
.
Find the maximum of the objective function z=2x +5y,
subject to the following constraints:
3x+2y≤6 (Eq 1a)
x+2y≤4 (Eq 2a)
x≥0, y≥0
a) First put the twovariable equations in slopeintercept form.
y≤3/2x+3 (Eq 1b)
y≤1/2x+2 (Eq 2b)
(Remember that you may need to change the direction of the
inequality sign if you have to
multiply or divide by 1 during the rearranging of the equation.)
b) Enter the right side of those equations opposite Y1 and Y2
respectively. Opposite the equal sign
for Y3 enter 0 (zero).
c) Set the WINDOW at Xmin = 1, Ymin=1, Ymax= the largest value of "b"
plus a few units, say 5 in
this problem.
Xmax is a bit more difficult to anticipate. If there is an equality with a
negative slope, I usually
make Xmax
= 4/3*b/m, round it off to the next largest whole number and add a few units.
You can
enter the arithmetic opposite Xmax. You might want to press GRAPH
and see if all of the
corner points of the bounded region are on the screen.
Now we will enter the inequality signs:
a) Shading of
the graph is
determined by the symbol to the left of the "Y=" entry. Using
the left
arrow, move the cursor all the way to the left of the Y= symbol.
b) Pressing
ENTER in that position will display different symbols. For < or <,
press ENTER
until the upright triangle is displayed. For > or >, press ENTER
until the upside down
triangle is displayed.
c) After you
have the correct symbol displayed, press ENTER to graph the inequality.
Finding the x and yvalues of
the corner points.
You may find it easier to locate the corner points if you change the
inequalities back to equalities
and press GRAPH to graph only the lines. Write down the values of each
corner point. They
will be used to evaluate the objective function
a) Press 2^{nd}, CALC.
b) Press 5 to select intersect.
c) To
get the corner point at the intersection of the two graphs,
move the cursor a little away from
the intersection and press ENTER to mark the first graph line and move the
cursor to the next
graph line.
d) Move the cursor to a little away from the intersection and
press ENTER to mark the second graph
line and set the cursor to guess the intersection.
e) Move the cursor approximately
to the intersection and press
ENTER.
f) The coordinates for
the point of intersection, x=.5 and y=2.25, will appear at the bottom of the
screen.
g) To
obtain the value where the graph line intersects the xaxis, repeat the
procedure
for
the intersection of two lines except that for the second curve you will need to
insure
that the cursor is on the xaxis. If it is not, press the down arrow. The
answer is x=2, y=0.
h) The
corner point where the graph intersects the yaxis is obtained by pressing 2ND,
CALC,
pressing ENTER to select Value, entering 0 (zero) opposite X, and then
pressing ENTER.
Having the calculator evaluate the objective function.
a) First you need to enter the proper expressions. From the home screen, press .5, STO, X,
ALPHA, :
(decimal point key), 2.25, STO, ALPHA, Y, ALPHA, :, 2, X, +, 5, ALPHA, Y.
You should now
have the following on the home screen: .5→X:2.25→Y:2X+5Y
b) Press ENTER and the corner point will be evaluated at 12.25.
c) To evaluate additional points, press 2nd, ENTER and the above
expression will be displayed.
Enter the new corner point and press ENTER. Repeat this as many times as
needed.
2) Graphical Linear Programming with the
Inequalities Application:
Find the maximum of the objective function z=2x +5y,
subject to the following constraints:
3x+2y≤6 (Eq 1a)
x+2y≤4 (Eq 2a)
x≥0, y≥0
a) First put the twovariable equations in slopeintercept form.
y≤3/2x+3 (Eq 1b)
y≤1/2x+2 (Eq 2b)
b) Enter the right side of those equations opposite Y1 and Y2 respectively and enter 0
opposite Y3.
c) Set the WINDOW at Xmin = 1, Ymin=1, Ymax= the largest value of "b"
plus a few units, say 5 in
this problem.
The value for Xmax is a bit more difficult to anticipate. If there is an equality with
a
negative slope, I usually make Xmax
= 4/3*b/m, round it off to the next largest whole number
and add a few units.
You can enter the arithmetic opposite Xmax. You might want to press GRAPH
and see if all of the corner points of the bounded region are on the screen.
Now we
will enter the inequality signs.
a) Move the cursor to the sign
(either equal or inequality) after Y1. If the inequality symbols do not
appear at the bottom of the screen, you will need to start the Inequality App.
Do that by pressing
APPS, move the cursor
down to Inequal, or Inequalz for the
international version, and press
ENTER, ENTER. The Y= editor screen should be displayed.
b)
Place the cursor on the equal sign opposite Y1 and press ALPHA, F3 (ZOOM).
The equal sign
should have been replaced by the inequality ≤.
c) Do the same for Y2; then opposite Y3, press ALPHA, F5 (GRAPH).
The symbol ≥ should have
replaced the equal sign before the 0.
d) Now, move the cursor up to the "X" in the upper left corner and press
ENTER. With the cursor on the
equal sign opposite X1, press ALPHA, F5 (GRAPH) to enter
≥; then enter a zero after that
symbol.
e) Press GRAPH to draw and shade the graphs.
f) Press ALPHA,
F1, 1 to define the feasible region.
If you only want to graph, you may stop here.
At this time we will find the x and yvalues of the corner points. We
will use a method to have the
calculator determine the corresponding values of the objective
function. If you prefer to calculate the
value
of the objective function by handI actually recommend that. just record the
values as you find them
without pressing STO
in the following procedure so that you can
substitute them into the objective function.
a)
Press ALPHA, F3 (ZOOM). If Y1∩Y2 appears in the upper left of the screen,
the values x=.5, y=2.25 will
be displayed. Record
these values if you choose to evaluate the objective function by hand. Otherwise,
press STO, ENTER.
b)
If Y1∩Y2 appears in the upper part of the screen, press the right arrow to move to the point x=2, y=0 and press
STO,
ENTER or record the values for hand calculation.
c) Press the right arrow; press the down arrow, and then the left arrow
and the last point,
x=2, y=0
should be displayed. Press STO,
ENTER if you want to store the point.
Having the calculator evaluate the objective function. Method I:
a) Press STAT, ENTER, to bring up the lists with the stored data.
b) First we will name the list after list INEQY. We will name it
OBJ. Move the cursor to the name
block at the top of that list. Press 2ND, ALPHA, O, B, J, ENTER.
Now, we will define the list OBJ.
c) With the cursor on the list name, press ALPHA, (the + key),
2, x(multiply), 2ND, LIST
and scroll down to
INEQX and press ENTER.
d) Press +,
5, x (multiply), 2ND, LIST, scroll to INEQY and press ENTER.
Press ALPHA, ". You should now have
"2*└INEQX+5*└INEQY" at the bottom left of the screen after "OBJ=". Press
ENTER and the values
of the objective function for each set of coordinates will be displayed in the OBJ list.
Method II:
Actually, this requires a number of rather tedious strokes. If you don't
want to just do it using the calculation mode, then there's
an easier method.
a) Just write down the x and yvalues as you obtain them, and then enter
them in list L_{1} for x and L_{2} for y.
b) Now, place the cursor over the name for L_{3} and enter the 2, 2nd, L_{1}, +,5,
2nd, _{L}2._{ }
c) Press ENTER and the objective values will be entered in list L_{3}.
III.
Simplex Method:
1. The Simplex Method is described in the LinProg Document
here.
Method of Least Squares to Find the Values “m” and “b” for the BestFit Equation^{
}to Data:
IV. Least Squares Fit:
Let’s assume that we have the data given in the table below, and we want to
draw a scatter plot and a graph of the best fit to the data.
If you want to plot the graph, first plot the (x,y) data points preferably
on crosshatched paper.
Now, we need to find the values of the slope and the yintercept for of the
bestfit line so that we can
place those points on the graph and draw the bestfit line through them. I
will give three methods
below for find the values for “m” and “b.” Successive methods use display
more calculated data.
Check with your instructor about which method will be accepted.
Method I:
In this method, we will use the calculator to find the values for m (listed as
“a” by the calculator) and b (the yintercept) without making any intermediate
calculations.
a) Press STAT, ENTER and enter the xdata in list L_{1} and the ydata
in list L_{2}. If you have old data in the
lists, clear the lists by highlight the list name, for example L_{1}
and press CLEAR, ENTER.
b) Press STAT, move the cursor to CALC and press 4 (for LinReg (ax+b). The
expression LinReg (ax+b)
will appear on the home screen. If you data is in L_{1} and L_{2}
just press ENTER. If for some reason you
put the data in other lists, you will need to enter the names of those
lists separated by a comma after
LinReg (ax+b) and then press ENTER.
c) The entries a=1 and b=.4 will be displayed on the screen. The value for “a”
is the value for “m,” the
slope. The value for r, .87038 is the correlation coefficient, and r^{2
}is the coefficient of determination.
d) Find at least two points using the slope intercept method of graphing, enter
these points on the scatter
plot and draw a straight line through them.
Method
II:
In this method, we will use the calculator to find the values for ∑ x, ∑y, ∑x^{2}
, and ∑xy and then solve a matrix for “m” and “b.”
a) After entering the data as described in item a) above, press STAT, move the
cursor to CALC, and press
2 for 2Var Stats. Then press ENTER.
b) From the display you will find ∑x = 15, ∑x^{2 }=55, move the cursor
down and find ∑y=17, and ∑xy=61.
We now want to solve the following system of equations for “b” and “m”
using the rref( function of
the calculator for matrices.
nb + (∑x)m = ∑y
(∑x)b +(∑x^{2 })m= ∑xy (Where n is the number of
data points, 5.)
Plugging in the numbers that we have found above, we have the following:
5b + 15m = 17
15b + 55m=61
c) To, find “m” and “b.” Press 2^{nd} MATRIX on the calculator to take
you to the matrix editor. Move the
cursor to EDIT and press ENTER. Enter the number 2, and 3 for the size of
the matrix; then enter the
numbers in the matrix. (To enter numbers, just enter the numbers and press
enter.) You should have
5 15 17 in the first row of the matrix and 15 55 61 in
the second row. Press 2^{nd} , QUIT to leave the
matrix editor.
d) Press 2^{nd}, MATRIX, move the cursor to MATH and press ALPHA , then
the letter “B” to paste rref( to
the home screen.
e) Press 2^{nd}, MATRIX, ENTER to paste [A] after rref(. You should
now have rref([A] on the home screen.
Press ENTER to get the following display on the home screen.
[1 0 .4]
[0 1 1]
That means that b=.4 and m = 1.
f) Using these two numbers and the slope intercept method of graphing, enter
these points on the scatter
plot and draw a straight line through them.
Note that there may be an occasion when both b and m are some odd decimal that
makes locating the second point rather difficult. You can always use the (, ). As an example, if m=2.3 and b=1.5 as in one of the
problems in Tan, it is a bit tedious to locate the second point by the
slopeintercept method.
But = ∑x/n = 10/4=2.5 and
=∑y/n =29/4=7.25. So, you have the point (2.5, 7.25) which
may be a bit easier to locate.
Method III:
Suppose that your instructor requires that you complete all of the arithmetic
for the table as listed in your book. This method will reduce the arithmetic
necessary for that table. The table below has all of the calculations
completed.
x (L_{1}) 
y (L_{2}) 
x^{2 }
(L_{3}) 
xy (L_{4}) 
1 
1 
1 
1 
2 
3 
4 
6 
3 
4 
9 
12 
4 
3 
16 
12 
5 
6 
25 
30 
∑x=15 
∑y=17 
∑x^{2}
=55 
∑xy=61 
a) After entering the x and ydata as described in the procedures above make
sure that lists L_{3} and L_{4} are
cleared. Now, move the cursor to highlight the title L_{3}, press
2^{nd}, L_{1, }x^{2}. You should have L_{1}^{2}
at the
bottom left of the screen. Press ENTER and the squared values of x should
be entered in list L_{3}.
b) Now, move the cursor to highlight the title L_{4}, press 2^{nd},
L_{1, }x, 2^{nd}, L_{2}. You should have L_{1}^{*
}L_{2 } at the
bottom left of the screen. Press ENTER and the product of xvalues and
yvalues should appear in list
L_{4}
c) Now, we want to find the summations of the four lists. Press 2^{nd}
, QUIT to exit the list editor and go
to the home screen. Press 2^{nd}, LIST, move the cursor to MATH
and press 5 for sum(.
d) Press 2^{nd}, L_{1} to get sum(L_{1} on the home
screen. Then press ENTER to get 15, the sum of L_{1}.
e) Press 2^{nd }, ENTRY to redisplay the expression and change L_{1}
to L_{2} by placing the cursor on L_{1} and
pressing 2^{nd}, L_{2}. Press ENTER to get 17, the sum of
L_{2}. Continue in this same manner for L_{3} and L_{4 }
.
You will now have the summations as listed in the table above.
f) Substituting those and the value for n, 5, into the system of equations
nb + (∑x)m =
∑y
(∑x)b + (∑x^{2 })m= ∑xy
We have the following:
5b + 15m = 17
15b + 55m=61
g) Using the matrix to find “m” and “b” is the same as Method II above, but I
will repeat it for your
convenience.
h) Press 2^{nd} MATRIX on the calculator to take you to the matrix
editor. Move the cursor to EDIT and
press ENTER. Enter the number 2, and 3 for the size of the matrix; then
enter the numbers in the
matrix. (To enter numbers, just enter the numbers and press enter.) You
should have 5 15 17 in the
first row of the matrix and 15 55 61 in the second row. Press 2^{nd}
, QUIT to leave the matrix editor.
i) Press 2^{nd}, MATRIX, move the cursor to MATH and press ALPHA , then
the letter “B” to paste rref( to
the home screen.
j) Press 2^{nd}, MATRIX, ENTER to paste [A] after rref(. You should
now have rref([A] on the home screen.
Press ENTER to get the following display on the home screen.
[1 0 .4]
[0 1 1]
That means that b=.4 and m = 1.
k) Using these two numbers and the slope intercept method of graphing,
enter these points on the scatter
plot and draw a straight line through them.
Note that there may be occasions when both b and m are some odd decimal
that makes locating the second point rather difficult. You can always use the (, ). As an example, if m=2.3 and b=1.5 as in one of the
problems in Tan, it is a bit tedious to locate the second point by the
slopeintercept method.
But = ∑x/n = 10/4=2.5 and
=∑y/n =29/4=7.25. So, you have the point (2.5, 7.25) which
may be a bit easier to locate.
Another method for entering data in the matrix.
a. After you have set up the matrix as described in Method II, go to the home
screen by pressing 2^{nd}, QUIT.
b. To enter the value 6, for “n,” in the first element of the matrix
press 6, STO, 2^{nd}, MATRIX, ENTER, (1, 1). You
should have 6à[A](1,1)
on the screen. Press ENTER to transfer the value to the matrix.
c. Now, we want to do the summations. First press 2^{nd},
ENTER to display the expression above once more. Place the
cursor on the value 6 and press
2^{nd}, LIST, move the cursor to MATH, and press 5 for sum(. Now we want
to tell
the calculator what we want to
sum. Press 2^{nd}, INS, then press 2^{nd}, L_{1}, ). You
should now have
sum(L_{1})à[A](1,2).
Be sure to notice that the second number for the matrix has changed from 1 to 2.
Press ENTER
to display the value and
transfer it to the matrix.
d. Now, we want to transfer ∑y in the matrix. First press 2^{nd},
ENTER to display the expression above once more.
Edit the expression so
that you have the following; sum(L_{2})à[A](1,3).
Press ENTER to transfer the number to the
matrix.
e. Now, we want to transfer ∑y in the matrix. First press 2^{nd},
ENTER to display the expression above once more.
Edit the expression
so that you have the following; sum(L_{1})à[A](2,1).
Press ENTER to transfer the number to the
matrix.
f. In a similar manner, transfer the second and elements of the second
row as follows:
For the second element the expression will be
edited to give the following; sum(L_{3})à[A](2,2). For
the last element the
expression will be edited as
follows: sum(L_{4})à[A](2,3).
g. Now we want to solve the matrix. Press 2^{nd}, MATRIX, move
the cursor, to MATH and scroll down to rref(.
That’s usually item “B.”
Press ENTER to display rref( on the home screen.
h. Now you want to tell the calculator which matrix you want to solve. To
do that, press 2^{nd}, MATRIX, ENTER if
you have the data in [A].
i. Finally, press ENTER to display the answer
matrix. It should be the following
┌ 1 0 .4ךּ
└
0 1 1
ﻠ
Sorry, my effort at making matrix symbols leaves
a lot to be desired.
Derivation of
Formulas:
This section will not be necessary for most students, but is included for those
who might be interested.
The method of least squares minimizes the
squares of the differences between a line y=mx +b (ax+b in some
discussions) by taking the partial
derivatives and setting them equal to zero. The diagram below shows those
differences.
Figure 1. Diagram for least squares model.
We can write the following equation for these differences.
f(x,y) = ∑_{i=1, }n (mx_{i} +b –y_{i})^{2}
(The summation term means i=1 to n.)
Now, take the partial derivative with respect to m.
∂ (fx,y)
= ∑_{i=1, }n 2(mx_{i }+b –y_{i})^{2} x_{i
}∂m
= ∑_{i=1, }n 2 (x_{i}^{2}_{ }+bx_{i} –y_{i}
x_{i})
2m∑_{i=1, }n x_{i}^{2}_{ }+2b∑_{i=1, }
n bx_{i 2}∑_{i=1, }n y_{i} x_{i} = 0 (Expand
& set = 0 & cancel.)
(∑xi ^{2 })m + (∑x_{i })b = ∑x_{i }y_{i
}(∑x_{i })b +(∑xi ^{2 })m =∑x_{i }y_{i }
(Rearrange the way most texts have it.)
Partial with respect
to b.
f(x,y) = 2∑_{i=1, }n (mx_{i} +b –y_{i})^{2}
∂ (fx,y)
= ∑_{i=1, }n 2(x_{i }+b –y_{i})^{ }(Partial
derivative with respect to b.)
∂b
m∑x_{i} +∑b =∑y_{i
}(∑x_{i}) m+nb = ∑y_{i }(Summation of b from 1 to n=
nb.)
nb +(∑x_{i})m =∑y_{i }(Rearrange the way most texts have it.)
Making it Better: I
would be grateful if you would report any errors or suggestions for improvements
to me. Just click "Email
Webmaster," site the item number, and tell me
your suggested change.
Printing Hint:
Most browsers will send both the navigation bar and the text to
the printer, and, as a result, some printers will cut
off the right edge of this document if the file is printed directly. To prevent this,
you can use landscape, of course. But if you'd like
to get rid of
the navigation panel, highlight the
instructions portion only (not the navigation panel) and check "Selection" on
the
Print dialog box; then click "Apply." This will eliminate the
navigation panel and get all of the instructions on the printed pages.
Some newer printers have a special Web Page function for printing that will
print the page without cutting part of it off.
Copy Restrictions:
You
may make single copies of this document for your own personal use and for the
use of other students, but
inclusion in another document, publication, or any use
for profit requires my permission. Teachers may make multiple copies of
this
document for their students if they first get my permission. Merely send
me an email (Just click on Webmaster in the navigation
bar.) with a onesentence
explanation of what you’re using the document for. I’ll give you permission in
a timely manner.
