35
Chapter 1 Number System and Numerical Calculations Safarzadeh Table of Contents The Number System:............................................. 2 Natural Numbers:..............................................2 Rational Numbers:.............................................2 Irrational Numbers:...........................................2 Real Numbers:.................................................3 Purely Imaginary Numbers:.....................................3 Complex Numbers:..............................................3 Absolute Value of a Real Number:..............................3 The Order of Arithmetic Operations:...........................3 Application in Finance:........................................4 Future Value or Compounding...................................4 Present Value or Discounting..................................6 Net Present Value.............................................7 Internal Rate of Return.......................................7 Mathematical Relations:........................................7 Ordered Pair..................................................7 Variable......................................................8 Coordinate Systems............................................. 8 Rectangular Coordinates.......................................9 Polar Coordinates.............................................9 Presenting the Relationship Using Data.........................9 Table........................................................10 Graph........................................................10 Solution of Equations........................................11

Chapter 1 Number System and Numerical Calculations  · Web viewTo find x, set the sum of the weekly production equal to 1260 and solve for x and solve the equation x (100+ 10( x

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Chapter 1 Number System and Numerical Calculations

Chapter 1 Number System and Numerical Calculations

Safarzadeh

Table of ContentsThe Number System:2Natural Numbers:2Rational Numbers:2Irrational Numbers:2Real Numbers:3Purely Imaginary Numbers:3Complex Numbers:3Absolute Value of a Real Number:3The Order of Arithmetic Operations:3Application in Finance:4Future Value or Compounding4Present Value or Discounting6Net Present Value7Internal Rate of Return7Mathematical Relations:7Ordered Pair7Variable8Coordinate Systems8Rectangular Coordinates9Polar Coordinates9Presenting the Relationship Using Data9Table10Graph10Solution of Equations11Application in Finance14Internal Rate of Return14Perpetuity15Logarithm16Logarithmic Transformation17Conversion of Logarithm Base17Application in Finance19Converting Price to Return19Compounding22Growth23Progression25Arithmetic Progression25Geometric Progression26

The Number System:

A number in general form can be written as a + bi, where a and b are real numbers, b 0, and i is the imaginary unit having the property A Number in this form is called a complex number. Furthermore, a is the real part of the number and bi is the imaginary part. The following are some concepts and definitions in number systems:

Natural Numbers:

A natural number is a whole number used in counting objects. Numbers such as 5, 2, and 10 are examples of natural numbers. These numbers are also called positive integers.

Rational Numbers:

A rational number is a ratio of two integers, positive or negative. A rational number, often called a fraction, may qualify as integer, such as Therefore, all integers are considered to be rational numbers, but not all rational numbers are integers. Zero is considered a rational number.

Irrational Numbers:

Some numbers cannot be written as the ratio of two integers. Such numbers have infinite decimal expansions which are non-repeating. For example , = 3.1415…., and Some fractions, like , also have infinite decimal expansion. However, the difference between the two types is that the decimal expansions for rational numbers are repeating, like the sequence of 6 in 1666. Whereas, decimal expansions for irrational numbers are non-repeating.

Real Numbers:

Natural numbers, rational numbers, and irrational numbers taken together constitute the real number system.

Purely Imaginary Numbers:

For the equation , or any equation in the form , where k > 0, there is no real number that will satisfy the equation. Therefore, the solution of is For the solution is where the solutions are purely imaginary numbers.

Complex Numbers:

The real numbers and the imaginary numbers together form the complex number system.

Absolute Value of a Real Number:

The absolute value of a real number x, denoted by |x|, is equal to x if x > 0 and is equal to -x if x < 0. The absolute value of a number shows the magnitude, but it does not indicate whether the number is positive or negative.

The Order of Arithmetic Operations:

The order of arithmetic operations in R is similar to that of a calculator. It operates first on exponent (^ ), then on division (/), followed by multiplication (*), and finally addition (+) and subtraction (-). Anytime in doubt, it is highly advisable to use as many parentheses as needed, or as many parentheses as you like to make the operation clear. For example, a command such as 25^3/2 will raise 25 to the power of 3 and will divide the results by 2. However, if the intention was to have 25 raised to the power , , the command should read as 25^(3/2).

: Do the following arithmetic operations:

#Numerical Calculation:10+3^5; 3^4; 236/12;

## [1] 253

## [1] 81

## [1] 19.66667

#Using parentheses to make the calculation clear 25^3/2

## [1] 7812.5

25^(3/2)

## [1] 125

: Find the numerical value of .

#Numerical Calculation:sqrt((124/35)*(13/5)+45^(1/3))

## [1] 3.573279

: For the imaginary unit i = , find the values of (2 + 3i)(2 - 3i), (2 + 3i)(3 + 4i), and .

#Complex Number:x <- complex(real=2, imaginary = 3)y <- complex(real=2, imaginary = -3)z <- complex(real=3, imaginary = 4)x*y

## [1] 13+0i

x*z

## [1] -6+17i

x^8

## [1] -239+28560i

Application in Finance:Future Value or Compounding

For discrete compounding, the formula is , where S is the compounded value, A is the initial investment, r is the interest rate, n is the frequency with which the interest is compounded a year, and t is the number of years. If the interest is compounded continuously, the compounding formula is .

: Find the compounded value of $100 deposited at a rate of 6% for 5 years, if the interest is compounded annually, quarterly, monthly, daily, or continuously. Solution:

#Compounding annually:S=100*(1+.06)^5S

## [1] 133.8226

#Compounding quarterly:S=100*(1+.06/4)^(4*5)S

## [1] 134.6855

#Compounding monthly:S=100*(1+.06/12)^(5*12)S

## [1] 134.885

#Compounding daily:S=100*(1+.06/365)^(5*365)S

## [1] 134.9826

#Compounding Continuously:S=100*exp(1)^(.06*5)S

## [1] 134.9859

You may formulate the problem as a function in R where the frequency of interest is a parameter that can be changed based on the given assumptions. For annual compounding, set n = 1. For monthly compounding, set n = 12 and so on. For a continuous compounding you may set n to a very large number, say n=10000.

#Functional Form of the Compounding Formula:#Compounding $a at interest rate r incurring with frequency n a year, for t years.s <- function(a, r, n, t) a*(1+r/n)^(n*t)s(100, .06, 1, 5)

## [1] 133.8226

s(100, .06, 4, 5)

## [1] 134.6855

s(100, .06, 12, 5)

## [1] 134.885

s(100, .06, 365, 5)

## [1] 134.9826

Do More Practice: 1- In the future value model above assume that t = 1, the initial investment is $100 and the interest rate is compounded annualy. Change the interest rate r to 7%, 8%, 9%, and 10%. Run the program and record the corresponding values of S. Graph the relationship between S and r. What is the relationship between the two variables?

2- Find the compounded value of $1000 deposited at an annual rate of 6% after 10 years if: a- the interest is compounded annually. b- the interest is compounded quarterly. c- the interest is compounded monthly. d- the interest is compounded daily. e- the interest is compounded continuously (you may set n as a very large number as, n = 10000).

Present Value or Discounting

A dollar to be earned in the future has less value today as it should be discouted to today’s value using the discount rate (r). That is, the present value (PV) of a dollar earned a year from today is . The present value of a dollar earned t years from today is . In general, the present value of n annual returns to be earned in the next n years is + + + …… + .

: An investment is expected to have a return of $22000 at the end of the first year, $28500 at the end of the second year, $32000, at the end of the third year, $18000 at the end of the fourth year, and $12000 at the end of the fifth year. At the end of the fifth year the business is expected to have a market value (MV) of $52000. What is the present value of the future returns if the interest rate is 6%?

#Present Value of the returns for the next 5 years:PV <- 22000/1.06+ 28500/1.06^2+ 32000/1.06^3+ 18000/1.06^4+ 12000/1.06^5 PV

## [1] 96212.22

#Present Value of the market price of the business at the end year:PV_MV <- 52000/1.06^5#The Present Value of the investment (PVI):PVI <- PV + PV_MVPVI

## [1] 135069.6

You may also formulate the problem as a function in R where the number of years (n) is a parameter that can be changed based on the given assumptions.

#Functional Form of the Discounting Formula:R <- c(22000, 28500, 32000,18000, 12000)pv <- function(R, r) sum(R/(1+r)^(1:length(R)))pv(R, .06)

## [1] 96212.22

PV_MV <- 52000/1.06^5PVI <- pv(R, .06) + PV_MVPVI

## [1] 135069.6

Net Present Value

Net present value, NPV, is the difference between the value of the initial investment, Io and the present value of investment, PVI. If NPV > 0, the investment is profitable. If NPV < 0, the investment will have a loss. When NPV = 0, the business is breaking even. For the present value example above, let’s assume that the initial investement was Io = $120000. With a discount rate of 6% the net present value will be 135069.60 - 120000 = 15069.60.

Internal Rate of Return

Internal rate of return is the discount rate at which the business breaks even or the net present value equals to zero, NPV = 0. To find the internal rate of return (IRR) find the zeroes of the break-even equation Io = PV. For the present value problem above the internal rate of return can be calculated as: 120000 - ( + + + + ) = 0. The numerator of the year (64000) is the sum of the market value of the business at the ened of year plus the year’s return of $12000. By setting = x. The NPV equation can be written as: 120000 - (. Solve the polynomial equation for x. Then, = , or .

#Internal Rate of Return:x <- polyroot(c(120000, -74000, -28500, -32000, -18000, -64000))#The only real root is 0.7937304. Therefore,r <- as.numeric(1/x - 1)

## Warning: imaginary parts discarded in coercion

r

## [1] -0.7046095 -1.6169939 0.2598736 -1.6169939 -0.7046095

Mathematical Relations:

Before discussing mathematical relations, three concepts which will be used frequently in this section and later chapters will be introduced.

Ordered Pair

An ordered pair of numbers (x, y) is a set containing two elements, one of which (x) precedes the other (y). The element x is called the first coordinate, and the element y the second coordinate. The pair (x, y) is said to be “ordered” because the order in which the numbers appear is of significance. The pairs (5, 8) and (8,5) are different ordered pairs.

Variable

A variable is a symbol that may represent any member of a particular set and may take on different values.

: Suppose that monthly observations on income and consumption of an individual are given as,

#Income and spending as two varaiables:income <- c(2300, 2500, 1800, 2000, 1500, 2200) spending <- c(2040, 2350, 1740, 1850, 1450, 1960)#Income and spending paired together as two columns of datadata <- data.frame(income, spending)data

## income spending## 1 2300 2040## 2 2500 2350## 3 1800 1740## 4 2000 1850## 5 1500 1450## 6 2200 1960

Coordinate Systems

Geometrically, real numbers can be represented as points on a straight line. It is customary to draw this line horizontally and associate an arbitrary point on it with the integer zero. Points to the right of the zero point will represent positive numbers and points to the left will represent negative numbers. Such a line is called the x-axis and the point corresponding to zero is called the origin. The portion of the line to the right of zero is called the positive axis and the portion to the left of origin is called the negative axis. To present ordered pairs geometrically, draw a line perpendicular to the x-axis at the origin and call the line the y-axis. It is customary to draw the positive y-axis above the origin, and to draw the negative y-axis below the origin. The plane determined by the x- and y-axes is called the xy-plane,

plot(data, main = "x-y Plane and Income-Spending Relation")

Rectangular Coordinates

Given an ordered pair of real numbers (x, y), we can associate this pair with a point (x, y) on the x-y plane. Rectangular coordinates use the distance from the origin on x and y axes to locate a point on the coordinate system.

Polar Coordinates

Another way to locate a point on the coordinate system is to use polar coordinates. The polar coordinates use a distance from a reference point, say origin, and an angle to describe locations. In polar coordinates, 0 is along a horizontal ray to the right of the reference point and angles are measured counterclockwise. Polar coordinates are written as ordered pairs where is the polar distance or radius and is the measure of the polar angle.

Presenting the Relationship Using Data

A relationship between two variables can be expressed in three forms: Table, Graph, and Function.

Table

A relation here is defined as any set of ordered pairs (x, y), where x and y are real numbers.

Example: The relationship between income (x) and spending (y) may be studied by listing of data and observing the relation.

2300 20402500 23501800 17402000 18501500 14502200 1960

Graph

The same information may be derived through plotting the paired observations on the coordinate system as shown in the income-spending graph above.

##Function Function is a mathematical presentation of the relationship between two or more variables. A functional relationship between two variables can be expressed as . See chapter 2 for more about functions.

#EquationsAn equation is a statement of equality between two or more variables. The relationship between two or more variables may be studied by fitting an equation to the observed data and studying the mathematical relationship between the two variables. For example, for the income-consumption data above, we can fit an equation of a straight line. Fitting equations to data will be studied in Chapter 6. Here, assuming that such equation is estimated as C = 219 + 0.82Y, the plot of the points and the equation are shown in the following graph.

#Income-Spending equation of line fitted to data;plot(income,spending, main="Income Spending Plot and Fitted Line")abline(lm(spending~income))

Solution of Equations

The solution of an equation in variable x is a set of numbers or objects that satisfies the equation.

: Solve Solution: Set and solve for x. The solution is x = or . : Quadratic Equations: Solve the quadratic equation . Solution: The general form of quadratic equation is , the solution of which is . Using the values of the parameters a, b, and c from the given equation the x values are 2 and -4. Using R code polyroot,the problem is solved as:

#Solving Polynomial Equations in R:polyroot(c(-8, 2, 1))

## [1] 2-0i -4+0i

: Find the solution set of the polynomial function . Solution: To solve a cubic equation or any polynomial equation of higher order for its zeros, use the graph of the equation to find an approximation to zeroes of the equation. Zeroes of an equation are the x-intercept of the equation. Alternatively, you may set arbitrary values for x to find an approximate value for x. For example, for the given cubic function, if x = 0, the value of the equation is -4. If x = 2, the value of the equation is +8. Therefore, the x-value that will make equation equal to zero lies between zero and two. By assigning x some values in this range we find that x = 1. This is only one of the solutions. Since the equation is a cubic equation, there should be two more solutions. To find the other two solutions, divide by (x - 1) to get . The solution of is . Using R the graph is shown below and the range of x is approximated around x = 1:

#Graph of the cubic equation.curve(x^3-x^2+4*x-4, -10, 10); abline(h = 0)

#Use polyroot command to find the rootspolyroot(c(-4, 4, -1, 1))

## [1] 1-0i 0+2i 0-2i

From the polyroot solution, the eqution has one real root at x = 1 and two imaginary roots of 2i and -2i.

Do More Practice: Find the solution of the following equations. a) b) c) d) e)

: Find the solution set of |x+3| = 4. Solution: If x > -3, |x + 3| = x + 3. If x <3, |x + 3| = -(x + 3). Therefore, |x + 3| = 4 give rise to two equations, x + 3 = 4 and -x - 3 = 4, the solutions of which are x = 1 and -7. Using R the solution is:

#Graph the function to estimate the roots of the function.f <- function(x) abs(x+3) - 4curve(f, c(-8, 8)); abline(h=0)

#Find the roots.uniroot(f, c(-8, 0))

## $root## [1] -7## ## $f.root## [1] 0## ## $iter## [1] 2## ## $init.it## [1] NA## ## $estim.prec## [1] 3

uniroot(f, c(0, 8))

## $root## [1] 1## ## $f.root## [1] 0## ## $iter## [1] 1## ## $init.it## [1] NA## ## $estim.prec## [1] 7

Application in FinanceInternal Rate of Return

Internal rate of return is the break-even discount rate for an investment. It is the rate at which the present value of the net future cash flow equals to the amount invested. That is, + ….. , where is the initial investment, is the return at the end of the year t, and r is the discount rate.

: Suppose a 24,000 initial investment has annual returns of 4,500 for five years and a scrap value of 2,500 at the end of the fifth year. The internal rate of return on the investment is calculated by setting the present value of the future returns equal to the value of investment . Therefore, formulate the problem as: 24000 = ( + + + + ) and solve for r. Since the highest power of the polynomial equation is five, there will be five solutions to the equation. However, only one of the solutions is acceptable. Using R,

#Internal rate of return:polyroot(c(24000, -4500, -4500, -4500, -4500, -7000))

## [1] 0.3240848+1.303978i -1.1391481+0.791142i -1.1391481-0.791142i## [4] 0.9872694-0.000000i 0.3240848-1.303978i

1/.9872694 - 1

## [1] 0.01289476

Do More Practice: 1- Change the initial investment in the preceding example to $25000, $26000, $27000, $28000, $29000, and $30000, and find the corresponding IRRs. Graph the relationship between the initial investments and the IRRs and comment on the relationship between the two variables.

: Investment and Growth Suppose an initial investment of 10000 has a net return of 1000 at the end of first year and an expected future returns with an annual growth rate of 10% in the coming years. What is the net present value of the investment after 5 years, 10 years, 15 years, and 20 years if the discount rate is 6%? After how many years will the firm break even? Solution: Assuming the initial investment Io, the first year return R1, the growth rate g, and the discount rate r, the problem can be formulated as: for i = 1:n.

#Investment growthf <- function(n) sum(1000*(1.1)^1:n/(1.06)^1:n) - 10000f(5)

## [1] -5919.923

f(10)

## [1] -890.3733

f(15)

## [1] 4126.444

f(20)

## [1] 9138.249

#NPV at n = 11 is:f(11)

## [1] 113.6029

At n = 11, the net present value is positive and the investment is profitable.

Do More Practice: 1- Change the initial investment in the preceding example to $12000, $14000, and $16000. Find the corresponding number of years that the business needs to break-even.2- What growth rate is needed for the firm to break-even in 5 years, if the discount rate is 6%?

Perpetuity

A Perpetuity is a security that yields a constant stream of identical cash payments forever. The value of the perpetuity is decided by the sum present value of the stream of payments for infinite number of years. That is, as t -> . The price of the perpetuity . Here, R is the constant annual payments and r is the discount factor.

: A perpetuity yields a constant annual payments of $100 forever. What is the present value of the perpetuity if the discount rate is 5%? Solution: P = 100/.05 = 2000.

#Perpetuity and time: Find the value of f(t) for t = 10, 20, 30 qnd 100.f <- function(t) sum(100/(1.05)^1:t)f(10)

## [1] 275.4842

f(100)

## [1] 509.8509

f(1000)

## [1] 740.515

f(10000)

## [1] 970.814

f(100000)

## [1] 1201.077

f(1000000)

## [1] 1431.336

f(10000000)

## [1] 1661.594

f(100000000)

## [1] 1891.853

As t -> , the present value of approaches to .

Logarithm

Definition: Let , b > 0. We define the exponent x as the logarithm of y to the base b and write it as . Expressions and are equivalent. The logarithms of numbers to the base 10 are called common logarithms, and are denoted by log. The logarithms of numbers to the base e, the natural number, is called natural logarithm and is usually denoted by ln. Logarithms are one of the basic tools for linearizing (log-linearizing) non-linear relationships. This property of logarithms is used frequently in economic models, data analysis, and econometrics. Note that if the base of the logarithm is not defined most statistical programs take “log” as the natural logarithm.

Logarithmic Transformation

One of the most important properties of the logarithm, which has many applications in statistics, is transforming non-linear relation to log-linear relation. Take two variables x and y and let . Then, . That is, applying logrithm to z, which a nonlinear variable in terms of x and y, converts z to a log-linear relation in terms of logx and logy. The relation will hold no matter what the base of the logarithm is. Now, let’s assume w = x/y, applying log to w will convert the nonlinear relation to linear relation, logw = logx - logy. The transformation can be applied to exponents also. Let’s assume . Applying log to v converts v to a log-linear relation, , where m is a constant number.

Conversion of Logarithm Base

In some mathematical operations there maybe a need for conversion of logarithm base. Suppose you need to transform to . This is done by .Inversion of Logarithm Base: . The conversion and inversion rules can be easily proved using the definition of logarithm.

: Find the logarithm of 356 to the base 2, 10, and e. Solution: Using R the values can be found as:

#Lograrithmlog2(356)

## [1] 8.475733

log10(356)

## [1] 2.55145

log(356)

## [1] 5.874931

: The relationship between the labor input (L) and the quantity of output (Q) is given as: L: 1, 2, 3, 4, 5, 6 7 8 9 10 Q: 2, 7, 15, 29, 42, 51 57 62 64 62 a- Make a list of inputs and outputs and graph the relation. b- Make a list of the natural log values of paired inputs and outputs and plot it. c- Compare the two plots.

L <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)Q <- c(2, 7, 15, 29, 42, 51, 57, 62, 64, 62)data <- cbind(L, Q)plot(L, Q, type="l", main="Plot of Labor Input and Output")

lL <- log(L)lQ <- log(Q)plot(lL, lQ, type="l", main="Plot of the Logarithmic Values of Labor Input and Output")

Solution: Although logarithmic transformations smooth the graph of the relationship between the two variables to some extent, it does not change the relation betwen the two variables. The two plots will look similar. However, the scales of the two plots are different and the logarithmic plot looks smoother than the other one.

Application in FinanceConverting Price to Return

Historical prices (P) of an asset can be converted to returns (r) using either discrete or logarithmic formulas. Using discrete formula, . Using logarithmitc method r = . In practice the use of the method depends on the frequency of data. For high frequency data such as daily or weekly data the common practice is the use of logarithmic method. For annual data, the use of discrete method is more common.

: Download daily data for S&P500 for the period January 2nd to current, convert the index to return and graph S&P500 and return to S&P500.

#Install quantmod package:#install.packages("quantmod", repos = "https://cran.rstudio.com")library("quantmod")

## Loading required package: xts

## Loading required package: zoo

## ## Attaching package: 'zoo'

## The following objects are masked from 'package:base':## ## as.Date, as.Date.numeric

## Registered S3 method overwritten by 'xts':## method from## as.zoo.xts zoo

## Loading required package: TTR

## Registered S3 method overwritten by 'quantmod':## method from## as.zoo.data.frame zoo

## Version 0.4-0 included new data defaults. See ?getSymbols.

# Download Datastart_date = "2014-01-01"end_date = "2018-12-31"getSymbols("^GSPC", start_date = "2014-01-01")

## 'getSymbols' currently uses auto.assign=TRUE by default, but will## use auto.assign=FALSE in 0.5-0. You will still be able to use## 'loadSymbols' to automatically load data. getOption("getSymbols.env")## and getOption("getSymbols.auto.assign") will still be checked for## alternate defaults.## ## This message is shown once per session and may be disabled by setting ## options("getSymbols.warning4.0"=FALSE). See ?getSymbols for details.

## [1] "^GSPC"

#Check few rows of the downloaded datahead(GSPC)

## GSPC.Open GSPC.High GSPC.Low GSPC.Close GSPC.Volume## 2007-01-03 1418.03 1429.42 1407.86 1416.60 3429160000## 2007-01-04 1416.60 1421.84 1408.43 1418.34 3004460000## 2007-01-05 1418.34 1418.34 1405.75 1409.71 2919400000## 2007-01-08 1409.26 1414.98 1403.97 1412.84 2763340000## 2007-01-09 1412.84 1415.61 1405.42 1412.11 3038380000## 2007-01-10 1408.70 1415.99 1405.32 1414.85 2764660000## GSPC.Adjusted## 2007-01-03 1416.60## 2007-01-04 1418.34## 2007-01-05 1409.71## 2007-01-08 1412.84## 2007-01-09 1412.11## 2007-01-10 1414.85

#Select the Adjusted Price as the column of interest and call it spsp <- GSPC$GSPC.Adjustedhead(sp)

## GSPC.Adjusted## 2007-01-03 1416.60## 2007-01-04 1418.34## 2007-01-05 1409.71## 2007-01-08 1412.84## 2007-01-09 1412.11## 2007-01-10 1414.85

#Plot spplot(sp, main="S&P500 Index")

#Convert sp index to return to sprsp <- diff(log(sp))head(rsp)

## GSPC.Adjusted## 2007-01-03 NA## 2007-01-04 0.0012275323## 2007-01-05 -0.0061031679## 2007-01-08 0.0022178572## 2007-01-09 -0.0005168099## 2007-01-10 0.0019384723

#Plot return to spplot(rsp, main="Retutn to S&P500")

Compounding

How long does it take to double the initial value of an investment if the interest rate is 8%. Solution: Using the annual compounding formula , where S is the compounded value, A is the initial value, r is the interest rate and t is the time. The doubling of the initial investment renders . Therefore, solve for t in the equation by taking the log as or or 9 years and two days. Using R:

#Doubling Savingt <- log(2)/log(1.08)t

## [1] 9.006468

.006468*365

## [1] 2.36082

Do More Practice: 1- How long does it take to double the initial value of an investment if the interest rate is 16%.2- How long does it take to quadruple the initial value of an investment if the interest rate is 8%.

Growth

Show that if y grows exponentially at the rate of 20% from an initial value of 10, the natural log of y, logy, will grow at a constant rate along a line with a slope of .20. List the values of y and logy for t = 1 to 10 and plot the numbers. Compare the two graphs. Solution: . The natural log of y, lny = ln10 + .20t. That is lny will change along a straight line with a slope of .20. To find the points for ploting, make a table of y and lny values for t = 0 to 10. You may use R to graph the relarions as:

#Graphs of y and log(y):t <- 1:10y <- 10*exp(.20*t)plot(t, y, type= "l", main="Graph of t and y")

plot(t, log(y), type="l", main="Graph of log(y)")

ProgressionArithmetic Progression

Arithmetic progression is a sequence of numbers, each of which differs from its preceding number by a factor of constant. The constant number is called the common difference. For example, the following sequence of numbers

a, a + d, a + 2d, .............., a + (n-1)d

is a progression with an initial value of a and common difference of d. In Business and Economics we are most concerned with the sum of a progression or with the nth element of the progression. The nth element of the arithmetic progression is and the sum is .

: List 20 elements of an arithmetic progression with an initial value of 4 and a common factor of 12. Find the 10th element and the sum of the first twenty elements. Solution: The numbers in the table follow the arithmetic progression rule which produces a table as t = c(4, 16, 28, …..). To find the 10th element and the sum, use the two formulas above. The 10th element of the progression is and the sum of 20 elements is = 2360. Using R:

#Arithmetic Progression:n <- 1:20f <- function(a, d, n) a + (n - 1)*dt <- c(f(4, 12, n))t

## [1] 4 16 28 40 52 64 76 88 100 112 124 136 148 160 172 184 196## [18] 208 220 232

t[9]

## [1] 100

n <- 0:19s <- sum(f(4, 12, n))s

## [1] 2120

: A firm producing an initial output of 100 units can increase output by 10 units a week. The management is interested in knowing how many weeks it takes to achieve an output level of 1260 units. Solution: The increase in output follows an arithmetic progression with an initial value of 100 and a common increment factor of 10 units. That is, the ith week’s production is , the sum of which over an unknown period x should be 1260. To find x, set the sum of the weekly production equal to 1260 and solve for x and solve the equation for x. This gives x = 9 and x = -28, where only x = 9 is an acceptable solution.Note that, as in the previous example i counts from 0 to x-1 and not 0 to x.

Geometric Progression

Geometric Progression is a sequence of numbers, each of which is obtained by multiplying the preceding term by a constant factor. The constant factor is called the common ratio. For example, the following numbers a, , , , …….,

form n-element geometric progression with an initial value of “a” and a common ratio of r. The nth element of the geometric progression is , and the sum is .

: List 20 elements of a geometric progression with an initial value of 5 and a common ratio of 2. Find the 10th element and the sum of the first twenty elements. Solution: Using the geometric progression rule, the table of elements is t = c(5, 10, 20, ……). Using the two formulas above, the 10^th element is , and the sum is .

#Geometric Progressionn <- 1:20f <- function(a, r, n) a*r^(n-1)t <- c(f(5, 2, n))t

## [1] 5 10 20 40 80 160 320 640## [9] 1280 2560 5120 10240 20480 40960 81920 163840## [17] 327680 655360 1310720 2621440

t[10]

## [1] 2560

n <- 1:10s <- sum(f(5, 2, n))s

## [1] 5115

: Macroeconomics Spending Multiplier Effect: In a two-sector, simple Keynesian macro-model of the economy with a consumption function of , investment spending , government spending , and income identity , every one dollar increase in , I, or G will increase Y by the following amounts over time periods, Time Period: 1, 2, 3, …………………, n Increase in Y: 1, b, , ………,

1. Find the total increase in Y after n periods.

1. Find the long-run effect of $1 spending in the economy. Solution: The progression is a geometric progression with an initial value of 1 and a common ratio of b. Using the sum formula for n years, . In the long-run, approaches zero as b, the marginal propensity to consume (MPC) is less than one, . Therefore, the long-run effect of one dollar spending in the econeomy will be .

Excercises:

1. Future Value Problem: Find the compounded value of $100 deposited at a rate of 6% for 5 years, if the interest is compounded annually, quarterly, monthly, daily and continuously.

1. Present Value Problem: An investment is expected to have a return of $22000 at the end of the first year, $28500 at the end of the second year, $32000, at the end of the third year, $18000 at the end of the fourth year, and $12000 at the end of the fifth year. At the end of the fifth year the business is expected to have a market value of $52000. What is the present value of the future returns if the interest rate is 6%? What is the present value of the investment?

1. Net Present Value Problem: Net present value, NPV is the difference between the value of the initial investment, Io and the present value of investment, PVI. If NPV > 0, the investment is profitable. If NPV < 0, the investment will have a loss. Suppose an investment is expected to have returns of $22000, $28500, $32000, $18000, and $12000 at the end of each year for the next five years. At the end of the fifth year, the business is expected to have a market value of MV = $52000. Given that the initial investment is $120000, what is the net present value of the investment if the discount rate is 6%?

1. Perpetuity: A Perpetuity is a security that yields a stream of annual payments at an annual rate of r forever. The value of the perpetuities is decided by the sum of the present value of the stream of payments for infinite number of years. That is, PV = sum(R/(1+r)t) when t =. Here, R is the annual payments and r is the discount factor. Suppose a perpetuity yields an annual payments of $1 forever. What is the present value of the perpetuity if discount rate is 5%?

1. Internal Rate of Return: Internal rate of return is the interest rate at which NPV = 0 or PVI = Io.

1. For the present value problem in question 4 find the internal rate of return.

1. Find the rate of return on a $24,000 investment with an annual return of $4,500 for five years and a scrap value of $2,500 at the end of the fifth year.

1. Solve the following equations:

1.

1.

1.

1.

1. Find the 10th and 20th terms of the following progressions a) 4, 7, 10, …………..b) 1, , ……… c) 3, , 4, ………. d) Find the sum of the first thirty terms of the progressions in problem 1.

1. Find the 10th and the 20th terms of the following geometric progressions a) 3, 9, 27, ………..b) 3, 1, , ……….. c) 9, 6, 4, ……….. 9) Find the sum of the first 3, 5, and 10 terms of the geometric progressions in problem 3.

1. What will be the total savings of a person 10 years from now if she deposits $100 at an annually compounded interest rate of 10% a year. How long does it take to double a principal of any amount at that rate?6- In a simple macro model of an economy C = 100 + .8Y, I = 200, and Y = C + I.a- Assume that investment (I) increases by $100. What is the effect on Y after 2 years, 5 years, and 10 years? What is final effect on Y?