7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 1/202
i
ECON 1202 & ECON 2291
Quantitative Analysis forBusiness and Economics
Lecture Book
2013
x
y
z
f x(x0, y0)
School of Economics
The University of NSW
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 2/202
ii
Based on Quantitative Methods A: Lecture Book , first edition written andproduced by Simon Angus, School of Economics, University of NSW,February–May 2006.
Revisions and additional materials prepared by Christopher Bidner,Loretti Isabella Dobrescu, Kevin Fox and Judith Watson.
Typeset in LATEX 2ε, a document preparation language, using typefaceComputer Modern. Significant packages supporting this document in-clude beamer and pstricks.
c 2010 by the School of Economics, UNSW; Sydney, Australia. All rightsreserved. No part of this document may be reproduced, stored in a re-trieval system, or transmitted in any form or by any means, electronic,mechanical, photocopying, recording, or otherwise, without written per-
mission from the School.
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 3/202
Contents
1 Introducing QABE 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Learning in QABE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Miscellany . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Functions of One Variable . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 What is a Function? . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.6 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.7 Special Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2 Time Value of Money 15
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 A Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3 Option 1: Simple Interest . . . . . . . . . . . . . . . . . . . . . . . . 162.4 Option 2: Compound Interest . . . . . . . . . . . . . . . . . . . . . . 17
2.5 Option 3: Continuously Compounded Interest . . . . . . . . . . . . . 19
2.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.7 Present Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3 Evaluating Time-Money Choices 23
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2 Equations of value . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.3 Net Present Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.4 Internal Rate of Return . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4 Geometric Progressions and Annuities 314.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.2 Geometric Progressions . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.3 Annuities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.4 Annuities Due . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5 Matrices I: Maths by Arrangement 395.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.2 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.3 Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425.4 Matrix Multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . 44
iii
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 4/202
iv CONTENTS
6 Matrices II: The Inverse & Determinant in Small Matrices 47
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.2 The Inverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.3 Determinant Excursus . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.4 The Inverse Really . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516.5 On Linear Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7 Matrices III: Matrix Algebra & Automatic-Matrices! 55
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
7.2 More on Matrix Algebra . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.3 Matrices on Computers . . . . . . . . . . . . . . . . . . . . . . . . . 58
8 Probability I: Permutations and Combinations 61
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
8.2 Why Counting? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
8.3 Basic Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638.4 Permutations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
8.5 Combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
8.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
9 Probability II: Probability in action 69
9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
9.2 Probability Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
9.3 Rules of Probability . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
9.4 Bayes’ Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
10 Markov Chains 7710.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
10.2 The Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
10.3 Transitions, Regularity and States . . . . . . . . . . . . . . . . . . . 79
10.4 Markov Chains in Game Theory . . . . . . . . . . . . . . . . . . . . 84
11 Linear Programming I: Solving problems in a world of constraints 87
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
11.2 The Business Headache . . . . . . . . . . . . . . . . . . . . . . . . . 88
11.3 Introduction to Linear programming . . . . . . . . . . . . . . . . . . 88
11.4 Linear Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
12 Linear Programming II: Dealing with a Changing World 97
12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
12.2 Linear programming usual suspects . . . . . . . . . . . . . . . . . . . 97
12.3 Variations in the LP problem . . . . . . . . . . . . . . . . . . . . . . 98
13 Linear Programming III: Using Solver 105
13.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
13.2 The Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
13.3 Using Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
13.4 Changing the Objective Function: Multiple Solutions . . . . . . . . . 11313.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 5/202
CONTENTS
14 Differentiation: Responding to Change 11714.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11714.2 L imits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11714.3 Rates of change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
14.4 Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
15 Differentiation II: Tricks and Extensions 12715.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12715.2 Implicit Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . 12815.3 Logs and Exponentials . . . . . . . . . . . . . . . . . . . . . . . . . . 13015.4 Higher Order Derivatives . . . . . . . . . . . . . . . . . . . . . . . . 13215.5 Elasticity of Demand . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
16 Differentiation III: Optimization in one Variable 13516.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13516.2 Extrema of Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 13616.3 Applied to the Problem . . . . . . . . . . . . . . . . . . . . . . . . . 141
17 Integral Calculus: Unlocking Economic Dynamics 14317.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14317.2 Why Integration? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14417.3 The Indefinite Integral . . . . . . . . . . . . . . . . . . . . . . . . . . 14517.4 The Definite Integral . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
18 Differential Equations & Growth I 15118.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15118.2 Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . 152
18.3 Topics in Growth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
19 Differential Equations & Growth II 15919.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15919.2 Limited Growth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16019.3 Logistic Growth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16219.4 Appendix: An Integration Workout . . . . . . . . . . . . . . . . . . . 166
20 Multivariable Calculus: The Partial Derivative 16720.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16720.2 Functions of two-variables . . . . . . . . . . . . . . . . . . . . . . . . 168
20.3 The Partial Derivative Method . . . . . . . . . . . . . . . . . . . . . 17120.4 Methods of Partial Differentiation . . . . . . . . . . . . . . . . . . . 173
21 Multi-variable Optimisation 17721.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17721.2 Unconstrained optimisation . . . . . . . . . . . . . . . . . . . . . . . 17721.3 Constrained optimisation . . . . . . . . . . . . . . . . . . . . . . . . 182
22 Applications of Constrained Optimisation 18722.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18722.2 Economic Applications . . . . . . . . . . . . . . . . . . . . . . . . . . 18822.3 Interpreting Lagrange Multipliers . . . . . . . . . . . . . . . . . . . . 19322.4 The Power of the Method: A Preview . . . . . . . . . . . . . . . . . 195
v
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 6/202
CONTENTS
vi
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 7/202
Lecture1Introducing QABE
1.1 Introduction
Welcome to Quantitative Analysis for Business and Economics (QABE). QABEdeals with the fundamentals of mathematics for business and economics. It replacesthe old course Quantitative Methods A, and reflects our goal of continual courseimprovement. For those of you who have studied QMA in the past, there are simi-larities but also differences between the two courses.
You may be wondering if all the material taught in QABE will be applicable toyou. The short answer is that all of it will be applicable, but not always immediately.That is, the course material has been chosen to reflect the core mathematical skillsthat you will need for further study in the quantitative courses, particularly those
taught by the School of Economics. We have students studying marketing andhospitality, through to economics and econometrics. The spectrum of disciplinesrequires a range of mathematical tools. For this reason, we will try to point toapplications of our mathematics for your further studies wherever possible, drawingon business and economic scenarios and problems to bring out the relevance of thetechniques we’ll be learning.
Finally, so that we can keep this course improving all the time, we’d appreciateyour feedback. So if you have an idea for an improvement, please send an email tothe lecturer-in-charge to let us know.
All the best with your studies. We hope that you enjoy the course!
Agenda
1. Introductions;
2. How do I learn in QABE?;
3. Assessment;
4. Futher help;
5. A few notes on studying at university;
6. Functions of one variable.
1
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 8/202
LECTURE 1. INTRODUCING QABE
Introductions
1. Who is your lecturer?
2. Who is the lecturer-in-charge?
3. Who is your tutor?
1.2 Learning in QABE
An overview
Understanding
Lectures Textbooks
introducing deepening
Tutorials
discussing
clarifying
Quizzes
Assignment
Tests
Final
testing
correcting
1.2.1 Tuition
lectures (2hr per week) Introduce and emphasise key points from the course, seeworked examples, ask one or two questions; prepare by reading the lecturenotes, reading over reference chapters;
tutorials (1hr per week from week 1) Core place of learning, developing under-standing, making mistakes, asking many questions;
pitstop (many hrs per week from week 3) Back-up for tutorials, further explanation,further inquiry.
consultation (3hrs per week) Clarifying lecture material, discussing course-program
related issues (LIC), focussed tuition.
Computer Labs
• No in-lab computing assessment;
• Labs are for:
– Practicing/learning Excel;
– Working on your Assignments;
– Completing online-quizzes
• Labs are booked for use by QABE students: see the course website for details.
2
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 9/202
1.2. LEARNING IN QABE
1.2.2 Materials
online Go to
http://lms-blackboard.telt.unsw.edu.au
... click on ‘ECON1202/2291 - Quantitative Analysis for Business and Eco-nomics’. Lecture notes, course-outline, past exams, contact information;
textbooks 1. (required) Haeussler, Paul & Wood, ‘Introductory Mathematical Analysis: for Business, Economics and the Life and Social Sciences’ ,Addison Welsey, 12th Edition, 2008. (HPW);
2. (strongly recommended) Knox, Zima & Brown, ‘Mathematics of Finance’ ,McGraw-Hill Book Company, 2nd Edition, 1999. (KZB);
3. (other) see course outline.
More help?
pass (many hrs per week from week 3) “Peer Assistance Support Scheme”: Peerassisted study groups, run by second and third year students;
education development unit (edu) (Australian School of Business) Learning andlanguage support; workshops etc., Room G07, Ground Floor, ASB Building,West Lobby;
the learning centre (UNSW) Free and confidential learning support for students;
iLecture Podcasts in .mp3 or live-streaming (quick-time, windows media player).
Is this for you?
Assumed knowledge A level of knowledge equivalent to achieving a mark or at least 60 in HSC Mathematics. Students who have taken General Mathematics will not have achieved the level of knowledge which is assumed for this course.
From the (intro) Calculus lectures...
ya = d
dxx peax
yb = d
dx
e2x + x
yc =
ba
k(1 − ex) dx
yd =
5ex − x−2 + 3x
dx (x = 0).
3
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 10/202
LECTURE 1. INTRODUCING QABE
Refresher ResourcesSee revision text in the Reserve section of the library (also available at the UNSW
bookshop):
• Managing Mathematics: A Refresher Course for Economics andCommerce Students by Judith Watson, 2nd Edition, 2002.
1.3 Miscellany
1.3.1 On the lecture materials
Using lecture resources
• Lecture notes are available from the website. Will be available shortly in a“book” form, which can be downloaded or purchased from the UNSW Book-shop;
• In the notes – look for chapter references in the margins;text ref.
here! • At the end look for key words of interest that you should revise;
• Note special text like,
Definition | The fundamental theorem of first-yearThe amount of work w undertaken by a student is inversely related to the difference between the total session time T and time elapsed in the session t,
w(t) ∝ 1
T
−t
(1.1)
• Examples appear in the notes with a box for working,
Example:The world is experiencing exponential growth in population, but decliningeconomic stocks of energy, fresh water and food. Solve.
• Or words of caution to make sure you don’t fall into common traps,
The Fundamental Theorem of First-year is fundamental for a reason.
4
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 11/202
1.4. FUNCTIONS OF ONE VARIABLE
1.3.2 This is NOT the Course Outline
Read the Course Outline!
Check (and re-check) the course-outline for information provided and more (see list below).
• Special consideration (e.g. illness);
• Student misconduct and plagiarism policy;
• Contact details of key people;
• Syllabus – what we’ll be studying, with chapter references.
1.3.3 Studying at university
Some advice
1. Attend classes – the ‘turning up’ philosophy to education;
2. Use a diary/palm-pilot/organiser/calendar/scraps-of-paper, write in assess-ments, put down reminders;
3. Make a habit of opening the textbook and reading it weekly;
4. Ask questions – lots of them;
5. Introduce yourself to someone else in a tutorial or lab.
1.4 Functions of One Variable
To begin with, we will go back over some fundamental concepts and terminology of
the vast world of functions. Following which, we will meet some particular kinds of functions that will keep cropping up in this course, and most likely, in the rest of your studies.
Note: Notation We will use a particular notational convention for functions, such in the following example:
f (x) = x2 + 4,
It should be noted that there is nothing special about ‘ f ’ (or ‘ x’ for that matter), they are just labels. As we note below, we could just have correctly chosen to name all of our ‘representative’ functions as ‘ blah’ with input ‘ words’, (giving say, blah(words),which would be read, ‘the function blah of words’). However, this might get confusing,
and so we will follow the very established convention of using the function title f (x),or perhaps y(x).
5
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 12/202
LECTURE 1. INTRODUCING QABE
Agenda
1. Function review;
2. Special functions;
3. Exponential and Logarithms;
4. Limits.
1.5 What is a Function?
HPW 2.1 Definition | FunctionA function is a rule that assigns to each input number exactly one out-
put number.
Example: A linear function Consider what is meant by the simple linear function f (x) = 1 + 0.5x.
1.5.1 Some Definitions
1. The name of the function is irrelevant. Consider,
fish(shrimp) = shrimp − 1
2 ;
... still a valid function!
2. Often we talk in terms of dependent and independent variables, or alter-natively, in terms of the value and argument respectively:
Example: Dependent, Independent Identify the dependent and independent terms, and the value and argumentof the function H (a, b) = a2 + 2b + 3.
6
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 13/202
1.6. FUNCTIONS
1.5.2 Functions are not functions!
1. Functions are part of a broader class called relations. Functions are thespecial case – they give one output value for a given input value.
2. For this reason, they are also called a mapping, or a transformation.
One of these is a function, one isn’t!
-3 -2 -1 0 1 2 3
-3
-2
-1
0
1
2
3
x
f (x) = x2
-3 -2 -1 0 1 2 3
-3
-2
-1
0
1
2
3
x
f (x) =√ x
1.5.3 Domain and Range
Definition | Domain and RangeThe domain of a function is the set of all x values over which the function ‘makes sense’ (works!). The range of a function, is the set of all possible f (x) values, given the domain.
Example:Find the domain of the function, y (x) = 2
x2+3x−4.
7
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 14/202
LECTURE 1. INTRODUCING QABE
1.6 Functions
1.6.1 Common Functions
HPW 2.2Definition | The Constant FunctionA constant function is of the form:
f (x) = c
where c is a constant.
-3 -2 -1 0 1 2 3-3
-2
-1
0
1
2
3
x
f (x) = 2
Definition | The Polynomial FunctionA polynomial function is of the form:
f (x) = cnxn + cn−1xn−1 + · · · + c1x1 + c0
where cn . . . c0 are constants.
-3 -2 -1 0 1 2 3
-3
-2
-1
0
1
2
3
x
f (x) = x2
Definition | The Rational FunctionA rational function is of the form:
f (x) = p1(x)
p2(x)
where p1 and p2 are polynomial functions.
-3 -2 -1 0 1 2 3
-3
-2
-1
0
1
2
3
x
f (x) = x2−6
x+6
8
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 15/202
1.6. FUNCTIONS
Definition | The Absolute FunctionAn absolute function is of the form:
f (x) = |g(x)|
where g(x) is some function and | · | indicates ‘positive value’.
-3 -2 -1 0 1 2 3
-3
-2
-1
0
1
2
3
x
f (x) = |√ x|
1.6.2 Combining Functions
HPW 2.3Suppose we have two functions, f (x) = 3x + 2, and p(x) = x3
− 3, then we will beinterested to solve: f (x) + p(x), or f (x) − p(x), or f (x) × p(x), or even f (x)
p(x) .
Definition | Function CombinationIn general, we have,
sum (f + g)(x) = f (x) + g(x) ,
difference (f − g)(x) = f (x) − g(x) ,
product (f g)(x) = f (x) · g(x) ,
quotient (f g )(x) =
f (x)
g(x)
for g(x)
= 0 .
Example: Combining functions
Suppose f (x) = 2x2 − 3x − 2 and g(x) = x − 2, and let h(x) = f g (x),
then show that (h − g)(x) = x + 3.
1.6.3 Composite Functions
Now suppose we don’t want a combination, but we want to construct a process of more than one function,
x f (x) y g(y) z
9
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 16/202
LECTURE 1. INTRODUCING QABE
that is,
x g(f (x)) z
Definition | Composite FunctionIf f and g are functions, the composite function of f and g is the func-tion f ◦ g,
(f ◦ g)(x) = f (g(x)) ,
and the domain of f ◦ g is the values of x in the domain of g such that g(x) is in the domain of f .
Example: Composite functions
Let p(x) = x2 − 2, and h(x) = √ 5x + 1 (for x ≥ 0). Find ( p ◦ h)(2).
1.7 Special Functions
1.7.1 Inverse
HPW 2.4 Now suppose that instead of,
x g(f (x)) z
we want to go back the other way, that is,
x ? z
or in other words, if
(f ◦ g)(x) = f (g(x)) = z ,
then what we are after is the function,
(g−1 ◦ f −1)(z) = g−1(f −1(z)) = x .
where g−1 is the inverse function of g.
10
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 17/202
1.7. SPECIAL FUNCTIONS
Example:
Suppose f (x) = x2+15 , find f −1(x).
Let’s try that out, suppose x = 2:
f (x) = f (2) = (2)2 + 1
5 = 1
... and the other way around,
f −1(x) = f −1(1) =
(5)(1) − 1 = ±2
???!!! we received two answers back: +2, or −2
A function has an inverse if and only if it is a one-to-one func-tion.
Definition | One-to-one FunctionA function is one-to-one if for all a and b, if a = b, then f (a) = f (b).
Note: Inverse or reciprocal? You’ll have noted that the way that we represent the in-verse of a function, f −1(x) looks a lot like how we might represent the reciprocalof a number, x−1. So the question is, ‘how do I know what is being talked about?’ The context will be most helpful, and the way that the inverse is presented should give some indication. For instance, to represent the reciprocal of the function f (x) we would normally write,
[f (x)]−1 = 1
f (x) ,
rather than when we just want the inverse we would write,
f −1(x) ,
see the difference? However, suppose you were confronted with,
z(x) = x2 + 2√
x + 4f −1x ,
what would you understand this to mean? It is clearly a bit ambiguous, with ambiguity due to the lack of any indication of whether f is a function (which has been written in the equation without its input value), or if it is just another variable that is taken reciprocally ( 1
f ).
To avoid such ambiguity, good practice is always to make the inputs to functions very clear (write them in), unless there are many inputs, in which case, make it clear
that you are just going to write the function name (‘for convenience, we shall write f (a,b,c,d,e,f ) as just f ’) and be sure not to confuse things in the expression.
11
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 18/202
LECTURE 1. INTRODUCING QABE
1.7.2 Exponential & Logarithmic
We will have much more to say about exponential functions in coming weeks, sinceHPW 4.1,
4.2 they provide an easy way to talk about various kinds of time-dependent processes.
Be sure to do a number of exercises in exponential and logarithmic functions sinceit is quite likely that either you have forgotten the rules associated with them, orare meeting them for the first time. It will be of great benefit if the rules andmanipulation of these types of functions comes quickly to hand.
Definition | Exponential
f (x) = ax
(A selection of) Important rules:
aman = am+n
am
an = am−n
(am)n = amn
-3 -2 -1 0 1 2 3
-3
-2
-1
0
1
2
3
x
f (x) = 2x
Definition | LogarithmicWhere b is the base,
f (x) = logb x
(A selection of) Important rules:
logb(mn) = logb m + logb n
logb(m
n ) = logb m − logb n
logb(mr) = r log
bm
logb 1 = 0
-3 -2 -1 0 1 2 3
-3
-2
-1
0
1
2
3
x
f (x) = log10 x
Note: logbx is like saying, ‘what power must I raise b to, to obtain x?’The connection between logarithms and exponentials...
12
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 19/202
1.7. SPECIAL FUNCTIONS
Definition | A very nice rule
logb x = y corresponds to by = x
logb
x = y
Revise!
1. Go over the lecture notes, chapter refs, tutorial problems,
be sure you can do them(not just read them).
2. Go over the lecture notes, chapter refs, tutorial problems,
be sure you can do them(not just read them).
3. Go over the lecture notes, chapter refs, tutorial problems,
be sure you can do them(not just read them).
13
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 20/202
LECTURE 1. INTRODUCING QABE
14
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 21/202
Lecture2Time Value of Money
2.1 IntroductionThis week we begin a section of the course looking at the time value of money . Putsimply, the maths that we need when dealing with money . The reason we need todevelop an understanding of money mathematics (as opposed to, say, just ‘numbers-mathematics’) is that numbers representing money, have the special property thatthey are actually representing value. The trouble is, as opposed to (say) the number‘3’ which represents the same information yesterday, today, and tomorrow, if we weretalking about ‘3 dollars’ of some currency, we would have to be very careful aboutwhen the number was quoted – that is, the value of the representation (‘3 dollars’)is defined in part by the time that it is quoted. Three dollars today wouldn’t get you
even a couple of cans of Coke, three dollars twenty years ago would have obtainedyou three cans of coke.An obvious question is, why does money have this peculiar ‘time-value’ property?
For now, it is enough to raise it as a question. We start our inquiry into the realm of time-value-of-money by looking at the different ways that interest can be calculated.That is, the value of a deposit (some sum of money) can grow over time in the bank’shands. Part of this is to do with simple time-value considerations, and part of it hasto do with various investments the bank has made. More on this later!
Agenda
1. Simple interest
2. Compound interest
3. Continuous compounding
4. Present value
2.2 A Problem
The ProblemWe’re going O/S in 2 years and we need to make as much money as possible before
then through the bank as we don’t have any time for work (we’re studying). Weonly have $1500 currently, but the trip will cost $3,200.
15
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 22/202
LECTURE 2. TIME VALUE OF MONEY
The parameters:
• Money in the hand: 1500
• Time available: 2 years
• Three banking options:
1. Option 1: Simple Interest
2. Option 2: Compound Interest
3. Option 3: Continuously Compounded Interest
2.3 Option 1: Simple Interest
2.3.1 Terminology
KZB 1.1 Definition | Principle, Savings, Rate & Interest
• The amount of money I have at the beginning (to be invested) is called
the principle, or P ;
• The value of the money after some time of investment, is the final
value, or S ;
• The rate at which value is added in a time period is the interest
rate, or r;
• The total value gained due to time-value-of-money – is the interest,or I due to me.
So in our case, we have,
P S r I
$1,500 $3,200 (our aim) t.b.d. t.b.d.
Note: On S , P and A There is no real reason why the final value is given the pro-numeral S – my best guess is that is to do with ‘savings’ (i.e. the amount that is in the account after some time), but this is pretty tenuous. In any case, it is the convention of the financial maths texts (both KZB and HPW use S for the final, or saved, value), sowe’ll use it here.
For the initial value, when we are just doing investment calculations, generally we talk about the Principal P being invested. However, when we are dealing with annuities(later), we talk about the present-value of the Annuity A (not P ). In this course, we’ll
try to follow the texts as best as possible: P for Principal, S for Savings (or future value), and A for present-value of an Annuity.
16
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 23/202
2.4. OPTION 2: COMPOUND INTEREST
2.3.2 Working it out
Simple Interest
Definition | Simple InterestSimple interest is used when the interest is calculated once at the end of the term, that is,
I = P rt (2.1)
where t is the time-period of the calculation.
Example: Simple Interest Suppose we invest (as in our case), P = $1500, r = 5%p.a and t = 2yrs.How much interest (calculated simply) would we gain? What would be the
final value of our investment?
Example: Reverse simple interest With the same interest rate as in the previous example, how many yearswould it take to gain our target ($3,200)?
2.4 Option 2: Compound Interest
KZB 2.1,
HPW 5.12.4.1 Terminology
Compound Interest
Suppose that instead of I being paid once at the end of the investment
period, instead, the calculation (and payment) of I is paid periodically withinthe period: such a scenario is that of compound interest.
17
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 24/202
LECTURE 2. TIME VALUE OF MONEY
Definition | Compound InterestLet P be the original value of the investment, then after n interest peri-
ods, at periodic rate of interest r, the final value of the investment will be,
S = P (1 + r)n (2.2)
Nominal rate vs. periodic rate Be careful of the terminology here – if the nominal interest rate is 5% (that is, per an-num), but the interest is to be compounded quarterly, then r in (2.2) is actually 0.05/4 = 0.0125 (since the calculation period is
quarterly).
Example: Compound Interest Find the final value of a $1000 investment, invested for 5 years at thenominal rate of 8% compounded quarterly.
2.4.2 Working it out
Example: Option 2: reverse compound interest
Returning to our problem, how long would it take to obtain $3,200 with aninitial investment of $1,500, if interest is compounded every two monthsat a nominal rate of 5%?
18
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 25/202
2.5. OPTION 3: CONTINUOUSLY COMPOUNDED INTEREST
2.5 Option 3: Continuously Compounded Interest
HPW 10.3;
KZB
App. D
2.5.1 The exponential constant
Clearly, it is better to have interest compounded – that is, calculated and added inmore than once a year. However, what would happen if we asked for compoundingto take place every week? every day? every second? continuously??!!!
• Suppose we have our normal compound formula,
S = P (1 + r)n
• However, to be clear about it, let’s define ra to be the annual rate of interest(the nominal rate), and k to be the number of times a year compoundingwill occur, and t to be the number of years,
S = P
1 + ra
k
kt
• Now, what we are interested in, is making k approach ∞... (continuous com-pounding), that is,
S = limk→∞
P
1 + ra
k
kt
= P
limk→∞
1 + ra
k kra
rat
• Let x = rak for simplicity, meaning the limit is now x → 0
S = P
limx→0
(1 + x)1
x
rat
• But notice that the limit is actually e
limx→0(1 + x)1
x
, that is,
S = P erat
2.5.2 Working it out
Continuously compounded interest
Which leads to the following definition,
Definition | Continuously compounded interestIf the initial investment is P and the final value of the investment is S ,then under continuous compounding at an annual interest rate of r for t years,
S = P ert (2.3)
19
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 26/202
LECTURE 2. TIME VALUE OF MONEY
Example: Option 3: Continuous compounding With P = $1500 and r = 0.05, after two years, what will be the value of the investment under continuous compounding?
Example: for the record...
With continuous compounding, initial investment of $1,500 and an-nual interest rate of 0.05, how long would it take to obtain a total invest-ment of $3,200?
2.6 Summary
To summarize...
0
1000
2000
3000
4000
5000
0 1 2 3 4 5t(years)
S ($)S = P + P rt
S = P
1 + rn
ntS = P ert
2.7 Present Value
The principle, P , can be thought of as the present value of a future value S . Asimple reorganisation of our equations for the future value of P yields the following.
20
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 27/202
2.7. PRESENT VALUE
Definition | Present Value (periodic)To obtain a compound amount of value S which has been maturing at the periodic rate of r for n periods, one needs to invest the starting amount, or principle,
P = S (1 + r)−n (2.4)
otherwise called the present value of S .
Definition | Present Value (continuous)To obtain a compound amount of value S which has been maturing contin-uously at the nominal rate of r for t years, one needs to invest the starting amount, or principle,
P = Se−rt (2.5)
otherwise called the present value of S .
21
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 28/202
LECTURE 2. TIME VALUE OF MONEY
22
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 29/202
Lecture3Evaluating Time-Money Choices
3.1 IntroductionWe spend a little more time looking at how the value of money is actually dependenton the time at which it is in our hand. That is, as before, we note that thereexists a time value of money; would you prefer $100 in your hand today, or $101tomorrow?
There are various explanations for this fact. As you might have reflected above –‘I’d prefer the money today, since I’m not sure what will happen tomorrow,’ – thatis the uncertainty of our lives kicking in. Just one of the factors that contributeto the apparent value of money changing through time.
We then move on to applying some of our new-found skills in time-value-of-
money to one of the most common problems faced in the commercial world, namely,the problem of deciding whether or not to go ahead with a project, or if there ischoice between projects, deciding which of the projects to fund.
The reason it is so common (if not already obvious) is that in practically everybusiness situation, one has to ‘spend money, to make money’ – that is, make aninitial investment (called capital) and after time, begin to yield some kind of incomestream from the business. The big competition that then ensues is between thatmoney invested in your project, versus that money invested in the bank at somegoing rate – who gives the best return will decided how you will proceed. However,the question of whether one project is actually worth it on its own, or in comparisonto another is not always immediately obvious. Not to worry – by applying what we
have learnt up till now, we have the tools to become experts on these issues!The methods we will develop are two of the most common – the net presentvalue of the project on the one hand, and the internal rate of return on theother. The two methods are very connected, but their interpretation requires somecare.
Agenda
1. Equations of value;
(a) Under simple interest;
(b) Under compound interest;
2. A campus investment conundrum;
23
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 30/202
LECTURE 3. EVALUATING TIME-MONEY CHOICES
3. Looking at the numbers I (the N P V );
4. Looking at the numbers II (the I RR);
5. Calculating with a computer;
6. Conclusions.
3.2 Equations of value
KZB 1.4,
2.6Equations of value
ScenarioYou owe your parents some money. At present, you owe them $500 to be paid in6 months and $350 in 9 months. You don’t want to do installments, you’d preferto pay $100 now and the rest in 12 months time. In negotiations, they agree toconsider either simple or compounded (quarterly) interest. What will you do?
3.2.1 Simple Interest
Solution technique:
1. Work out the timings;
2. Using the focal date bring all the payments and debts to it;
3. Set up the equation of value;
4. Solve.
2 4 6 8 10 12
Debts:
Payments:
$500 $350
$100
t (months)
↑focal date
↑focal date
Example:Using a focal date of now or in 12 months, and simple interest at thenominal value of 7%, what would be the single sum you owe?
Checking the two payments (now = $715.63, 12 months = $766.63), the value of the 12 month payment is,
P = 766.63(1 + 0.07)
−1
= $716.48 !!!
24
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 31/202
3.3. NET PRESENT VALUE
When using simple interest in equations of value, the focal datemust be agreed before hand, since it will affect the total value ex-
changed.
3.2.2 Compound Interest
1. Try the compound interest version yourself;
2. Check if the value of the future (12 month) payment is the same as the currentpayment.
3. Which repayment method would you pick?
3.3 Net Present Value3.3.1 The Scenario
Scenario: ‘The Bean House’ – a Micro-coffee Roasting House for theEastern SuburbsYou’ve recently read about the micro- coffee roasting craze that is hitting Sydney.It seems like the perfect business propositon – value pricing (as opposed to cost-pricing), a legally addicted market (both to the bean, and to the ‘boutique’ theme),and with a tiny amount of skill, an easy market to get a foot in (most drinkers don’tknow the difference). You and a friend are talking one night and it turns out your
friend has already got a plan together. Knowing you are a student of QABE , sheturns to you to run the numbers. Will it work out?
The numbers ...Upon further inquiry, the numbers (according to your friend) look like this:
Year ending Costs Income Cash flow Note0 50,000 0 -50,000 Set-up costs1 34,000 25,000 -9,000 Two-wages @ $17,0002 34,000 45,000 11,0003 44,000 60,000 16,000 Third wage @ $10,0004 44,000 70,000 26,000
5 44,000 75,000 31,000
3.3.2 Working it out
Steps to a decision...
1. Adjusting the cash-flow numbers to turn them into present values (basedon the going alternative rate of return);
2. Sum each of the cash-flow values (in today’s terms) to get the net present
value;
3. Make a decision:
• If NPV > 0 −→ worthwhile;
25
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 32/202
LECTURE 3. EVALUATING TIME-MONEY CHOICES
• If NPV < 0 −→ not worth it!
Example:Suppose your friend has access to a bank who has a long-term savings
account (yearly compounded) offering a nominal rate of 12%. Should The Bean House get off the ground?
Year ending Costs Income I - C (1 + 0.12)−t PV
0 50,000 0 -50,0001 34,000 25,000 -9,0002 34,000 45,000 11,0003 44,000 60,000 16,0004 44,000 70,000 26,0005 44,000 75,000 31,000
NPV
Definition | Net Present Value (NPV)If F t is the estimated cash flow for a T period project at the end of period tand the yearly compounded rate of interest, the cost of capital is r , then the net present value is the sum of present values, assuming cash flows arrive at the end of the year,
N P V = F 0 + F 1(1 + r)−1 + · · · + F T (1 + i)−T . (3.1)
Interpretation - what does it mean?
• As we noted before, if the NP V > 0 then the project is worthwhile;
• The reason is, that the NPV calculation is really doing an in-built comparison,or play-off, between the project at hand, and the interest rate available at thebank;
• If you are ‘beating the bank’ by gaining more value through the project thanif your money were invested with the bank alone, then we deem the project tobe ‘worthwhile’;
Challenge: do the same calculation as in the example above, but at 8% cost of capital. Is the project now worthwhile?
26
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 33/202
3.4. INTERNAL RATE OF RETURN
3.3.3 The Importance of the Interest Rate
Suppose we do the calculation of the NPV for a range of interest rates ...
0
4
8
12
16
20
−4
−8
−12
−16
−20
0.05 0.10 0.15N P V ($′000) r
IRR
3.4 Internal Rate of Return
• The internal rate of return asks the question,
What cost of capital would mean an NPV = 0, the break-evenpoint?
• Which means that if,
r = I RR
then the return on the project (over its life) is exactly the same as if we putour money into the bank! (the competition is a dead-heat!)
Definition | Internal Rate of Return (IRR)The internal rate of return indicates the equivalent interest rate offered by a
financial institution (compounded yearly) that would give the same outcome for my investment over the project life-time, as my project itself.It is found by setting the N P V to zero, and solving for r, assuming cash
flows arrive at the end of the year,
N P V = F 0 + F 1(1 + r)−1 + · · · + F T (1 + r)−T = 0 . (3.2)
Care with the IRR When interpreting the IRR, notice that it is (by definition) independent of the current cost of capital (what is actually offered by the banks). It is tempting to think that IRRsomehow depends on this value. It doesn’t! (But we compare to it.)
27
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 34/202
LECTURE 3. EVALUATING TIME-MONEY CHOICES
3.4.1 Working it out
Example: IRR by hand Suppose a project requires an initial investment of $20,000 and returns
$7,000 and $16,000 at the end of the first and second years respectively.Find the IRR of the project assuming yearly compounding.
• There are simple cases (esp. when t ≤ 2) that can be solved by hand usingthe quadratic equation;
• Obviously, it is difficult to solve for r in most cases (other than trial-and-error approximation), so we often use a software package (such as Microsoft
Excel, Open-office or Gnumeric);
• Be careful how you use the software however...
Example:Using a computer program of your choice, find the I RR and N P V , at 3%
interest, of the following stream of net profits: (-45, -25, -2, 12, 27, 30,31).
The interpretation here needs care! Note that the cost of capital is so-called,since it is the gain fore-gone (given up) when we use the investment money (thecapital) in our project. For this reason, if we can’t do better than what the bank isoffering, we might as well put our backer’s money in the bank!
It is in this sense, that having capital (investment money) outside of the bankis costly – unless we are putting it to good use, it is literally costing us in interestwe could have been getting! (that’s no-risk return too...)
3.5 Summary
Does The Bean House go ahead?
28
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 35/202
3.5. SUMMARY
• Clearly, at cost of capital 12%, the The Bean House isn’t worth it – we’d dobetter by putting our money in the bank at the offered rate of 12%;
• However, by calculating the IRR, we could see that for any cost of capital
less than 10%, the The Bean House is a good idea! ... we’d beat the bestinterest going at the bank!
• Finally, suppose that we had two different projects – the coffee roaster beingone, the other being a simple bakery, if they both have a positive N P V , westill wouldn’t know how to pick between them.
– However, if you can’t do both, choosing the higher N P V project will bethe highest returning project.
29
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 36/202
LECTURE 3. EVALUATING TIME-MONEY CHOICES
30
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 37/202
Lecture4Geometric Progressions and Annuities
4.1 IntroductionDepending on your studies, you may never have heard of an ‘annuity’. However,chances are, you have actually been thinking about, or seeing the work of, annuitiesin everyday life for years. For example, when you are repaying your mobile phone ina number of fixed installments you are paying an annuity . When you take out a loanfor a car, or some other purchase, and then begin repaying the loan, you are dealingwith an annuity . If you have an older friend who is receiving a regular pensionamount from a superanuation benefit such that there will be nothing left by theirlife’s end, they are getting money through an annuity . Finally, if you have a savingsaccount which you regularly transfer money into (say, monthly) and don’t intend
to touch for a number of years (as in the film, The Bank ), you have an annuity .Enough said.You see, annuities do live something of a secret life – we all use many financial
services which have their own specific names, but if we look a little deeper, we are just dealing with an annuity . To understand these creatures better, we have tostart with a bit of maths to refresh ourselves on the nature of geometric progressions and series , which will then enable us to investigate the many- and varied- formsof an annuity. If you can get a handle on annuities, then doubt-less you’ll becomea favoured expert amongst friends and family as you crunch the numbers on theirvarious financial options!
Agenda1. Background: the geometric progression and series;
2. Annuities – present, future value;
3. Annuities due.
4.2 Geometric Progressions
Consider the following number sequences:
2,-2,2,-2,2,-2,2,-2,2,-2,2,-2 (-1)
1.00,0.60,0.36,0.22,0.13,0.08,0.05 (0.6)0.5,1.3,3.1,7.8,19.5,48.8,122.1,305.2 (2.5)
31
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 38/202
LECTURE 4. GEOMETRIC PROGRESSIONS AND ANNUITIES
... in each, we have,
• An initial value, a; and
• A ratio of terms, r ,
r = xi+1xi
Definition | Geometric ProgressionA (finite) geometric progression (or sequence) is a list of numbers where the first number a is chosen, and subsequent numbers are given by multiplying the preceeding term by a constant factor r,
a,ar,ar2, ar3, . . . , a rn−1, arn (4.1)
• Of interest, is what the numbers (or terms) do over time – do they get larger?smaller? stay the same?;
• Further, if they were added together, how will the sum of terms behave?
Definition | Geometric SeriesA geometric series is simply an additive equation (sum) of the terms of a geometric progression, i.e.,
a + ar + ar2 + ar3 + · · · + arn−1 + arn (4.2)
The sum is given by,
s = a(1 − rn)
1 − r (4.3)
Example:Find the sum of the series,
s = 2 + 4 + 8 + 16 + 32 + 64 + 128 + 256 + 512
4.3 Annuities
HPW 5.4,KZB 3.1,
3.2 Problem: choosing mobile-phone contracts
32
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 39/202
4.3. ANNUITIES
You have recently gone onto a ‘plan’ for a mobile phone which includes a new phone.In the contract, the repayments required per month for the phone alone are $17 permonth (calls are extra). The contract says you’ve got to pay this for two years. Youwonder to yourself, what is this phone worth anyhow? Should I just buy a phone
now outright???
4.3.1 Terminology
Definition | AnnuityAn annuity is a sequence of agreed payments made at fixed intervals,called the payment period, over a given length of time, called the term
of the annuity.
Example sequence – repay a loan at $250 with a payment period of 2 months,for a term of 12 months:
2 4 6 8 10 12t (months)
Deposits: $250 $250 $250 $250 $250 $250? ?
Question then: how is this different to one lump-sum payoff at the outset? At theend?
4.3.2 Present Value, A
KZB 3.3Example: Present Value of Annuity Show that the present value A of an annuity of agreed payments R, paidat the end of each of n periods, with r interest rate (per period), is givenby (hint: use the geometric progression result in (4.3)),
A = R · 1 − (1 + r)−n
r .
The previous example leads to the following definition,
33
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 40/202
LECTURE 4. GEOMETRIC PROGRESSIONS AND ANNUITIES
Definition | Present Value of an AnnuityThe present value of an ordinary annuity having regular payments R at the end of each payment period for n payments with an interest rate of rper period is given by,
A = R · 1 − (1 + r)−n
r . (4.4)
• Payments are assumed to be made at the end of each payment period;
• Likewise, interest is assumed to be calculated at the end of each paymentperiod.
Example: Back to the Mobile-phone In our scenario, you are making $17 payments on your mobile phone everymonth for two years. What is the real cost (present value) of the phone?(Assume the company charges 8% interest.)
4.3.3 Spreadsheeting it
Example:
Calculate the previous example with a spreadsheeting program, and checkthe result. Set it up so that you can alter the interest rate. What happens?(Why?)
34
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 41/202
4.3. ANNUITIES
Example: Car loan Suppose you are considering purchasing a car. The model you want willcost you $13,450. You have access to a loan through your bank, who wouldcharge 9.50% interest. What would the monthly repayments be if the term
of the loan was 5 years?
Interpretation
• In each case, the repayments are fixed before the term of the annuity – it isa contract;
• However, due to the time-value-of-money these apparently constant pay-ments have changing value;
• Infact, the agreed repayments include the interest component that the insti-tution is charging;
• It is for this reason that we need to work out the real value of what is being
paid out.
2 4 6 8 10 12t (months)
Deposits: $250 $250 $250 $250 $250 $250
↑focal date
Note: On Annuities You may be getting a quite confused here. Questions such as ‘whose interest rate?’ and ‘what does an annuity actual mean?’ are quite natural.
When we calculate the present value of an annuity, we are really asking the question,‘what is the amount that must be paid now to purchase the value of the payments I’m planning to make at various times throughout the future?’
You see then, that by fixing the payments schedule, the bank (say) has already included the interest components into those repayments. Which means, yes, as time goes by – consider a 30 year home loan – the first payment of (say) $ 100 is worth quite a lot, but by the 30th year, paying the face value of $ 100 is actually paying them a very small amount of value (in terms of the value of $ 100 30 years from now).
Annuities cover a lot of financial services because they are the typical form of loan repayments. A schedule of fixed amounts is set up to begin with, based on the interest rate being charged. This includes retail agreements (like mobile phone repayments),home loans (mortgages), and even investments used by pensioners to withdraw a fixed amount over time (in this case, it is as if the bank has loaned the money from youand is paying you back at a fixed amount for a number of years).
Infact, the word mortgage comes from two roots – mort meaning ‘death’ and gage
meaning ‘pledge’, so together we get a mortgage being to ‘kill of the pledge or agree-ment’ between you and the bank!
35
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 42/202
LECTURE 4. GEOMETRIC PROGRESSIONS AND ANNUITIES
4.3.4 Future Value, S
Notice, we can of course, work out the future value of the loan, just as easily as thepresent value,
2 4 6 8 10 12t (months)
Deposits: $250 $250 $250 $250 $250 $250
↑ focal date
• Notice: the final payment is made on the focal date itself, so requires noadjustment;
• Thus, previous payments need adjustment up till the n − 1 payment,
S = R + R(1 + r) + R(1 + r)2
+ · · · + R(1 + r)n−1
• Another geometric series. (Try proving the following result...)
Definition | Future value of an annuityThe future value of an annuity (ordinary) with payments of R per payment period for n periods at interest rate r per period is,
S = R · (1 + r)n − 1
r (4.5)
4.4 Annuities Due
KZB 3.4 Alternatively, rather than an ordinary annuity (payments are at the end of eachpayment period), suppose the first payment is at the start of the period (like amagazine subscription, say).
0 1 2 3 4 5 6 7
t (months)Deposits: $50 $50 $50 $50 $50 $50 $50
term
This situation is called an annuity due and changes our definitions slightly...
Definition | Present value of annuity dueThe PV of an annuity due is the same as the value of an ordinary annuity one period before the present, brought to the present. So the PV of an annuity due is just the PV of an annuity, with one period’s interest added (accumulated),
A = (1 + r) R
·
1 − (1 + r)−n
r (4.6)
36
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 43/202
4.4. ANNUITIES DUE
0 1 2 3 4 5 6 7t (months)
$50 $50 $50 $50 $50 $50 $50
Ordinary Annuity term
P V −1
P V 0(1 + r)×
Definition | Future value of annuity dueAs with the PV of an annuity due, the FV is the same as the future value of an ordinary annuity which starts one period before the present, brought to the present. So the FV of an annuity due is just the FV of the annuity,with one period’s interest added (accumulated),
S = (1 + r)
R · (1 + r)n − 1
r
(4.7)
0 1 2 3 4 5 6 7t (months)
$50 $50 $50 $50 $50 $50 $50
Ordinary Annuity term
F V −1
F V 0
(1 + r)×
Example:Suppose you put $100 on the first of each month into a savings accountwhich pays 5.5% accumulated monthly. What would be size of the account
after 45 years?
37
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 44/202
LECTURE 4. GEOMETRIC PROGRESSIONS AND ANNUITIES
38
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 45/202
Lecture5Matrices I: Maths by Arrangement
5.1 IntroductionWe now move to a few studies in the world of matrices .1 Think about going on a tripto a very special island, like the Galapogos Islands off the coast of South America.The place is so special and different that it may even have different laws of natureoperating on it. Now this might be a very scary thought. Chances are, the scarinesscomes directly from the fact that the world might operate so differently from theone that we are familiar with, that we won’t know what to do, how to behave, whatto expect. A natural reaction is to try to find ways of doing things on the specialisland that we are used to doing back home.
This kind of journey is exactly what we’ll be embarking on in this lecture. We’ll
venture into the world of Matrices , and immediately start looking for mathematicalelements that we are used to in our ‘normal’ (scalar) world, so as to feel morecomfortable in the new place. The important implication of this journey is firstly,that we shouldn’t expect to be able to do our ‘old’ maths in the new world, andsecondly, that we must recognise which world we are working in! Or else, we maytry to apply a rule to the wrong world that predictably will give rise to all kinds of unintended consequences.
For some people, this area can cause a lot of trouble, since in a number of cases,the way that we perform operations (e.g. subtraction, addition, multiplication) onmatrices gives rise to different outcomes than with just, well, numbers on their own.In times such as these, just remember that matrices are simply a re-arrangement of
the information we are used to dealing with. In most cases, they simply representa collection of lists (e.g. shopping, products) which we describe by the number of rows and columns in the list. The trick with matrices, is that we will begin to dostrange things with them, like multiplying two lists together! Sometimes this will beexactly what we are after and matrix algebra (or ‘linear’ algebra as it is sometimesknown) will prove an enormous help to us.
The special rules of matrices are there for a good reason and with a little practiceshouldn’t be so foreign to you. If any anxieties remain, as ever, practice, practice,practice! There are plenty of examples available in your text-book, on-line, or in
1Note: in the prepartion of this section on Matrices, reference has been made to the excellenttext Linear Algebra (3rd Ed.) by Fraleigh and Beauregard (FB) (1995). By noting this, you may
feel tempted to find this text, which is a fine response, but note that in many areas, FB goes well beyond what is required of us in our course. Beware!
39
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 46/202
LECTURE 5. MATRICES I: MATHS BY ARRANGEMENT
the library (look for textbooks on ‘linear algebra’ or ‘matrices’). For the moment,we will simply have to refresh our memory on this strange world, which will forthe most part mean leaving our economic applications at the door. But as wemove forward, we’ll see how matrices are of great help to us in understanding many
commercial/economic activities.
Agenda
1. Introducing matrix terms;
2. Basic operations;
3. Matrix multiplication.
5.2 Terminology
HPW 6.1 Maths by arrangementConsider the following examples:
6x1 + 3x2 + x3 = 22
x1 + 4x2 − 2x3 = 12
4x1 − x2 + 5x3 = 10
6 3 1
1 4 −24 −1 5
x1
x2x3
=
22
1210
Mon Tues Wed
Income 54 60 58Costs 51 45 50
54 60 5851 45 50
Information in ‘loose’ form Information in matrix form
• A matrix is just a special arrangement of information into an array of num-bers;
• Linear equations, tabular data, image information, database entries – almostall kinds of information can be represented in matrix form;
• Some terminology:
A =
8 1 6
3 5 74 9 2
columns
rows
– A has 3 rows and 3 columns, so its size is expressed as 3 × 3 (r × c);
40
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 47/202
5.2. TERMINOLOGY
– A is thus a square matrix since rows(A) = cols(A);
– Further, since A is square, we can refer to the main diagonal or prin-
ciple diagonal of A;
• If rows(A) = 1 or cols(A) = 1, then we refer to a row vector or columnvector respectively, e.g.,
8 1 6
1
59
• We refer to a single position in the matrix as a matrix element or matrix
entry, normally by referring to the row and column positions,
A =a11 a12 a13 a14
a21 a22 a23 a24a31 a32 a33 a34
where (say) a23 indicates the entry in row 2, column 3.
5.2.1 Special matrices
Some often-used special matrices:
• The zero matrix or null matrix,
0 =0 0 0
0 0 0
or, in general 0 =
0 · · · 0...
.. .
...
0 · · · 0
which has the special property,
0A = A0 = 0 .
• The identity matrix, e.g.,
I =
1 0 00 1 00 0 1
which has the special property that,
AI = A .
• A diagonal matrix is like the identity matrix, but can have non-zeroelements on the diagonal:
D =
2 0 00 0.32 00 0 345.1
• A triangular matrix comes in one of two forms:
41
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 48/202
LECTURE 5. MATRICES I: MATHS BY ARRANGEMENT
1. An upper triangular matrix has the form:
Aij = aij for i ≤ j
0 for i > je.g. U =
1 2 20 0 3
0 0 345.1
2. A lower triangular matrix
Aij =
aij for i ≥ j
0 for i < je.g. L =
1 0 0
5 3 01 0 345.1
5.3 Operations
HPW 6.2 Definition |
Matrix equalityTwo matrices A and B are said to be equal if they are of the same sizeand aij = bij for each i and j.
Example:Are the matrices
4 32 0
and
2 04 3
equal?
Definition | Transpose of a matrixFor some matrix A of size m
×n, the transpose of A denoted A⊺ is of
size n × m with each ith column taking the values of the ith row of A.
(A⊺)⊺ = A
(A + B)⊺ = A⊺ + B⊺
(AB)⊺ = B⊺A⊺
A = 1 2 3 4
5 6 7 8 A⊺ =
1 52 6
3 74 8
42
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 49/202
5.3. OPERATIONS
5.3.1 Addition & subtraction
Matrix addition and subtraction are done in an element-wise fashion.
Example:Determine the solution to,
4 92 1
+
2 00 7
Example:Determine the solution to,
4 9 3
2 1 2 + 2 0
0 7
Matrix addition and subtraction requires the inputs to be of equalsize, or else the solution is undefined.
5.3.2 Scalar multiplication
To perform scalar multiplication on some matrix A is to simply multiply every element of A by the given scalar.
43
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 50/202
LECTURE 5. MATRICES I: MATHS BY ARRANGEMENT
Example:Let A be given by,
3 −10 5
determine 7A.
5.4 Matrix Multiplication
HPW 6.3 5.4.1 Working it out
Matrix multiplication has a special definition, requiring some care. Suppose we havetwo matrices,
A =
1 3
2 84 0
and B =
59
and we wish to find C = AB (A times B), we must do the following:
1. Check that the column dimension of A is equal to the row dimension of B;
2. Determine the size of C: row(A) × col(B);
3. For each entry in C, calculate the sum of the ith row of A times the jthcolumn of B.
Example:Determine the value of C = AB as defined above,
A =1 3
2 84 0
and B =
59
.
44
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 51/202
5.4. MATRIX MULTIPLICATION
For practice, calculate AB and BA, where,
A =
0 23 5
B =
0 12 5
.
Matrix multiplication is not commutative, that is, for two matrices of the same size A and B,
AB = BA .
Definition |
Properties of matrix multiplicationPay careful attention to the following matrix-specific rules:
A(BC) = (AB)C
A(B + C) = AB + AC
(A + B)C = AC + BC
IA = A
BI = B
Example:Under what conditions would the following equation be true?
(A + B)2 = A2 + 2AB + B2
45
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 52/202
LECTURE 5. MATRICES I: MATHS BY ARRANGEMENT
46
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 53/202
Lecture6Matrices II: The Inverse & Determinant
in Small Matrices
6.1 Introduction
This lecture is a significant step up in difficulty for our matrix algebra, but it isalso a significant improvement in the power of our matrix toolbox. We begin bycoming up with an equivalent operation to division in arithmetic, known as thematrix inverse. It does just the same job (a matrix multiplied by its inverseequals the identity matrix (the stand-in for ‘1’ in matrix algebra)), but like othermatrix operations, has its own specific rules and properties.
Following from this, we are caused to wonder how we might actually come up
with the inverse? Afterall, it isn’t much use unless we can find out what its valueis. Whilst there are a few techniques for obtaining the inverse (e.g. row reduction)we will consider just one, the adjoint method. Now this is itself a little bit tricky,even on small matrices, but it will introduce us to a very important property of anysquare matrix, known as the determinant, and the adjoint method will give us anidea about why sometimes we can get an inverse, and sometimes we can’t. More onthis in the next lecture.
Although all of what we do in this lecture is applicable to much larger matrices(and is where these techniques have real power), we won’t be doing them on anythingbigger than a two-by-two or three-by-three. Next lecture we’ll unleash the power of the computer on our matrix world, and so do some tackle some really big problems.
Agenda
1. Matrix division? ... The inverse of a matrix;
2. Finding the inverse: the determinant and the adjoint method;
3. Application to systems of linear equations;
6.2 The inverse of a matrix
HPW 6.6A problem?
47
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 54/202
LECTURE 6. MATRICES II: THE INVERSE & DETERMINANT IN SMALL
MATRICES
• Up till now, we have only seen matrix addition, subtraction and multpli-cation (both scalar and matrix);
• What about solving something like,
Ax = b for x?
• Normally, we’d divide both sides by A and all would be well.
• But we can’t do matrix division like that!
6.2.1 Defined
Instead, we use the inverse of a matrix which has the following property,
Definition | Inverse of a matrixIf a square matrix A has an inverse, written A−1, then A−1 has the follow-ing property:
AA−1 = I , and
A−1A = I .
Don’t be tempted to think,
A−1 = 1
A not true!!
Now we can solve our problem,
Ax = b for x?
if A has an inverse (! ), then we can simply solve,
Ax = b
A−1(Ax) = A−1b
(A−1A)x = A−1b
Ix = A−1b
x = A−1b.
6.3 A Primer to the Inverse: The Determinant
JS 4.6, 4.7,
4.9
6.3.1 ‘Small’ Determinants
Determinants of order 2
48
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 55/202
6.3. DETERMINANT EXCURSUS
Definition | The determinant
The determinant of a square, two-by-two matrix A =
a11 a12
a21 a22
is writ-
ten |A| or a11 a12
a21 a22
and is given by,
|A| = a11a22 − a21a12 . (6.1)
a11 a12
a21 a22
|A
|= + a
11a
22 −a
21a
12
Example:
Calculate the determinant of the matrix
1 35 2
.
6.3.2 Determinants of higher orders
What about 3 x 3?
• What if we need to find the inverse (and so check the determinant) of a 3 by3 matrix?
• ... it is possible, but just needs care!
|A| =
a11 a12 a13
a21 a22 a23
a31 a32 a33
= +a11 a22 a23
a32 a33−
a12 a21 a23
a31 a33 + a13 a21 a22
a31 a32
49
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 56/202
LECTURE 6. MATRICES II: THE INVERSE & DETERMINANT IN SMALL
MATRICES
Example:
Find the determinant of the matrix
2 1 −2−5 1 3
10 2 4
.
Definition | The determinant of order nLet A be a square matrix, and Aij be the (square) matrix remaining after eliminating row i and column j, then define the cofactor of element aij
in A as,a′ij = (−1)i+ j det Aij , (6.2)
and further define the determinant of A to be,
det A = a11a′11 + a12a′12 + · · · + a1na′1n . (6.3)
6.3.3 Cofactors
Example: Cofactors & Determinants
Find the cofactor of the entry ‘3’ in the matrix, A =
2 1 0 13 2 1 24 0 1 41 0 2 1
Properties of Determinants
Let A be a square matrix, then,
1. We have det(A) = det(A⊺);
2. Exchanging two rows of A, causes determinant of resulting matrix to be
− det(A);
50
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 57/202
6.4. THE INVERSE REALLY
3. If two rows of A are equal then det(A) = 0;
4. If a single row of A is multiplied by a scalar r, the determinant of the resultingmatrix is r
×det(A);
5. Addition of a scalar multiple of one row of A to another row of A leaves thedeterminant unchanged;
6. A is invertible (non-singular) if and only if det(A) = 0. (Alternatively, Ais singular if and only if det(A) = 0.)
6.4 The Inverse Really
Back to the inverse
• Recall, that we started our journey on determinants because we wished toknow if a particular matrix had an inverse or not.
• Infact, we can use determinants to go straight to the inverse !
• The method introduces us to the adjoint of a matrix. To find the adjoint:
1. Check the determinant is non-zero;
2. Find the cofactors for each entry, call this A′;
3. The adjoint of A is then, (A′)⊺.
6.4.1 The Adjoint of a Matrix
Example: Finding the adjoint
Find the adjoint of the matrix, A =
4 0 1
2 2 03 1 1
.
6.4.2 The Inverse by the Adjoint
Definition | Inverse by the adjoint-methodLet A be an n × n matrix with det(A) = 0. Then A is invertible, and
A−1 = 1
det(A)adj (A) ,
where adj (A) = (A′)⊺, the transposed matrix of cofactors.
51
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 58/202
LECTURE 6. MATRICES II: THE INVERSE & DETERMINANT IN SMALL
MATRICES
Example: The inverse by the adjoint method
Find the inverse of A =
4 0 12 2 0
3 1 1
by the adjoint method.
The solution method
1. Calculate |A|. If |A| = 0, proceed to (2);
2. Find co-factors of A;
3. Construct matrix of co-factors, A′ = [a′ij ];
4. Transpose A′ to obtain adj(A); and
5. Divide adj(A) by |A| to obtain inverse.
6.4.3 A Useful Check!
Do we have an inverse?
Definition | Non-singularityFor the square matrix A, if |A| is not equal to zero then A is non-
singular and thus has an inverse, if this is not the case, and |A| = 0, we say that A is singular and will not have an inverse.
• Note, then we have two checks to make of some matrix A, to determine if ithas an inverse or not:
1. Is A square?
2. Is
|A
| = 0?
• If the answer is yes to both criteria, we can be sure that A has an inverse.
52
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 59/202
6.5. ON LINEAR EQUATIONS
Example:
Determine whether the matrix A =
1 09 2
has an inverse.
6.5 Solving systems of linear equations6.5.1 The problem
A messy problem?Suppose we wanted to solve,
p2 − 3 p3 = −5 (6.4)
2 p1 + 3 p2 − p3 = 7 (6.5)
4 p1 + 5 p2 − 2 p3 = 10 (6.6)
... how would we do it?? Rearrange (6.4):
p2 = −5 + 3 p3 (6.7)
Substitute (6.7) into (6.5),
2 p1 + 3(3 p3 − 5) − p3 = 7
2 p1 + 9 p3 − 15 − p3 = 7
2 p1 + 8 p3 − 15 = 7
Solving by hand...Giving,
p1 = 12
(7 + 15 − 8 p3) = 11 − 4 p3 (6.8)
Now substitute (6.7) and (6.8) into (6.6),
4(11 − 4 p3) + 5(3 p3 − 5) − 2 p3 = 10
44 − 16 p3 + 1 p3 − 25 − 2 p3 = 10
0 − 3 p3 = 0
p3 = 3 !
Giving, p1 = 11 − 4(3) = −1, and p2 = −5 + 3(3) = 4 that is,
( p1, p2, p3) = (−1, 4, 3) (phew!).
53
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 60/202
LECTURE 6. MATRICES II: THE INVERSE & DETERMINANT IN SMALL
MATRICES
By the inverse
Example:
Solve the following system of linear equations by the Adjoint Method:
p2 − 3 p3 = −5
2 p1 + 3 p2 − p3 = 7
4 p1 + 5 p2 − 2 p3 = 10
To summarize...
• We can’t do normal division on matrices,
• We can do the same job with the inverse;
• But, if the matrix has a determinant equal to zero, we have no inverse (why?);
• We can use the inverse to solve linear systems of equations!
54
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 61/202
Lecture7Matrices III: Matrix Algebra &
Automatic-Matrices!
7.1 Introduction
Having learnt a bit about what is going on with matrices, we just have a few moreloose ends to tie up. Specifically, we’ll go over the algebra of matrices. This is
just like what we would normally do with ‘scalar’ algebra: rearranging equations,simplifying, making a certain pro-numeral the subject of the equation. However,with matrices, there are some very important differences in the rules and how toapply them. Pay attention.
Following this, we’ll cover a couple of important pieces of terminology – singularand non-singular on the one hand and consistent and inconsistent on the other.These are really just labels for concepts that we are already familiar with, but theyhave especial relevance when we move to using computers. I say this, becausealthough Microsoft Excel (which we’ll be using for the moment) doesn’t havevery elaborate error-messages, other programs do. For instance, Matlab mightreport (when trying to obtain A−1),
>> inv(A)
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate.
...
what does this mean? See below.
The main purpose of the second part of this lecture is to introduce the wayof matrices on computers, specifically using Microsoft Excel. As with mostcomputer packages, Excel is very fast to do lots of things, but fast doesn’t alwaysequal correct ! It’s for this reason that we have gone through matrices ‘by hand’ toa point to begin with, so that we can actually uncover when the computer is tellingus fibs!
Agenda
1. A little more on Matrix Algebra;
2. Using computers to do Matrix Maths.
55
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 62/202
LECTURE 7. MATRICES III: MATRIX ALGEBRA &
AUTOMATIC-MATRICES!
• Small operations;
• Linear equations;
• Big operations.
7.2 More on Matrix Algebra
HPW
6.1-6.3 Definition | Properties of the inverse
Some useful properties of the inverse,• If the inverse of the square matrix A exists, we call A non-singular,
otherwise we call A singular;
• If A−1 exists, it is unique;
• Other properties,
(AB)−1 = B−1A−1
(A−1)−1 = A
(A⊺)−1 = (A−1)⊺
(A + B) = A−1 + B−1 (normally)
Example:Suppose A, B and C are all invertible matrices, and
[C−1A + X(A−1B)−1]−1 = C ,
express X in terms of A, B and C.
7.2.1 Consistency
What if there isn’t a solution?
• We have taken for granted so far that our systems of linear equations will besolvable, however ...
• For now, we notice that,
Definition
| Consistency
A linear system having no solutions is said to be inconsistent, whereas a system having either one or more solutions is said to be consistent.
56
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 63/202
7.2. MORE ON MATRIX ALGEBRA
Example:Determine whether the following linear system is consistent,
[A|b] = 1 −3 5 30 1 2 2
0 0 0 1
, .
A relationship to the Determinant??
Example:Determine whether the following linear system is consistent by checkingthe determinant of A,
[A
|b] =
1 −3 5 30 1 2 2
0 0 0 1 .
Independence, Matrix style
• Whenever we have the case that one row or column is not independent of another row or column (respectively) in our matrix, we will find the inverse(and so, a solution) hard to come by;
• This is the principle of linear independence... if for some reason you findthat a matrix is singular, then you should look at the relationship betweenthe rows, or between columns, or for zero rows or columns.
• What is happening? ... you have less information than you need to solve thesystem! e.g. 3 (independent) equations and 4 unknowns ... inconsistent!
57
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 64/202
LECTURE 7. MATRICES III: MATRIX ALGEBRA &
AUTOMATIC-MATRICES!
7.3 Matrices on Computers
An easier way?
• In reality, many matrix manipulations and computations are hard work!
• However, computers don’t get tired like humans do!
• There are some tricks, however ... we’ll look at a few.
Terminology
In Microsoft Excel, matrices are known as arrays. They have some specialfunctions that can used on them:
+ - Add and subtract matrices as normal;
MMULT Matrix multiplication;
TRANSPOSE Transpose a matrix;
MDETERM Determinant of a matrix;
MINVERSE Inverse of a matrix.
Additionally, functions can be nested:
=MMULT(TRANSPOSE(A1:C3),MINVERSE(E1:G3))
Although...
Functions that would be nice , but we don’t get to use:
• A function to quickly create I, identity matrices (on some systems there is a
function called MUNIT;
• A function to construct cofactor matrices;
• A function for the adjoint;
• etc..
The Golden Rule of Matrices on a Computer
There is always a special way to tell the program that we are dealing with an
array
• Each of the numbers are related to each other;
• They should be considered together!
58
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 65/202
7.3. MATRICES ON COMPUTERS
Definition | The Golden Rule of Array ComputingAfter entering a formula that intends to treat any row- or column- referenced block of numbers as an array, rather than just hitting return or enter you
must hit:ctrl + shift + enter
this is the golden rule of array computing!
Examples...... to the software!
Note: Lecture notes from here... A ‘clean’ version of the spreadsheet used in these lec-ture examples will be placed on the web. You are encouraged to use and play with it.
59
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 66/202
LECTURE 7. MATRICES III: MATRIX ALGEBRA &
AUTOMATIC-MATRICES!
60
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 67/202
Lecture8Probability I: Permutations and
Combinations
8.1 Introduction
We now take a couple of lectures to think about probability. This is partly becauseit is another key feature of various economic problems (especially situations to dowith uncertainty ) but also partly because it helps as a primer for further thinkingin probability and its cousin statistics .
For this lecture, we will focus on ways of counting things up. This may not seemrelated to probability at first, but the fact is, if we cannot count the number of
possible occurrences, then we cannot determine the likelihood or probability of seeing the one we have before us. More on this application in the following lecture.Before we begin, one more note on ‘probability’. This is a very common word
in the popular media and discussions in general, for instance, the weather-mantalks about ‘a 25% probability of rain tomorrow’, or our family doctor talks about‘a one-in-1,500 chance’ that we might inherit a particular disease trait, or even thegovernment might say ‘there is a very low probability of any further interest rate risein the next two years.’ Do they all mean the same thing by the word ‘probability’?Sort of, however, sometimes we slip into using the word a bit informally.
The first two examples are quite correct – in that the weather man and thedoctor are asserting that ‘of all the cases we know about in the past that are like
this one, x% of them had y characteristic’. To translate for the weather man, he issaying, ‘of all the days that are meteorologically similar to what we expect tomorrowto be, 25% of them experienced rain-fall.’ For the doctor this is, ‘of all the people weknow of who have your heritage, an average of 1 in 1,500 of them had this particulardisease.’ Notice that in both cases, each professional is asserting that they know about the population (‘all days like tomorrow’, or ‘all people with the same heritageas you’), and therefore can say something about the instance in front of them. Thisis what probability is about – knowing information about a whole population givesrise to estimations of likelihoods about a particular event. Statistics , on the otherhand, ‘goes the other way’ (sample to population). More on this presently.
Agenda
1. Why counting?
61
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 68/202
LECTURE 8. PROBABILITY I: PERMUTATIONS AND COMBINATIONS
2. Permuations: counting arrangements ;
3. Combinations: counting selections ;
4. Relationships in counting.
8.2 Why Counting?
Scenario: Petrol Theft!
A spate of petrol thefts is hitting Sydney. You have been asked to assist the exas-perated NSW Police department. They have (blurry) surveillance footage of a few
number-plates but can’t figure out how to track the ownders down, or even, howmany cars might have the pieces of the plate they can see... can you help?
High prices fuel increase in drivers doing a runner
Eamonn Duff,August 21, 2005 , The Sun-Herald
Rising petrol prices have sparked a dramatic increase in the number of motorists
who drive away from service stations without paying for fuel. ... Petrol priceshit a record high last week of 126.9 cents a litre and industry voices said it wasno coincidence that service stations were experiencing a high number of incidentsinvolving motorists who fill, then flee. ... A NSW Police spokesman told The Sun-Herald ... “There are those who commit these crimes using stolen cars or numberplates. Then there are those who obscure their number plates and quite often ourinvestigations run into a dead end.”
Are we doing Statistics or Probability ?
• The Petrol Theft scenario is a situation where we want to know how manynumber plates exist in the population, that is, the probability or likelihoodthat we would see these plates on a car;
• The trick is, we can do this for number plates because we can calculate (bycounting) every possible number plate combination;
• This is not always the case...
• Another situation may be that we only have one (or a few) samples, and anunknown (or unknowable ) population, and we would like to know what thissample tells us about the population.
62
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 69/202
8.3. BASIC COUNTING
Statistics
? inference
We have a sample, and infer about an unknown population.
Probability
? likelihood
We can know the population, and ask the probability of getting the sample.
Note: Statistics and BES We won’t be studying any statistics in QABE. The ‘sister’ quantitative course, Business and Economic Statistics does tackle a range of topics in statistics (and a few probability topics that we don’t touch on). The distinction between probability and statistics should be helpful to orientate your understanding in both areas.
8.3 Basic Counting
HPW 8.1Back to Counting the Population...
• We’ll be looking at probability for now...
• Hence, we need to come up with ways of counting up the number of membersof a particular population (so that we can say something about the probabilityof obtaining our particular sample).
8.3.1 By Boxes
Example: The number-plate population The first step in dealing with our scenario is to work out the total numberof number plates possible of the kind {LL · ## · LL} where L stands forany captial letter from A − Z and # stands for any number from 1-9.
63
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 70/202
LECTURE 8. PROBABILITY I: PERMUTATIONS AND COMBINATIONS
Example:NSW recently changed its plates from the kind {LLL · ###} to {LL ·## · LL}. What’s the difference in the number of plates available to the
RTA due to the change?
8.3.2 By Trees
Or in other words...
Another way to think about the ‘boxes’ method, is to translate the problem intoa tree diagram.
Tree Diagrams
1. Are made of an initial node;
2. Links show possible paths of construction;
3. Each successive bank of nodes (a choice) is called a level.
A
B
C
A
1
2
3
1
2
A
A
B
CB
C3
B
CLevel 1
L evel 2 Level 3
L evel 4 L evel 5 Level 6
By another name
Seen in this way (as a tree), the question becomes, in how many ways can Iconstruct a path through the tree?
Definition | Basic Counting PrincipleGiven some procedure having k levels. If n1 is the number of choices for pro-cedure at the first level, n2 at the second, and so on, then the total number of different ways the procedure can occur (by the basic counting principle)is simply,
n1 × n2 × n3 × · · · × nk−1 × nk . (8.1)
64
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 71/202
8.4. PERMUTATIONS
Example: For the record...The police have a photo from the Kingsford BP petrol station that shows‘AA 3 K’. How many number plates could have this configuration? What
proportion of the total number do they comprise?
8.4 Permutations
When the supply is limited...
• Up till now, we have been allowed to have as many (say) ‘A’s as we wanted inour letter boxes ... suppose that is not true, suppose we are only allowed tochoose from a set number of distinct objects?
• For example, suppose the police knows that a thief has bought exactly (andonly) six decals to onto a blank number-plate – how many possible numberplates could he make?
• This question asks about permutations:
Definition | PermutationsSuppose a basket contains exactly n different (distinct) objects, then if an arrangement (an ordering) of r these were taken from the basket, we would have a permutation of n objects taken r at a time. The total number of ways of doing this, the number of permutations is given by the symbol,
nP r or n
P r .
65
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 72/202
LECTURE 8. PROBABILITY I: PERMUTATIONS AND COMBINATIONS
Example:Suppose that number plates are of the (old) form ‘LLL · ###’and the thief mentioned above is known to have the letters
{B,D ,E,F,J,L,M,P,R,S,U ,V } and the numbers {2, 5, 6, 7, 8, 9}. Howmany different rear number plates could he come up with?
8.4.1 By the formula
Is there a rule?
• This is OK when n and r are small, but would be a pain for larger factors...
• Actually, we can make some progress on the maths by using factorials (!).
• Writing out what we just did (in the previous example) we have,
12P 3 = 12(12 − 1)(12 − 2)
• Suppose we choose 6 instead,
12P 6 = 12(12 − 1)(12 − 2)(12 − 3)(12 − 4)(12 − 5)
• It is a series, but when should it stop? Try...
nP r = n(n − 1)(n − 2)(n − 3) . . . (n − r + 1)
One more trick (see text) leads to the following definition:
Definition | The Permutation FormulaGiven n distinct objects, the number of permutations, taking r at a time is given by the factorial fraction,
nP r = n!
(n − r)! (8.2)
In fact, your calculator knows how to do this already with the nP r key.
66
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 73/202
8.5. COMBINATIONS
Example: On Factorials
Try to do 112!109! on your calculator. Problems? Can you work it out another
way??
8.5 CombinationsHPW 8.2When the order doesn’t matter...
• Recall our thief had some letter and number decals that he was using to makeup fake number plates;
• Suppose now that there is a glitch in the video recording system, and that whenthey use the recognition technology, all it tells the police is which selectionof letters and numbers was used on the fake plate, not what order they were in ;
• The question is then, ‘in how many ways can I select (not order) r objectsfrom a total of n objects?’
• Counting combinations has wide application, since it is what happens wheneverwe have a constraint on the feedstock (the n objects) but don’t care about theordering, just which of the possible objects is selected.
• Example: how many different soccer teams can be selected from a group of 20 school yard kids? (without regard to on-field positions!).
Working it out
• For starters, suppose we were forming teams of 3 players, from a total of 5kids.
• Label the kids {A,B,C,D,E}, and write down all the permutations you couldget (choosing 3 from 5):
ABC ABD ABE ACD ACE ADE BCD BCE BDE CDEACB ADB AEB ADC AEC AED BDC BEC CED CEDBAC BAD BAE CAD CAE DAE CBD CBE DCE DECBCA BDA BEA CDA CEA DEA CDB CEB DEC DCECAB DAB EAB DAC EAC EAD DBC EBC ECD ECDCBA DBA EBA DCA ECA EDA DCB ECB EDC EDC
• Look carefully at the way we have written them down ... actually each of the
columns is just a re-arrangement of three base letters:
ABC ABD ABE ACD ACE ADE BCD BCE BDE CDE
67
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 74/202
LECTURE 8. PROBABILITY I: PERMUTATIONS AND COMBINATIONS
Infact, we can use this fact to get to a formula for combinations, since eachcolumn in the previous example is just a rearrangement of r objects, which gives r !rearrangements we want to cancel out:
Definition | The Combination FormulaGiven n distinct objects, the number of combinations, that is, selecting rat a time without regard to order is given by the factorial fraction,
nC r = nP r
r! =
n!
r!(n − r)! (8.3)
Example: Back to the thief Suppose now that there is a glitch in the video recording system, and that
when they use the recognition technology, all it tells the police is whichselection of letters and numbers was used on the fake plate, not what
order they were in. If the police know that a thief has 15 different letteringdecals, how many combinations of (just) the three letters will the thief beable to make?
8.6 Summary
Case by case...
Sensitive Limited Formula Exampleto Order? stocks?
Basic Count-
ing
yes no n1 × n2 × . . . nk Number
plates Permutations yes yes nP r = n!
(n−r)! Letter ar-rangements in Scrabble
Combinations no yes nC r = n!r!(n−r)!
Choosing an executive team
Less Basic no no Assigning non-exclusive jobs Counting to workers
68
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 75/202
Lecture9Probability II: Probability in action
9.1 Introduction
Continuing our two-part look at probability, we now get our teeth into more compli-cated scenarios of probability. In particular, we will be interested to consider what‘makes sense’ when we think about how two, or three, or more events occur in time.Along the way, we’ll notice that the ordering of the events matters sometimes, butnot always; it’s a question of dependence .
Most of our time will be spent drawing and understanding a very useful visual-isation of probability problems known as probability trees. It should be pointedout that there is more than one way of thinking about probability, for example,seeing probability in terms of sets is another helpful one. However, in the interestsof time, and because trees are especially useful for introducing more complicatedtopics like Bayes’ Formula , we’ll stick to the trees!
Agenda
1. Probability by the trees;
2. Rules of probability for independent events;
3. Conditional probability and Bayes’ Formula.
9.2 Probability Trees
Re-introducing Trees
• We looked at Probability Trees last time, as a diagram with levels.
A
B
C
A
1
2
3
1
2
A
A
B
CB
C3
B
C
69
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 76/202
LECTURE 9. PROBABILITY II: PROBABILITY IN ACTION
• Consider drawing cards from a pack, two mutually exclusive events associ-ated with drawing a card are,
Black
P r ( B l
a c k )
Red
P r ( R e d )
By the cards...
• In fact, any number of mutually exclusive events can be represented with atree;
• Consider drawing cards, but this time, focussing on the suit,
♦
P r ( ♦
)
1 3
5 2
♥
P r ( ♥ )
1 3
5 2
♣
P r ( ♣
) 1 3 5
2
♠
P r ( ♠ ) 1 3
5 2
• With a 52 card pack, there are 13 cards of each suit, giving a probability of each event occuring (drawing a card of that suit) equal to 13
52 .
9.3 Rules of Probability
9.3.1 Multiplication
Definition | Multiplication LawIn general, if two events A and B can occur in sequence, then the probability that both events have occurred is the same as asking what the probability that one event occurs, times the probability that the other event occurs, given the first has occurred, or:
Pr (A ∩ B) = Pr (A)Pr (B|A)
= Pr (B)Pr (A|B) .
APr(A)
BPr(B|A)
70
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 77/202
9.3. RULES OF PROBABILITY
Example: Multiplication Law Suppose that the administration of the University of Coogee have beendoing some surveys of the timing of students dropping out of their five-
year degree programs. The results indicate that 25% drop out after firstyear, and then for the subsequent three years, 10%, 8% and 4% of thestudents who stay each year will drop out. Given these data, what is theprobability that a first year student will drop out after 2, 3 and 4 years?
9.3.2 Conditional Probability
HPW 8.5Conditional Probabilities
Often, we have a sequence of events, where the possible outcome of the secondlayer depends on the first layer.
Example: Conditional Probability Given that a card picked from a full deck is red-suited, what is the proba-bility that it is diamond suited?
Definition | Conditional ProbabilityIf two events, A1 and B1 can occur in sequence, then the conditional
probability of event B1 occurring, given that event A1 has occurred, is expressed as,
Pr (B1|A1) = Pr (B1 ∩ A1)
Pr (A1) .
71
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 78/202
LECTURE 9. PROBABILITY II: PROBABILITY IN ACTION
A1
P r ( A
1 )
B1
P r ( B 1 |A 1
)
B2
P r ( B 2 | A
1
)
A2
P r ( A 2 )
B1
P r ( B 1 |A 2
)
B2
P r ( B 2 | A
2 )
9.3.3 Probability Trees
Multiple levels...If there is more than one level, we have some kind of order to the events.
Probabilities given on Probability Trees When drawing Proba-bility Trees, it is conventional to give the conditional probabilityof the event occurring for all branches deeper than the first level.
A
P r ( A
)
C P r ( C
|A )
DP r ( D | A )
B
P r ( B )
E P r ( E
| B )
F P r ( F | B )
Definition | Probability TreeA probability tree shows one or more events that can occur, by using la-bels for each event (the nodes) and branches that indicate allowable paths through the event tree. At each level, the associated probabilities e.g.Pr (A1) . . . Pr (Ak) must:
1. Be mutually exclusive events: no two events can happen simulta-
neously;2. Be exhaustive: the sum of the probabilities given equals 1 (no possible
events are missing).
A1
P r ( A
1 )
B1
P r ( B 1 |A 1
)
B2
P r ( B 2 | A
1 )
A2
P r ( A 2
)
B1
P r ( B 1 |A 2
)
B2
P r ( B 2 | A
2 )
72
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 79/202
9.4. BAYES’ FORMULA
9.3.4 Independant Events
Suppose we were to draw a Probability Tree to represent the flipping of a (fair coin)twice:
H1
P r ( H
1 )
H2
P r ( H 2 | H 1 )
T2
P r ( T 2 | H
1 )
T1
P r ( T 1 )
H2
P r ( H 2 | T 1
)
T2
P r ( T 2 | T
1 )
In this case, we would actually have the scenario that,
Pr(H2|H1) = Pr(H2)
Pr(T2|H1) = Pr(T2)
That is, the order doesn’t matter, or in other words, we are dealing with inde-pendent events:
Definition | Independent EventsSuppose A and B are events with positive probabilities, then if is true that,
Pr (B|A) = Pr (B) or
Pr (A|B) = Pr (A) ,
then A and B are said to be independent events.
Special Multiplication Law Notice, that if A and B are inde-pendent events then we simply have,
Pr (A ∩ B) = Pr (A)Pr (B)
e.g. the probability of getting two heads in a row is just ( 12 )( 1
2 ).
9.4 Bayes’ Formula
HPW 8.7The two-stage problem
Scenario: To study, or not to study...Suppose that a large study is conducted of first-year students studying QAEB. Thepurpose of the study is to investigate if the final examination is a good test of whether students undertake ‘consistent study’ in the course (that is, studying atleast 4 hours outside university hours, every week of session). If results from a post-course questionnaire indicate that 85% of students undertook consistent study, of
whom 81% pass, whilst for the rest (those who don’t undertake consistent study)only 54% pass, then what is the probability that a student selected at random whodid pass actually studied consistently?
73
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 80/202
LECTURE 9. PROBABILITY II: PROBABILITY IN ACTION
• This scenario is one where two-stages are at play;
• More than that, we have a contingent probability as before, but this time,
the unknown is in the first stage.
S
P r ( S )
0. 8 5
P P r ( P
| S )
0. 8 1
F
P r ( F | S )
0 .1 9
N
P r ( N )
0 .1 5 P P r ( P
| N )
0. 5 4
F
P r ( F | N )
0 .4 6
We want:
Pr(S|P) = Prob.(Study and Pass)
Prob.(Pass)
or, as a contingent probability
Pr(S|P) = Pr(S ∩ P)
Pr(P)
with numbers,
Pr(S|P) = (0.85)(0.81)
(0.85)(0.81) + (0.15)(0.54)
• Notice, that this question asks things the other way around to our normalthinking for conditional probability;
• Here, the sequence is ‘backwards’:
1. Rather than: ‘Prob. layer-2 event, given layer-1 event’;
2. We have: ‘Prob. layer-1 event, given layer-2 event’ !
• This has a special name in probability theory ...
Definition | Bayes’ FormulaSuppose A1 . . . An is an exhaustive list of n mutually exclusive events that can occur for a given population S , and B is any event in S such that Pr (B) > 0, then the conditional probability of some Ai, given that event Bhas occurred is given by,
Pr (Ai
|B) =
Pr (Ai)Pr (B|Ai)
Pr (A1)Pr (B|A1) + · · · + Pr (An)Pr (B|An)
, (9.1)
which is the general form of Bayes’ Formula.
74
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 81/202
9.4. BAYES’ FORMULA
Or, in other words...
For Probability Trees, Bayes’ Formula is asking,
Pr(Ai|B j) = The Prob. of a path through Ai to B j
The sum of all Prob.s for paths to B
A1
P r ( A
1 )
B1
P r ( B 1 |A 1
)
B2
P r ( B 2 | A
1 )
A2
P r ( A 2 )
B1
P r ( B 1 |A 2
)
B2
P r ( B 2 | A
2 )
In two-layer problems, this reduces to:
Pr(A1)Pr(B2|A1)
Pr(A1)Pr(B2|A1) + Pr(A2)Pr(B2|A2)
Example: Applying Bayes’ Formula A car manufacturing plant has three car chassis production machines, M1,M2 and M3. For historical reasons, a car rig on the production line has a
0.6, 0.3 and 0.1 probability of going to each machine respectively. If thethree machines add a chassis to a rig without fault with 0.55, 0.60 and 0.30probabilities respectively, what is the probability that a rig with a chassisfault came from M2?
75
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 82/202
LECTURE 9. PROBABILITY II: PROBABILITY IN ACTION
Example: More Bayes’ Formula Suppose that the plant from the previous example restructure their carchassis production line. Now they have just two machines doing 50% of
the work each: M1, which always adds the chassis to the rig without fault,and (the old) M2, which has had a mid-operation check added to it whichis rejecting 5% of the chassis due to early faults, the other 95% go on tothe final stage, where 90% of them are faultless. Given that a completechassis is faultless, what’s the probability it came from M2 now?
76
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 83/202
Lecture10Markov Chains
10.1 Introduction
An important part of the study of probabilities refers to independent trials processes.These processes form the basis of classical probability theory and much of statistics.We know that when a sequence of experiments forms an independent trials process,the possible outcomes for each experiment are the same and occur with the sameprobability. Moreover, knowing the outcomes of previous experiments has no effecton our predictions for the outcomes of the next experiment. Modern probabilitytheory studies experiments for which knowing the previous outcomes has a directimpact on the predictions for future experiments. In principle, for a given sequence
of experiments, all of the past outcomes could influence the predictions for the nextexperiment. For example, this should be the case in predicting a student’s gradeson a sequence of exams in a course.
Agenda
1. Markov chain, definition and characteristics.
2. Markov chain and Game Theory.
10.2 The Basics
HPW 9.3In 1907, Andrei Markov started studying a very important new type of experiments.In these processes, the outcome of a given experiment can affect the outcome of thenext experiment. This type of stochastic process is called a Markov chain.
Definition | Markov ChainA Markov chain is a sequence of trials of an experiment in which the possible outcomes of each trial, which are called states, remain the same
from trial to trial, are finite in number, and have probabilities that depend only upon the outcome of the previous trial.
77
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 84/202
LECTURE 10. MARKOV CHAINS
10.2.1 Employment Example
Example
• Economically active people are either employed, unemployed or self-employed.
• Suppose they are never employed for two periods in a row.
• If they are employed in one period, they are just as likely to be unemployedor self-employed the next period.
• If they are unemployed or self-employed, they have an even chance of being inthe same job state the next period.
• If there is change from unemployment or self-employment, only half of thetime this is a change to an employed status.
Example: The Employment Problem Form a Markov chain with this information. First, identify the system andstates.
Example: The Employment Problem (cont.)Identify the conditional probabilities.
If we collect all this information in a matrix we determine the transition matrix T , which is the same at every stage of the sequence of observations :
CurrentStateNext State SelfEmp Emp Unemp
T =
SelfEmp
EmpUnemp
1/2 1/2 1/4
1/4 0 1/41/4 1/2 1/2
78
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 85/202
10.3. TRANSITIONS, REGULARITY AND STATES
• SelfEmp = Self Employed
• Emp = Employed
• Unemp = Unemployed.
Formally:
• We have a set of states , S = {s1, s2,...,sk}.
• The process starts in one of these states and moves successively from one stateto another.
• Each move is called a step or trial .
10.3 Transitions, Regularity and States
10.3.1 Transition Probabilities
Definition | Transition ProbabilitiesIf the chain is currently in state s j, then it moves to state si at the next step with a probability denoted by tij . This probability does not depend upon which states the chain was in before the current state. The probabilities tij
are called transition probabilities and are all nonnegative. The process can also remain in the state it is in, and this occurs with probability t jj .
Definition | Transition MatrixA transition matrix for a k-state Markov chain is a k×k matrix T = [tij]
in which the entry tij is the probability from one trial to the next, of moving to state i from state j. All entries of the transition matrix are nonnegative and the sum of all entries in each column must be 1 since for each current state, the probabilities account for all possible transitions:
tij = P (next state is i | current state is j).
The entries in the first column of the transition matrix T in the employmentexample above represent the probabilities for the various kinds of employment con-
dition following a self-employment state. Similarly, the entries in the second andthird column represent the probabilities for the various kinds of employment condi-tions following an employed or unemployed state, respectively.
79
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 86/202
LECTURE 10. MARKOV CHAINS
Example:If the person is currently self-employed then what is the probability that heis unemployed two periods from now?
Hint: The equation should remind you of a product of two vectors; we aremultiplying the first row of T with the third column of T . This is just what is donein obtaining the (1, 3)-entry of the product of T with itself.
Definition |Let T be the transition matrix of a Markov chain. The ijth entry tn
ij of the matrix T n gives the probability that the Markov chain, starting in state si,will be in state si after n steps, where:
t2ij =
k
r=1tirtrj ,
for k states.
10.3.2 Regular Markov Chain
Example: The Employment Problem again
Consider again the employment example. We know that the powers of the transition matrix give us interesting information about the process asit evolves. We are particularly interested in the state of the chain after alarge number of steps (say 4 in our case). Calculate T 4.
80
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 87/202
10.3. TRANSITIONS, REGULARITY AND STATES
Example: The Employment Problem again, continued...
Let’s continue calculating until T 6.
CurrentStateNext State SelfEmp Emp Unemp
T 5 =SelfEmpEmpUnemp
0.400 0.400 0.399
0.200 0.199 0.2000.399 0.400 0.400
CurrentStateNext State SelfEmp Emp Unemp
T 6 =SelfEmpEmp
Unemp
0.400 0.400 0.4000.200 0.200 0.200
0.400 0.400 0.400
• Note that after six periods our employment condition predictions are, to three-decimal-place accuracy, independent of the current employment status.
• The probabilities for the three types of employment condition, Self-employed,Employed and Unemployed are 0.4, 0.2, and 0.4 no matter where the chainstarted.
• This is an example of a regular Markov chain. For this type of chain,long-range predictions are independent of the starting state.
Definition | Regular Markov ChainA transition matrix T is regular if there exists an integer power of T for which all entries are strictly positive. A regular Markov chain is a Markov chain whose transition matrix is regular.
10.3.3 State Vector
We now consider the long-term behaviour of a Markov chain when it starts in acertain state. Usually this is done by specifying a particular state as the startingstate. An initial probability distribution, defined on S , specifies the starting state.
81
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 88/202
LECTURE 10. MARKOV CHAINS
State Vector
Suppose that initially all three employment states have the same probability tooccur (1/3). These probabilities are called the initial state probabilities and
are collectively know as the initial distribution. They can be represented by acolumn vector, called the initial state vector, denoted X 0:
X 0 =
1/3
1/31/3
Definition | State VectorThe state vector X n for a k-state Markov chain is a k-entry column vector in which the entry si is the probability of being in state i after the nth
trial or step. Moreover, its entries are non-negative and sum to 1.
If X 0 is a probability vector which represents the initial state of a Markov chain,then we think of the ith component of X 0 as representing the probability that thechain starts in state si.
We consider the question of determining the probability that, given the chain isin state j today, it will be in state i in n steps from now. We denote this probabilityby tn
ij, or collectively T n.
Definition |Let T be the transition matrix of a Markov chain, and let X 0 be the proba-bility vector which represents the starting distribution. Then the probability that the chain is in state si after n steps is the ith entry in the vector
X n = T X n−1 = T nX 0.
Note: If we want to examine the behavior of the chain under the assumptionthat it starts in a certain state si, we simply choose X 0 to be the probability vectorwith the ith entry equal to 1 and all other entries equal to 0.
Example:In our employment example, let initially all three types of employment beequally possible (X 0 =
1/3 1/3 1/3
′). Calculate the distribution
of the states after three periods.
82
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 89/202
10.3. TRANSITIONS, REGULARITY AND STATES
Let’s continue calculating until X 6.
X 5 = T X 4 = T 5
X 0 = 0.402 0.398 0.398
0.199 0.203 0.1990.398 0.398 0.402
1/3
1/31/3
=
0.399 0.200 0.399
′
X 6 = T X 5 = T 6X 0 =
0.400 0.400 0.400
0.200 0.200 0.2000.400 0.400 0.400
1/3
1/31/3
=
0.400 0.200 0.400
′
= Q
We can see that, as the number of trials increase, the entries in the state vectorget closer and closer to the corresponding entries in the vector Q.
Remember that:
Q =
0.400
0.2000.400
which remains unchanged from trial to trial and
T Q = 0.500 0.500 0.250
0.250 0 0.2500.250 0.500 0.500 0.4
0.20.4
= 0.4
0.20.4
= Q.
Q is called a steady-state vector for T , is unique and depends only on T (butnot on the initial state vector X 0).
Example: Finding QHow can we quickly find Q in our example?
Hint: Use
T Q = Q = I Q
T Q − IQ = 0
(T − I ) Q = 0.
83
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 90/202
LECTURE 10. MARKOV CHAINS
Example: Finding Q continued
Steady State Vector Not all Markov chains have a steady-state vector, but if the Markov chain is regular, there exists a unique steady-state vector associated with that Markov chain.
10.4 Markov Chains in Game Theory
There are many cases in which economic decisions are made in situations of conflict,where one party’s actions induces a reaction from others. For example:
• Wage bargaining between employers and unions or duopoly.
• Deciding how much money to invest in research and development; if one firminvests in R&D, can another rival firm decide not to follow?
The mathematical theory of games has been applied to economics to help elucidateproblems of this kind.
So, game theory studies strategic interaction in competitive and cooperativeenvironments because
The best games are not those in which all goes smoothly and steadilytoward a certain conclusion, but those in which the outcome is always indoubt. George B. Leonard
Doubt is the main factor in a famous game called Prisoner’s Dilemma: twosuspects of a crime are held in separate rooms, are interrogated and cannot commu-nicate with each other.
Player 2Player 1 Confess DenyConfessDeny
(4, 4) (1, 5)(5, 1) (2, 2)
• If both deny, each gets two years in prison.
• But if Player 2 confesses, gets only one year in prison if Player 1 denies.
• Player 1 would then get five years in prison.
84
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 91/202
10.4. MARKOV CHAINS IN GAME THEORY
• If Player 1 also confesses, gets four years in prison ⇒ better to confess!
Both then confess and get four years in prison, rather than two if both denied the
crime!
10.4.1 Repeated Games
What happens if this game is played repeatedly? In an Iterative Prisoner’s dilemma,what one player chooses to do is based on what happened in the previous round.Tit-for-Tat is a common strategy, in which one player does what the other one didin the previous round. So, one player is prepared to cooperate, but doesn’t allowthe other one to exploit him!
Iterative Prisoner’s Dilemma
An Iterative Prisoner’s dilemma can be seen as a Markov chain with four states:
• Both players 1 and 2 confess.
• Player 1 confesses but player 2 denies.
• Player 1 denies and player 2 confesses.
• Both players deny.
If they engage in a Tit-for-Tat strategy, the transition matrix is:
Current StateNext State 1 2 3 4
T 1 =
1234
1 0 0 00 0 1 00 1 0 00 0 0 1
Example: Iterative Game Suppose we start with the state 2 (player 1 confesses but player 2 denies).The next round, state 3 will be observed (player 2 confesses but player 1denies). The next round, they will play state 2 again (player 1 confessesbut player 2 denies) and so on. What are the state vectors?
How can one get out of the trap? The solution is a modified version of Tit-forTat, that gives each player, say, 10% chance of cooperating, after the other one has
85
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 92/202
LECTURE 10. MARKOV CHAINS
deviated. The transition matrix becomes then:
Current State
Next State 1 2 3 4
T 1 =
1234
1 0.1 0.1 0.010 0 0.9 0.090 0.9 0 0.090 0 0 0.81
• If both deny (state 4), next round they will keep denying with 0.9 × 0.9 = 0.81probability,
• or player 1 confess and player 2 denies with 0.9 × 0.1 = 0.09 probability,
• or player 2 confess and player 1 denies with 0.1 × 0.9 = 0.09 probability,
• or both confess with 0.1 × 0.1 = 0.01 probability.
86
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 93/202
Lecture11Linear Programming I: Solving
problems in a world of constraints
11.1 Introduction
We move now away from the world of matrix algebra and into the world of linear programming . It is natural to think that this would require us to do some kind of computer programming(!), but this is not the case. In fact the word ‘programming’is an artefact of the historical background of the techniques we’ll be studying ratherthan saying something about our method.
You see, we will be dealing with the very common problem that anyone faces
when they must attempt to maximize (or minimize) some quantity, subject to anumber of constraints. These constraints might include the minimum productionlevel that must be attained, or the maximum number of days that can be worked, orthe limit of what an individual can carry at one time. 1 The reason why this processis called ‘linear programming’ is that for a great many problems, the constraintand ‘success’ equations are linear in nature, and the ‘programming’ bit comes fromthe names given to various war-time schedules of activity that were the outcomeof solving just these kinds of problems during World War II. They called them‘programmes’.
Before jumping straight into the solution method of these problems, we need tospend some time considering equations where the left- and right-hand sides don’t
necessarily equal each other, but instead must be greater-than, less-than, or somecombination of these with ‘equal-to’. These are known as inequalities. We look atthese because they are generally how our constraints will be given. Knowing how todeal with such constraints, we’ll be well-placed to solve bigger linear programmingproblems.
Agenda
1. The business headache!
1An account by Chris Bonnington, expedition leader of the first ascent of the Western Face of Mt Everest, describes how he had to solve exactly our kind of linear programming problem; he had
to get an amount of equipment, provisions and oxygen up the mountain to support his climberswith all kinds of constraints, one of which was the amount that any one climber could carry in asingle load.
87
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 94/202
LECTURE 11. LINEAR PROGRAMMING I: SOLVING PROBLEMS IN A
WORLD OF CONSTRAINTS
2. Introduction to linear programming;
3. Application to The Bean House.
11.2 The Business Headache
Why business isn’t easy!Consider some simple business questions:
• How many items should I produce for sale?
• How many inputs should I order?
• How many people do I need to complete the production?
• How much do I need to pay them?
• Can I afford it??? How much money will I make from sales?
• What if things change???
• ... ?????!!!!
Making some progress
• We don’t need to think of all the questions at once, individually;
• We recognise that the answer to one question will be the input to anotherquestion ...
We are dealing with a system of connected constraints
• The way to deal with this complicated system, is to write down each questionin terms of a mathematical equation – and to put them down as constraintson our production process;
• Then, by looking at all of the constraints together, we will know where ouranswer must be (the feasible region);
• Then we can choose a ‘legal’ answer that best suits our needs.
... easy!
11.3 Introduction to Linear programming
11.3.1 Equations of two variables
HPW 7.1 But first...We need to learn some useful techniques...
• Recall, we are quite familiar with linear equations,
y = mx + c
where y was the dependent variable and x was the independant variable(m and c are the gradient and constant respectively);
88
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 95/202
11.3. INTRODUCTION TO LINEAR PROGRAMMING
• However, suppose that both y and x were dependant variables – let’s callthem x1 and x2 for ease, that is,
C = m1x1 + m2x2
Graphically...Suppose we deal with the equation,
10x1 + 4x2 = 20
We can graph it by rearranging to,
x2 = 5 − 10
4 x1
However, suppose we are dealing with the inequality
10x1 + 4x2 ≤ 20
Then we would graph the region,
x2 ≤ 5 − 10
4 x1
Or, what about,10x1 + 4x2 ≥ 20 ?
Or, in cases where we have greater than or less than (but not equal to), e.g.
10x1 + 4x2 > 20
we use a dotted line to represent the boundary of the region.
11.3.2 Linear inequalities
Definition |A linear inequality involving variables x and y is of the form,
ax + by + c < 0 or,
ax + by + c ≤ 0 or,
ax + by + c > 0 or,ax + by + c ≥ 0
where a, b, and c are constants and a and b can’t both be zero.
• Graphically, there will be a whole region of (x, y) points that satisfy a linearinequality;
• However, by requiring that several linear inequalities must be satisfied, it ispossible to have,
1. No solution;
2. A bounded region of solutions; or
3. Infinite solutions (unbounded).
89
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 96/202
LECTURE 11. LINEAR PROGRAMMING I: SOLVING PROBLEMS IN A
WORLD OF CONSTRAINTS
11.3.3 Systems of linear inequalities
• It is possible to require a number of linear inequalities to be satisfied at thesame time – each contributing a region of points that satisfy a given inequal-ity;
• For example, consider the system,
10x1 + 4x2 ≤ 20
5x1 + 5x2 ≤ 20
• How do we find the region that solves both inequalities?
11.3.4 Graphing the system
Step 1: Rearrange each inequality into y(x) form:
x2 ≤ 5 − (10/4)x1
x2 ≤ 4 − x1
Step 2: Draw the boundary lines as if they were equalities; Step 3: Identify theregion where each is satisfied; Step 4: Find the intersection of those regions (if itexists).
11.4 Linear Programming
HPW 7.2 11.4.1 Terminology
Linear programming
• The equations that we have looked at can be thought of as problem con-
straints – they determine the region within which we are allowed to draw apair of numbers for x1 and x2;
• Often, the problem has some kind of objective function:
Definition | Objective functionAn objective function is a function of some number (e.g. f (x1, x3, x4))or all (e.g. f (x1, x2, . . . , xn) of the problem inputs, that determines the overall value of a particular set of chosen input values. In economics, it is usually a measurement of the net-profit.
• Linear programming is the process we use to find out a set of inputs thatfulfill some problem criteria (e.g. ‘maximize net profits’, ‘minimize total mis-takes’);
• The name comes from schedules (‘programs’) used in WWII.
• The solving process...
90
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 97/202
11.4. LINEAR PROGRAMMING
Start
Constraints
x1
x2
x3
Objectivefunction
f (x1, x2, x3)
The best
solution?
Stop
Yes
No (try again)
11.4.2 Application
Back to the business: The Bean House
• Recall, we have already looked at the feasibility of building The Bean House,in terms of NPV and IRR;
• Deciding that the project is actually feasible, your friend and you have decidedto start the project, but...
• You have a new headache, and your friend has turned to you to figure it out...
The problem...
The Bean House ScenarioYou decide to produce two products: House Pack, and Boutique Blend. However,you need to work out how many of each to make each night. Three things seem toaffect the decision:
1. Because of council restrictions, you only have a total of 800 KW hours of Electricity available each night;
2. Your Raw Beans supplier can only provide 60 kgs of Raw Beans each day;
3. You have orders for at least 10 House Pack per day already due to the demandof other businesses in the area.
How many House Pack and Boutique Blend should you make each night?
Step 1: write down equations
• Let:
x1 = Boutique Blendx2 = House Pack
• (Electricity) It takes 5 KW per Boutique Blend and 14 KW per HousePack (total) to roast them, so:
800 ≥ 5x1 + 14x2 (11.1)
• (Raw Beans) It takes 200 g of Raw Beans per Boutique Blend and 1 kg of Raw Beans per House Pack to make them, so:
60 ≥ 0.2x1 + 1.0x2 (11.2)
• (Minimum House Pack) we must make at least 10 House Packs, so:
x2 ≥ 10 (11.3)
91
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 98/202
LECTURE 11. LINEAR PROGRAMMING I: SOLVING PROBLEMS IN A
WORLD OF CONSTRAINTS
Step 2: see it graphically
1. Electricity
2. Raw Beans
3. Minimum House Pack
4. −→ Feasible region...
Step 3: apply the objective function
Objective function is our net profit:
• Electricity costs $0.20 per KW;
• Raw Beans costs $1.70 per kg;
• Boutique Blends sell for $8.50, House Packs for $18.00;
So our net profit (income - costs):
π(x1, x2) = (8.50x1 + 18.00x2)
−0.20(5x1 + 14x2)
−1.70(0.2x1 + 1.00x2)
Step 3b: back to the plot
• We need to define a profit to draw the line. Try $1,400, $1,300 ...
• What is the ‘best’ solution???
1. Must be in feasible region that...
2. Intersects with the best possible objective function line.
Step 4: solve the maths
• Maximum profit occurs where our Electricity and Min House Pack con-straints intersect;
• So, find (x∗1, x∗2) that represents point of intersection, solve:
(Electricity) 800 = 5x1 + 14x2
(min House Pack) x2 = 10
• Gives:
Boutique Blend (x∗1) = 800 − (14)(10)
5 = 132
House Pack (x∗2) = 10
Net Profit (π) = $1080.10
92
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 99/202
11.4. LINEAR PROGRAMMING
Summing upHow many KW of Electricity will we use? How many kgs of Raw Beans will we
consume (per day)?
0 50 100 1500
10
20
30
40
50
60
70
80
x1 (Boutique Blend)
x 2
( H o u s e
P a c k )
Feasible Area
Constant Profit Lines
Optimal Production
Point
93
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 100/202
LECTURE 11. LINEAR PROGRAMMING I: SOLVING PROBLEMS IN A
WORLD OF CONSTRAINTS
Working Page I – Introductory Examples
Note: This page intentionally left mostly blank so that you can work along with the intro-ductory examples we will do in class. Use pencil if you are unsure!
0 1 2 3 4 5 60
1
2
3
4
5
6
x1
x 2
0 1 2 3 4 5 60
1
2
3
4
5
6
x1
x 2
94
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 101/202
11.4. LINEAR PROGRAMMING
Working Page II – The Bean House
Note: This page intentionally left mostly blank so that you can work along with the The Bean House example we will do in class. Use pencil if you are unsure!
0 50 100 1500
10
20
30
40
50
60
70
80
x1
(Boutique Blend)
x 2
( H o u s e
P a c k )
95
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 102/202
LECTURE 11. LINEAR PROGRAMMING I: SOLVING PROBLEMS IN A
WORLD OF CONSTRAINTS
96
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 103/202
Lecture12Linear Programming II: Dealing with a
Changing World
12.1 Introduction
Last lecture, we introduced the method of linear programming as a useful methodof analysing the business headache. That is, it made sense of seemingly complicatedsets of constraints and profit functions to tell us how we should set things in ourbusiness to achieve the two-fold aim of 1) being feasible – something that is possiblegiven the available technology; and 2) being the best solution to the problem athand.
This time, we’ll look closer at all this LP work. For instance, we’ll look at caseswhere we have not just one best solution, but multiple best solutions. Then,we’ll consider what happens to our business conundrum when things are changedaround us – either because of a change in a constraint due to some kind of suppliershortage (for example), or perhaps the item that we are taking to market experiencesa change in its price. The latter of these effects comes under the ‘changes to theobjective function’ title, and as we’ll see, needs much care to ensure we don’t missa (better) solution for lack of perspective.
Agenda
1. Linear programming’s usual suspects – kinds of solutions;
2. The problem of moving solutions;
3. Looking at the margins – what does a change in an input do to our objectiveanalysis?
12.2 Linear programming usual suspects
HPW
7.2,7.3• Last time, we dealt with constraints, the objective function and put it
together to solve the The Bean House Problem with linear programming;
• However, we have different types of solutions that can arise:
1. Bounded;
97
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 104/202
LECTURE 12. LINEAR PROGRAMMING I I: DEALING WITH A CHANGING
WORLD
2. Unbounded;
3. No feasible solution;
4. A feasible solution;5. Multiple solutions.
• Unbounded case – feasible region infinite;
• Bounded case – feasible region finite;
• Multiple solutions – objective function parallel to a line of constraint;
• No solution – feasible region empty;
Reprise on multiple solutions
How do I know when I have multiple solutions? What are they???
1. Proceed as normal for the problem (as we saw last week, and we’ll do more of today);
2. If, through graphing, or through trial and error of corner solutions, you findthat you have
• An apparently parallel objective function to a constraint line; or
• Two of your corner solutions give rise to the same objective functionresult; then
3. You more than likely have a case of multiple solutions,
4. And, any point along the line joining the two corner solutions willitself be an optimal solution!
12.3 Variations in the LP problem
Recall our The Bean House example from last time. We had optimimum outputs
at (132,10) yielding a profit of $1,080.12.
• What if things change???
• We’ll consider two types of changes;
1. The effect of changing inputs on our profits;
2. When the objective function itself changes, forcing us to reconsider ouroptimal production point.
12.3.1 A Change in the Constraints
A New Power Supply?
98
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 105/202
12.3. VARIATIONS IN THE LP PROBLEM
Example:A new supplier of power has entered the market who is willing supply youwith up to 1000 KW per night (instead of 800 KW per night). What
happens to your profits? What would you be willing to pay in addition tothe usual price for the extra power?
• We find that the new optimum point is the solution to the system:
1000 ≥ 5x1 + 14x2
10 ≤ x2
• Solving we find, x1 = 172 and x2 = 10.
• New profit? ... π(172, 10) = $1, 366.52;
• Notice, that the change in the Electricity constraint was +200 KW and ourprofit has gone up by $286.40.
• How much would we be willing to pay for that extra 200KW of Electricity???
200KW × price/KW + gain in profits = W T P
200 × 0.20 + 286.40 = 326.40
Which leads us to notice the following definition,
Definition | Marginal value of a constraintThe marginal value (also called the shadow price, accounting price,or scarcity value) is the change in the optimal objective (e.g. the profit)that would result from a change in the capacity of the constraint by one unit,all else being left unchanged.
In our case above, we found that the marginal value of one KW of electricityis $286.40/200 = $1.42.
12.3.2 A Change in the Objective Function
The Boutique Coffee Crash...
99
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 106/202
LECTURE 12. LINEAR PROGRAMMING I I: DEALING WITH A CHANGING
WORLD
Example:Suppose (with our new Electricity restriction of 1000 KW) that the price of Boutique Blendfalls progressively from $8.50 to $7.50. And then, continues
to fall progressively by $1 each month, finally bottoming-out at $4.50.What would be the optimum production point (x1, x2) and profit at eachstep along the way (8.50,7.50,6.50,5.50,4.50)?
Recall, we must always check that we haven’t changed the characterof the problem – that is, that we are still working on the correct
binding condition.
0 50 100 150 2000
10
20
30
40
50
60
x1 (Boutique Blend)
x 2
( H o u s e
P a c k )
p1 = $4.50
• In this case, the binding constraint changed from the Electricity constraintline, to the Raw Coffee Bean constraint line;
• If we plotted the Profit at each production point, we would have found:
100
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 107/202
12.3. VARIATIONS IN THE LP PROBLEM
4.0 5.0 6.0 7.0 8.0 9.0 600
700
800
900
1000
1100
1200
1300
1400
P r o f i t ( $ )
p1 (Boutique Blend Price)
Profit point 1 (172,10)
Profit point 2 (72,45)
4.0 5.0 6.0 7.0 8.0 9.0 600
700
800
900
1000
1100
1200
1300
1400
P r o f i t ( $ )
p1 (Boutique Blend Price)
Optimal Profit Path
$6.06
12.3.3 Solution TechniqueSolving it
1. Write down equation that has changed;
2. Re-plot the equation, or objective function (to see the new slope);
3. Decide if the changes causes:
• No change to optimal conditions;
• New optimal conditions;
• No more feasible solution.
4. If a change has occured, recalculate (solve) for the new optimal conditions.
5. Check (especially for objective function changes) by trying out each relevant
corner solution and making sure you have the best one.
LP summary
1. As ever, a picture is very helpful!
2. We can also proceed by identifying corner-solutions, and trying these in each
case to find the optimum;
3. Practice!
101
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 108/202
LECTURE 12. LINEAR PROGRAMMING I I: DEALING WITH A CHANGING
WORLD
Working Page I
Note: This page intentionally left mostly blank so that you can work along with the exam-ples we will do in class. Use pencil if you are unsure!
0 1 2 3 4 5 60
1
2
3
4
5
6
x1
x 2
0 1 2 3 4 5 60
1
2
3
4
5
6
x1
x 2
102
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 109/202
12.3. VARIATIONS IN THE LP PROBLEM
Working Page II – The Bean House
Note: This page intentionally left mostly blank so that you can work along with the The Bean House example we will do in class. Use pencil if you are unsure!
0 50 100 1500
10
20
30
40
50
60
70
80
x1
(Boutique Blend)
x 2
( H o u s e
P a c k )
103
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 110/202
LECTURE 12. LINEAR PROGRAMMING I I: DEALING WITH A CHANGING
WORLD
104
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 111/202
Lecture13
Linear Programming III: Using Solver
13.1 Introduction
In the past two lectures we have seen how to set up a linear programming problemand solve it using the graphical method. The Microsoft Excel program offers us analternative method where the problem can be very quickly solved and if necessaryaltered and sensitivity analysis performed. To illustrate the use of Solver we willuse a question from a past exam paper in ECON1202. (It has been altered slightlyas it was originally required to be done using the graphical method.)
Agenda
1. Setting up linear program problems using Solver;
2. Interpreting the results;
3. Understanding multiple solutions.
105
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 112/202
LECTURE 13. LINEAR PROGRAMMING III: USING SOLVER
13.2 The Problem
Example: REVCO Motor Company
REVCO motor company has two engine-manufacturing plants in Sydney,plants A and B, producing the 2-litre clean burning engine used in theirnew car model. The maximum production capacity of plants A and B are50 engines and 55 engines per month respectively.
• The car engines are sent by road to the 2 car assembly plants of the company, one in Adelaide and one in Melbourne. The transportcosts per engine from plant A in Sydney to Adelaide and Melbourneare $100 and $60 respectively while the transport costs per enginefrom plant B in Sydney to Adelaide and Melbourne are $120 and $70respectively.
• In a given month, the Adelaide car assembly plant requires 40 en-gines while the Melbourne car assembly plant requires 35 engines.In satisfying the engine requirements of the assembly plants in Ade-laide and Melbourne, the objective of the company is to minimise thetransport costs of the engines from Sydney to the 2 assembly plantsin Adelaide and Melbourne. How many engines should be sent toeach plant if cost is to be minimised?
You can try working this out by hand if you like, but let’s try another way. First,we need to set the problem up.
13.2.1 Setting up the Problem
Define the Variables
How do we set up this problem using the least number of variables?
• x = number sent from Plant A to Adelaide.
• y = number sent from Plant A to Melbourne.
• If 40 engines are required in Adelaide then 40 − x engines must come fromPlant B.
• If 35 engines are required in Melbourne then 35 − y engines must come fromPlant B.
106
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 113/202
13.3. USING SOLVER
Objective Function and ConstraintsThe objective function is:
Transport Cost C = 100x + 120(40 − x) + 60y + 70(35 − y)
= 100x + 4800 − 120x + 60y + 2450 − 70y
= −20x − 10y + 7250
The constraints are:
• Capacity of Plant A: x + y ≤ 50
• Capacity of Plant B:
(40
−x) + (35
−y)
≤ 55
−x − y ≤ −20
x + y ≥ 20
• And: x ≥ 0, y ≥ 0.
• Also: x ≤ 40, y ≤ 35.
13.3 Using Solver
Linear Programming by Computer Power
Before setting up the objective function and constraints in Solver, we first need tomake sure that the Solver Add-in is operating. Here’s the process for the MicrosoftOffice 2007 version of Excel. (In earlier Excel versions the steps are slightly different.)
1. Click on the Office button in the top left corner of a new spreadsheet thenselect Excel Options > Add-Ins > Solver Add-in > Go.
2. From the dialog box select the Solver Add-in and OK.
3. If you have never used Add-ins before a configuration process might be neces-sary. Just follow the prompts.
4. Now check that under the Data tab you can see Solver in the Analysis section.
1. The first step in setting up the problem is to guess some start-up values forthe variables x and y. This is similar to choosing a guess value of the objectivefunction in the graphical method.
2. We will choose x = 20, y = 20.
3. We enter the labels x and y in cells A1 and B1 and the values 20 in A2:B2.
4. In C1 we enter the label Cost and the equation for the cost from the iso-objective function in C2. This equation is −20 ∗ A2 − 10 ∗ B2 − 7250.
The result is shown in Screenshot 1.
107
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 114/202
LECTURE 13. LINEAR PROGRAMMING III: USING SOLVER
Screenshot 1:
Note that 6650 is the initial value of Cost resulting from our guess.Now we will enter the constraints.
1. First enter the labels Constraint 1 . . . Constraint 6 in the range A4:A9.
2. Then enter the expressions on the left hand side of each constraint in formulaform using appropriate cell addresses for x and y .
3. For the first two constraints we need x + y so we enter the formula = A2 + B2
The resulting value for the constraint is derived using the initial guess values of 20 and 20.
Screenshot 2:
Continue until all constraints have their appropriate values in the range B4:B9.We will set up the remaining parts of each inequality within the Solver.
Click on Solver at the far right of the Excel ribbon section, with the Data tabselected. We need to enter the target (cost) cell and the cells we are trying to changeas shown in Screenshot 3 and make sure we are minimising cost by selecting Min.
108
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 115/202
13.3. USING SOLVER
Screenshot 3:
Once this is done click on Add to add the remaining parts of the constraints.Screenshot 4 shows how Constraint 2 (x + y ≥ 20) is added. Note the correct sign>= has been chosen and the value 20 entered. Press Add between each additionand OK once all are completed.
Screenshot 4:
Screenshot 5 shows the Solver Parameters dialog box with all information forthe problem added and the problem ready to be solved.
Screenshot 5:
109
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 116/202
LECTURE 13. LINEAR PROGRAMMING III: USING SOLVER
When you select Solve a new dialog box will open (see Screenshot 6). You needto click on the words Answer, Sensitivity and Limits to get these three reports. Inthis case we will also choose to keep the solver solution.
Screenshot 6:
Once you press OK you will find that the solution is shown in your originalspreadsheet. See Screenshot 7.
Screenshot 7:
• Notice that the values of x and y on Sheet 1 are now 40 and 10 and that thecorresponding cost is 6350.
• This represents the optimal solution, i.e. minimum cost of shipping enginesthat satisfies all the constraints.
We will now look at the information provided in the three reports.
• The Answer Report, shown in Screenshot 8, shows the original guess valuesfor x, y and cost and the final ones.
• It also shows which two constraints are binding. In graphical terms this wouldmean which lines are intersecting at the optimal corner point of the feasibleregion.
110
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 117/202
13.3. USING SOLVER
Screenshot 8:
• Notice that there are no slack values for the binding constraints. All theavailable amounts have been used. For Constraint 1 the Slack Value = 0. Thismeans that all the capacity of Plant A is being utilised.
• Looking at Constraint 2 we see that Plant B has 30 units slack or 30 units notutilised.
The second report is called the Sensitivity Report. See Screenshot 9.
Screenshot 9:
111
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 118/202
LECTURE 13. LINEAR PROGRAMMING III: USING SOLVER
• It shows the marginal values of the two binding constraints as being equal to−10.
• Note that on this report they are listed as Lagrange Multipliers. As we will usethat term in another context later in the session it’s best to continue callingthem marginal values here as we did in Lecture 12.
How can we interpret the marginal values?
• The marginal value or -10 for constraint 1 means that if the number of enginesproduced by Plant A was changed from 50 to 51 the minimum cost woulddecrease by $10, all else being equal.
• On the computer it is very easy to check this. Return to the spreadsheet andrun Solver again. This time set the value for Constraint 1 to equal 51 instead
of 50.
Screenshot 10:
When the solution is found we see that the minimum cost on Screenshot 10 hasindeed gone down by 10, from a cost of $6350 using x = 40 and y = 10 to $6340using x = 40 and y = 11.
Now we also need to know how much x and y can vary, with the other variableheld constant, and still meet all the original constraints.
Screenshot 11:
• The third answer report, the Limits Report, shown in Screenshot 11 helpsus to see this.
112
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 119/202
13.4. CHANGING THE OBJECTIVE FUNCTION: MULTIPLE SOLUTIONS
• We see here that x can vary between x = 10 and x = 40, with correspondingcosts of $6950 and $6350. We also see that y can vary between y = 0 andy = 10.
13.4 Changing the Objective Function: Multiple Solu-
tions
Multiple SolutionsWe have just seen that it is easy to change the value of a constraint and run
Solver again to conduct sensitivity analysis. It’s also easy to re-solve the problemwith a new objective function. Imagine that the cost of transport to Adelaidechanges. From Plant A it now costs $110 and from plant B $120 for each engine tobe shipped plus an extra $200 fixed cost.
This changes the objective function to:
Cost = 110x + 120(40 − x) + 60y + 70(35 − y) + 200
= 110x + 4800 − 120x + 60y + 2450 − 70y + 200
= −10x − 10y + 7450
We will run Solver again with the original constraints and guess values of x = 20,y = 20. We also will change the equation in cell C2. What should the new equationbe?
= −10 ∗ A2 − 10 ∗ B2 + 7450
After running Solver if we look at the spreadsheet it seems that the minimum cost
has changed might be as expected .Screenshot 12:
In Screenshot 12 there is a new minimum cost of $6950 with x = 25 and y = 25.However we need to be careful in interpreting this solution.
113
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 120/202
LECTURE 13. LINEAR PROGRAMMING III: USING SOLVER
Screenshot 13:
• When we delve a little deeper we discover that the solution is correct but notunique.
• The answer report (Screenshot 13) now shows that only Constraint 1 is bind-ing.
In a graphical sense we can explain this. The iso-objective line is parallel to thisbinding constraint so we have multiple optimal solutions lying along this line. Thereare many combinations of x and y values that give the minimum cost of $6950.
Screenshot 14:
114
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 121/202
13.5. SUMMARY
• By looking at the Sensitivity Report in Screenshot 14 we also see that onlyConstraint 1 has a Lagrange Multiplier or marginal value.
• This means that any other constraint is free to move by one unit withoutaffecting the minimum cost value, but cost decreases for each extra unit of capacity in Plant A.
How can we tell what some of the other combinations of x and y give the minimumcost? We don’t get much help from the Limits Report in Screenshot 15.
Screenshot 15:
• From this we can only see that cost is higher at x = 0 y = 0.
• However by trying some other values in the spreadsheet as guess values andobserving the value of cell C2 we should be able to find some of the othersolutions which give the minimum cost.
For example, these include x = 35, y = 15 at one end of the scale to x = 40, y = 10at the other. This is one area where a graph is better than Solver as it shows moreinformation about where the multiple solutions lie.
Multiple Solutions and Memory Problems Note that it is alsopossible in this situation for Solver to encounter memory problems when situations such as this occur and not produce an answer report while providing still one solution. You should also be aware of other error messages that may be generated if the target cell values do not converge or the conditions are not linear.
13.5 Summary
Solver Wrap Up
• We have learned how to use a computer technique which can solve many linearprogramming problems efficiently and quickly.
115
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 122/202
LECTURE 13. LINEAR PROGRAMMING III: USING SOLVER
• This method also allows the problem to be modified easy so that differentscenarios can be explored.
• It is important to generate Solver reports and read them carefully.
• We should also be conscious of the limitations that exist, for example wherethere is no feasible solution or multiple ones.
116
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 123/202
Lecture14Differentiation: Responding to Change
14.1 Introduction
So far we have concerned ourselves mostly with functions as mappings (telling usfor a given input, or set of inputs, what the output will be) – drawing them, solvingthem, finding feasible solutions by using them as boundaries – we haven’t necessarilybeen interested in the way that these outputs change in response to changes tothe inputs. This is therefore, a natural topic for us to consider now.
Indeed, the nature of change in the real-world is an ever-present phenomenon.Whether it be changes in fish populations due to over-fishing or pollution, or changesin the birth-rate, or changes in the supply of certain raw materials or finished goods,change is all around us. The trick is, that many of the elements that change areactually inputs to our neatly constructed equations, which aimed at representingcertain processes occurring in the real world. Hence, it becomes necessary to considerwhat a change in an input might do to an output.
Of course, this subject is not at all confined to economics and business inquiry.We owe a great debt on this score to our friends in physics, astronomy and mathe-matics, who for many millennia (OK, about two), have been interested in thinkingabout the cause-effect nexus of change in the world.
In approaching this very large field of inquiry, normally taught as one pillar of the twin pillars of calculus (integration being the other pillar), we shall first askwhat we mean by a derivative? Or rather, what we mean by working out the rate
of change of a function at a given point on the function’s domain. Then, oncewe’re happy about the concept of differentiation, we’ll apply some very useful rulesto a number of functions, with a particular focus on some common economic andbusiness applications. (As always, the last slide/page is well worth taking note of.)
14.2 Limits
HPW
10.1-10.2
-3 -2 -1 0 1 2 3
-3
-2
-1
0
1
2
3
x
f (x)
-3 -2 -1 0 1 2 3
-3
-2
-1
0
1
2
3
x
f (x)
117
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 124/202
LECTURE 14. DIFFERENTIATION: RESPONDING TO CHANGE
Definition | LimitIf f (x) is arbitrarily close to L for x very near, but not exactly equal to a,then the limit L of f (x) as x approaches a is given by,
L = limx→a
f (x) . (14.1)
• Some limits do not exist;
• Rule of thumb: approach from a+, and a−.
• Limits must be finite.
Example:Find the limit at 3 of the function,
f (x) = 4
x2 − 9 .
14.3 Rates of change
14.3.1 The problem
The nature of change
HPW 11.1
• A function describes some output value (the dependent variable), for a giveninput value(s) (the independent variable(s));
• We often would like to know by how much the output is affected by a changein the input;
↑ x −→↑↓???f (x)
• This can be represented by the following,
∆x −→ ∆f (x)
where ∆ just means ‘change in’.
118
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 125/202
14.3. RATES OF CHANGE
The linear case
• For the linear case, this isn’t difficult;
• For some given ∆x we simply measure the ∆f (x) and take the ratio of thetwo,
∆f (x)
∆x =
rise
run
• Importantly, this will be the same, regardless of where we sample from on thefunction.
0 1 2 3 4 5 6 7 8 9 10
0
1
2
3
4
5
6
7
8
9
10
f (x)
x
∆x
∆f (x)
∆x
∆f (x)
But...
For non-linear functions the ratio of output change to input change is different: it depends on where we take our measurements!
0 1 2 3 4 5 6 7 8 9 10
0
1
2
3
4
5
6
7
8
9
10
f (x)
x
∆x
∆f (x) = 0
∆x
∆f (x)
• It would be therefore useful to come up with some way of finding out the rateof change of a function for a given change of an input at a point on thefunction;
• For example: how will my appetite for packets of chips change if I finish eating
my first packet of chips? What about my 12th packet of chips?
• This is the aim of differentiation:
119
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 126/202
LECTURE 14. DIFFERENTIATION: RESPONDING TO CHANGE
Definition | The derivative in wordsFor a given function f (x), the derivative of f (x) expressed as
∆f ∆x , df dx , f ′(x), f (x),
will enable us to compute the rate of change of f (x) with respect to a change in x at a given point in the domain of f (x).
14.3.2 Approximating the solution
• Suppose we wanted to find out the rate of change of the point marked;
• This is the same as trying to find a line that has the same slope right atthat point – the tangent;
• Suppose we approximate this line, by calculating slopes we can computeby:
1. Choosing another point away from ours;
2. Drawing a secant between them;
3. Measuring the slope.
• To get a better approximation we choose another point closer to our pointof interest;
• And continue!
• Eventually, by making our ∆x so small (approaching 0) we will have a verygood approximation of the slope:
f ′(x) = lim∆x→0
f (x0 + ∆x) − f (x0)
∆x
0 1 2 3 4 5 6 7 8 9 10
0
1
2
3
4
5
6
7
8
9
10
f (x)
x
∆x
Definition | The derivative definedThe derivative of a function f (x) at any point x is defined as the limit,
f ′(x) = lim∆x→0
f (x + ∆x)−
f (x)
∆x . (14.2)
120
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 127/202
14.4. DIFFERENTIATION
(x, f (x))
(x + ∆x, f (x + ∆x))
∆x
f (x + ∆x) − f (x)
14.3.3 Applying the approximation
Example:Show that the derivative of f (x) = x2 + x − 4 is 2x + 1.
Example:Find the tangent to the function f (x) = x2 + x − 4 at the point x = 3.
121
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 128/202
LECTURE 14. DIFFERENTIATION: RESPONDING TO CHANGE
14.4 Differentiation
14.4.1 Rules on One Function
HPW 11.2 Definition |Given the following functions of x, the derivative d
dx is the following:
f (x) = k f ′(x) = 0 (k constant )
f (x) = xn f ′(x) = nxn−1 (power-function rule )
which implies,
f (x) = x0, f ′(x) = 0
f (x) = cxn, f ′(x) = cnxn−1
f (x) = cx−n, f ′(x) =−
cnx−n−1
Example:Find the derivative with respect to x of the following functions,
f (x) = −6x−2 g(x) = 2(√
x)3 .
14.4.2 Rules on Multiple Functions
HPW 11.5 Given two functions, f (x) and g(x) we have,
Sum-difference ruled
dx[f (x) ± g(x)] = f ′(x) ± g′(x)
Product ruled
dx[f (x)g(x)] = f (x)g′(x) + g(x)f ′(x)
Quotient rule
d
dx
f (x)
g(x) =
f ′(x)g(x) − g′(x)f (x)
g2(x)
122
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 129/202
14.4. DIFFERENTIATION
Differentiation in the field...
HPW 11.3
• The derivative has so far been talked of in terms of:
– a gradient;
– a tangent; and
– a slope.
• We can also think of it as a rate of change:
By how much will the output change by, for a given change in theinput?
• We can then define two important concepts in business economics since the
rate of change analysis is perfect for their calculation...
Definition | Marginal costIf C (q ) the total cost to produce q units of a good, then the marginal cost
is the change in total cost due to changing production levels by one unit,and is given by,
M C = dC
dq . (14.3)
Definition | Marginal revenueIf R(q ) is the total revenue gained from producing q units of a good, then the marginal revenue is the change in total revenue due to changing production levels by one unit, and is given by,
M R = dR
dq . (14.4)
Example: Sum-difference rule Given the short-run total-cost function,
C = Q3 − 4Q2 + 10Q + 75
find the marginal cost function, that is, the limit of the quotient, dC dQ .
123
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 130/202
LECTURE 14. DIFFERENTIATION: RESPONDING TO CHANGE
Example: Product rule If y = (2x + 3)(3x2), find the derivative y ′(x).
Example: Quotient rule Find the derivative of y (x) = 2x−3
x+1 .
14.4.3 Rules on Functions of Multiple Variables
HPW 11.6 What if we have multiple functions, which are actually nested functions...
Chain rule If we have a function z = f (y), where y is itself a function of anothervariable, y = g(x), then,
dz
dx =
dz
dy
dy
dx
Example: Chain rule (easy)
Given that z = 3y2 and y = 2x + 5, find dzdx .
124
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 131/202
14.4. DIFFERENTIATION
Example: Chain rule (harder)
(Challenge) Find the solution to dzdx if
z(x) = (x2
+ 3x − 2)17
.
The new realm...You are now able to calculate (given the relevant functions):
• The marginal cost (M C = dC dq );
• The marginal revenue (M R = dRdq );
• The marginal propensity to save (M P S = dS dI );
• The marginal propensity to consume (M P C = 1
−M P S );
Practice!
125
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 132/202
LECTURE 14. DIFFERENTIATION: RESPONDING TO CHANGE
126
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 133/202
Lecture15Differentiation II: Tricks and Extensions
15.1 Introduction
We continue our introduction to the nature of change. Last time, we looked at avariety of functions and how we might compute their derivative – an expressionfor the rate of change of the dependent variable in terms of the independent vari-able at a given point. Recall that we arrived at these expressions by applying ourunderstandings of limits to the problem. We took a secant on the function wewere dealing with, and drew this closer and closer to the point of interest, until itwas so close (the distance between our point of interest and the intersection withthe function at some other point) that we could see that the line we were drawingactually made a very good approximation to the tangent to the function at thatpoint – just what we were after.
This time, we will need this apparatus to look at three possibly tricky problemsin differentiation. The first, differentiation of implicit functions, forces us to considerat a deeper level what we are actually doing with our small ‘dee-y, dee-x’ fractionsymbol. In particular, we’ll see that we can treat it like another variable in ourequation, and therefore, solve for it!
In the second problem, we consider the slightly different logarithmic and expo-nential functions in terms of their derivatives (and actually find them to be highlyrelated). Finally, we touch on the seemingly difficult, but actually quite simple areaof multiple derivatives – that is, doing our differentiation work more than onceon the same function. For now, we’ll just see the mechanics of the process, but inthe next lecture, we’ll need this to help us identify the ‘best’ or ‘worst’ point on afunction.
Finally, we look at a very useful (and common) application of differentiation ineconomics, that of the elasticity of demand. We can calculate various elasticities– of supply for example – but we’ll start with demand as it is by far the mostcommon. We’ll see that all of this differentiation work is mightily helpful in crackingthe problem of knowing by how much the demand for a given good will change inresponse to a change in price. You might like to read over this section and thenthink about goods in real-life that are examples of each case. To start you off, thinkabout the (highly topical) demand for automotive fuel (e.g. unleaded petrol) – is it
elastic, inelastic, completely inelastic, or unit elastic in price?
Agenda
127
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 134/202
LECTURE 15. DIFFERENTIATION II: TRICKS AND EXTENSIONS
1. Three problems in differentiation:
problem 1 Implicit functions;
problem 2 Logs and exponentials;
problem 3 Double (triple?) differentiation;
2. Differentiation applied – elasticity.
15.2 Implicit Differentiation
HPW 12.4 15.2.1 Implicit functions
Problem I: when it’s not explicit!
• So far we have strictly dealt with functions of the form (say),
y = f (x) = x3 + 1
where the variable y is explicitly expressed in terms of x;
• However, we may not know the explicit form of y, instead we just have afunction such as,
y(x,a,b) − x3 + 1 = 0
... of course, we can rearrange this, but we will only obtain an implicitfunction for y (things could be lurking in y’s explicit form that we don’t knowabout...)
Definition | An Implicit Function
When an equation is given with one or more variables, where a variable does not appear on the left hand side by itself,
e.g. y + y3 − x = 7
we cannot assume the full form of the equation of that variable, instead,we can only know this form implicitly from the function. The resultant
function for y in terms of x is an implicit function.
Example:Determine whether y is defined explicitly or implicitly in each of the fol-lowing functions:
x2 − y3 + 2 = 0, ln a − (2 − x)2 = y, (y + x)2 − 2y = 4
128
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 135/202
15.3. LOGS AND EXPONENTIALS
15.2.2 Differentiation of implicit functions
Differentiation on an implicit function?
• Because we can’t assume what the explicit form of an equation is, we can’t just rearrange and perform normal differentiation – we may be missing someinternal workings of the variable;
• Instead, we perform the following steps:
1. Differentiate both sides w.r.t. x;
2. Bring dydx terms to one side;
3. Factorise out the dydx part;
4. Rearrange to solve for dydx .
Example:
Find dydx given that,
y3 + 3x2y = 13 .
Be careful when applying ddx to implicit functions:
d
dx y
3
= dy
dx y
2
rather, must apply the chain rule, say on z = f (y):
dz
dx =
dz
dy
dy
dx
that is, if z = [y(x)]3,
dz
dx =
dz
dy
dy
dx
= 3y2.dy
dx
129
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 136/202
LECTURE 15. DIFFERENTIATION II: TRICKS AND EXTENSIONS
15.3 Logs and Exponentials
HPW 12.1,
12.2, 12.5 Problem II: logs & exponentials
• What do we do with functions that don’t fit our normal rules?
• For example,
f (x) = ex ;
is not a normal power function (xa);
• Or, what about,
f (x) = ln x ;
which is not a ‘normal’ function at all?
• Answer: Proceed as normal, with our definition of the derivative...
Example:Show that f ′(x) = ex when f (x) = ex.
Definition
| Derivative of ex
If f (x) = ex then f (x) has the remarkable property that,
f ′(x) = f (x) = ex , (15.1)
more generally, if f (x) = eg(x), then,
f ′(x) = g′(x)eg(x) . (15.2)
The derivative of f (x) = ex IS NOT xex−1!
130
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 137/202
15.3. LOGS AND EXPONENTIALS
Example:Differentiate the following:
ya = e−x
,yb = x peax ,
yc =
e2x + x .
Example:Show that if f (x) = ln x, then f ′(x) = 1
x , using the result that eln x = x.
Definition | The derivative of ln xIf f (x) = ln x then,
f ′(x) = 1
x , (15.3)
and, more generally, if f (x) = ln g(x), then,
f ′(x) = g′(x)
g(x) . (15.4)
Further, if f (x) = loga x then,
f ′
(x) =
1
ln a
1
x . (15.5)
131
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 138/202
LECTURE 15. DIFFERENTIATION II: TRICKS AND EXTENSIONS
Example:Find dy/dt given that y = t3 ln t2.
Example:
Find the derivative w.r.t. x of y = ln 3x
1+x
.
15.4 Higher Order Derivatives
HPW 12.7 Problem III: a derivative of a derivative?
• Sounds tricky, but...
• Finding the derivative of the derivative of f (x) is the same as,
f ′′(x) = d2y
dx2 = f (x)
and can be simply found by:
1. Take the first derivative,
f ′(x) = d
dxf (x)
2. Take the next derivative,
f ′′(x) = d
dxf ′(x)
3. And so on...
• But what does f ′′(x) mean? ... next lecture (!)
132
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 139/202
15.5. ELASTICITY OF DEMAND
Example:
If f (t) = e2t2 +4, find f ′′(t).
15.5 Elasticity of Demand
HPW 12.3Application: elasticity
• We often would like to know, ‘if the price of x changes by $1, then by howmuch will the demand for x change?’
• Trouble is that the units of measurement of price and quantity can vary –so it is hard to get a comparative picture;
• Solution: Calculate the percentage change that results for a 1% change inthe inputs...
Definition | Point Elasticity of f at xIf f (x) is some function, differentiable at x, and f (x) = 0, then we define the elasticity of f w.r.t. x as,
η = x
f (x)f ′(x) (15.6)
• Normally, we are interested in the elasticity of demand – the percentagechange in the quantity demanded (q ) for a 1% change in the price ( p);
Definition |
Point elasticity of demand at pIf the demand in terms of the price for some good is given by q ( p), then the elasticity of demand at point (q, p) is given by,
η(q ) = p
q
dq
dp . (15.7)
• Notes on η(q ):
1. If |η(q )| > 1, then q is elastic at p;
2. If
|η(q )
|= 1, then q is unit elastic at p;
3. If |η(q )| < 1, then q is inelastic at p;
4. If |η(q )| = 0, then q is completely inelastic at p;
133
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 140/202
LECTURE 15. DIFFERENTIATION II: TRICKS AND EXTENSIONS
Example:For a demand function q ( p), explain in words what is meant by the def-initions of elastic, unit elastic, inelastic and completely inelastic at some
point (q, p).
Example:If the demand for coffee is given by the demand equation, q ( p) = 8000 p−1.5,find an expression for the elasticity of demand, and so, approximate thechange in quantity demanded for a 1% increase in price at p = 4.
134
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 141/202
Lecture16Differentiation III: Optimization in one
Variable
16.1 Introduction
After the past two weeks of introducing the various techniques of differentiation(or going over old ground for some) you may be keen to see your new knowledgeapplied to the real world. Not only is differentiation of interest to give us access tomeasurement of ‘rates of change’ (e.g. the speed or acceleration of a car), but withsome insight we can get at a similarly powerful concept – that of optimization.
Optimization is (literally) the process of finding the ‘optimum’. The highest,
the lowest; the maximum, the minimum; the top, the bottom; the ... you get thepicture. It turns out that the work we have done in finding the slope of a function,which is equivalent to, say, finding the gradient of a hill, helps us to identify whenthe ground beneath our feet (figuratively speaking) is flat – and when it is flat, if you think about it for a moment, you know that you have reached a point that is alittle higher, or a little lower, than the surrounding ground. In some cases, it willbe the highest or lowest point for miles into the distance. That is exactly the samelogic we apply to find maxima and minima of functions. However, we need to paysome care to exactly what we have found when we use our new-fangled optimizationmethods – have we found the highest point? ... or perhaps just a bump along theway.
To get our thinking on the ‘practical’ track, we’ll start and finish with our nascentmicro-coffee roasting business, The Bean House , to see if we can help our businesspartner to find the optimum quantity of Boutique Blend packs to produce in orderto yield maximum profits. This is similar in flavour to the work we did in linear programming a few weeks back, but as you’ll see, optimization by differentiationdrills down on the functional form of the problem itself. For now, to the hills!
Agenda
1. A problem of optimization;
2. What can the first-derivative tell us?
3. What can the second-derivative add?
135
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 142/202
LECTURE 16. DIFFERENTIATION III: OPTIMIZATION IN ONE VARIABLE
4. (Excursus on points of inflection);
5. Solving The Bean House ’s profit maximization problem.
Back to The Bean House
Maximum profits?
Times have changed just a little for The Bean House and they have decided tomake just Boutique Blend packs . Your business partner has turned to you to findthe maximum profit conditions. He tells you that there is a major competitor inthe micro-coffee roasting market on campus, giving a price equation (as a functionof Boutique Blend packs you sell in a day) as follows,
p(q ) = 130 − 2q .
Furthermore, he tells you that there are fixed daily costs of $148 (rent, power,water etc.). The question is, how many Boutique Blend packs should The Bean
House make in a day to maximize profits?
16.2 Extrema of Functions
HPW 13.1 Definition | Critical ValueIf f (x) is continuous and there exists some point in the domain of f (x), x0
where f ′(x0) = 0 then x0 is said to be a critical value and the point,(x0, f (x0)) is a critical point.
Definition | Stationary ValueGiven that x0 is a critical value in the domain of the function f (x), then f (x0) is a stationary value of the function f .
y
x
f (x)
136
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 143/202
16.2. EXTREMA OF FUNCTIONS
Example:Find all the critical points of the function,
c(t) = t
t2 + 4 .
16.2.1 Classification by Observation
What kind of critical point?
Definition | Local Maxima (Minima)Given some function f (x) and a point x0 in the domain of f (x), then if f (x0) ≥ (≤)f (x) for all possible values of x in some interval about x0, then f (x) is said to have a local maximum (minimum) or relative maximum
(minimum) around the point x0.
y
x
y
x
y
x
Which leads to a rule of identifying whether a point is a local minimum ormaximum:
Definition | First-derivative test for relative extremaIf the first derivative of a function f (x) at x = x0 is f ′(x) = 0, then the value of the function at (x0, f (x0)), will be
1. A relative maximum if f ′(x) changes sign from positive to nega-tive travelling from the left to the right very near of x0;
2. A relative minimum if f ′(x) changes sign from negative to positivetravelling from the left to the right very near of x0;
3. An inflection point if f ′(x) has the same sign travelling from the left to the right very near of x0.
137
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 144/202
LECTURE 16. DIFFERENTIATION III: OPTIMIZATION IN ONE VARIABLE
Example:Find the nature of the critical values of the function,
y = f (x) = x3
− 12x2
+ 36x + 8 .
16.2.2 Classification by the Second Derivative
HPW 13.4 • To classify relative extrema takes some time with certain functions – seeingwhether the function is larger or smaller to the left and right of a critical value;
• However, we can do the characterisation much faster by noticing that:
• By checking the ‘less than’ or ‘greater than’ of the function to each side of thepoint where the slope is zero, we are asking;
Does the slope of the function change positively or negatively as
it goes through the critical point?
Definition | The Second Derivative TestIf f (x) is a twice differentiable function around some critical value x0, then:
• If f ′′(x0) < 0, x0 is a local maximum point;
• If f ′′(x0) > 0, x0 is a local minumum point; and
• If f ′′(x0) = 0, x0 is ?
Consider the function f (x) = x3 + 2x2. To find any maxima and minima wewould:
1. Derive f ′(x);
2. Solve f ′(x) = 0 for x to obtain critical values;
3. Derive f ′′(x);
4. Find the sign of f ′′(x) at each critical value.
y
x
y
x
y
x
138
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 145/202
16.2. EXTREMA OF FUNCTIONS
Example:
Classify the stationary points of the function f (x) = 1
9 x3
− 1
6 x2
− 2
3 x + 1by using the second derivative test.
! Local vs. global
• Notice that a relative or local maximum can also be the ab-solute or global maximum for the function;
• We distinguish between them...
16.2.3 Concavity & Convexity
• You will hear quite often this classification of local extrema talked about interms of two special words: concavity and convexity... what do they mean?
Definition | Convex & Concave Functions
If f ′′
(x) > 0 for all values of a < x < b then f is said to be convex on the domain (a, b). On the other hand, if f ′′(x) < 0 for all values in the domain,f is said to be concave on the domain (a, b).
139
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 146/202
LECTURE 16. DIFFERENTIATION III: OPTIMIZATION IN ONE VARIABLE
convex concave
x
y
x
y
16.2.4 Points of Inflection
When f ′′(x0) = 0 ...
• What about when f ′′(x) = 0? ... Before, we said ??? !
• Now we can classify such a situation as follows:
Definition | Inflection PointIf f (x) is continuous and twice differentiable about some point x0, then:
– If x0 is a (known) inflection point, f ′′(x0) = 0;
– If f ′′(x0) = 0 and f ′′ changes sign at x0 then x0 is an inflection point for f .
• What does this mean???
• ... f ′′(0) = 0 is a necessary condition for an inflection point, but it is not a
sufficient one.
Note: On Points of Inflection What exactly does the point of inflection mean? You will notice that we got there by the necessary condition that f ′′(x0) = 0. So what is this saying? Recall, that to find the maximum or minimum value of some primitive function f (x) we looked at where the derivative was equal to zero. That is, by solving the equation d
dxf (x) = 0, found the values of x where f reached an extreme value. In
the same way, by applying ddx
to f ′(x) and equating to zero, we are asking, when doesthe function f ′(x) reach an extreme value?. That is, when does the derivative itself attain a maximum or minimum?
In plain terms then, if there is a point where f ′′
(x) = 0, then this is saying that at that point, the slope of the primitive function f (x) has reached a maximum or minimum.So there are two types of inflection points as shown below:
140
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 147/202
16.3. APPLIED TO THE PROBLEM
y
x
f (x) = x3
y
x
g(x) = 11+e−x
y
x
f ′(x) = 3x2
y
x
g′(x) = e−x
(1+e−x)2
On the left, we have the more ‘normal’ type, where the point of inflection coincides with a stationary point ( f ′(x) = 0). Whereas on the right, we have the situation where the point of inflection is telling us that the slope of the primitive function ( g(x)) has reached its peak, to the left and right of x0 = 0 the slope of g(x) is smaller than at
the inflection point ( x0).
Example:Determine whether the function f (x) = x6 has an inflection point at x0 =0.
16.3 Applied to the Problem
HPW 13.6Maximum profits for The Bean House ?
• We have a price equation,
p(q ) = 130 − 2q .
• So total revenue R is,
R(q ) = p.q = (130 − 2q )q = 130q − 2q 2 .
141
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 148/202
LECTURE 16. DIFFERENTIATION III: OPTIMIZATION IN ONE VARIABLE
• We have fixed costs of $148 per day, plus our costs per Boutique Blendpack from last time (electricity , raw beans ), giving a total cost of,
C (q ) = F C + V C = 148 + ((0.20)(5) + (1.70)(0.200))q = 148 + 1.340q .
• So ... total profit (per day) will be,
π(q ) = R − C
= 130q − 2q 2 − (148 + 1.340q )
π(q ) = 128.7q − 2q 2 − 148 .
Example:Given the The Bean House data as above, find the profit maximizingoutput of Boutique Blend packs , and the profits obtained at this point.
142
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 149/202
Lecture17Integral Calculus: Unlocking Economic
Dynamics
17.1 Introduction
In the previous two lectures, we have been interested in finding the rate of change of some function, and we have used this to (for example) identify where some outputis at a maximum or minimum. While this is very useful for a variety of applications,it seems natural to expect that there will be times where rather than having accessto some primitive function describing how an output is affected by an input, we willinstead have observed the rate of change itself, and so wish to find the primitive
function.In fact, this is the other side of the coin of our differentiation work of the pasttwo lectures, and it involves, appropriately enough, finding the antiderivative of a function, or as it is commonly known, the integral. In particular, integration(the process of going from the derivative to its primitive) has a natural applicationwhen we deal with quantities that change over time. That is, as in our first examplebelow, we might observe the birth and death rate of a nation’s population, andwish to determine what the population will actually be at some time point in thefuture. This is exactly the kind of step that integration can deliver – if we can putan equation down for the rate of change of the population, then we should be ableto go back one step to an equation of population at a given time.
Notice the word ‘should’ in the previous sentence. Two things are against us.First, as with differentiation, there are integration rules for some functions, but notall! Second, even if we do have a rule that will give us the primitive function weare after, we still need one more piece of information – a single measurement of theprimitive function at a point in time. For our population example, this will be thepopulation of the country in some year. By using this, we can actually go from ageneral description of the primitive function, to a specific one, which is useful forfurther work. All of which, we will aim to cover presently.
Agenda
1. Why integration?
2. Some rules of integration;
143
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 150/202
LECTURE 17. INTEGRAL CALCULUS: UNLOCKING ECONOMIC
DYNAMICS
3. Incorporating initial conditions;
4. Integration as an area.
17.2 Why Integration?
HPW
14.2–14.5Economic Dynamics?
• Suppose you had collected data from the registry of births and deaths for onearea in Sydney over a year; it suggests that the population had a rate of changeexpressed by
dP
dt = 0.8t−
1
2 .
• However, you would like to know the actual population of Australia in
any given year since 2000;
• We have information in terms of a rate of change, but we want informationin terms of the time path of a variable (the population of Australia);
• This sounds ‘like’ differentiation should be involved but ...
Integral calculus to the rescue...
• Previously, we have been dealing with this situation:
y(x) dy
dx
?
differentiation
• However, now (in terms of our population change example) we are asking thereverse question:
P (t)? dP
dt
integration
Example:Suppose as in our example, we have,
dP
dt = 0.8t−1
2 ,
find an expression for P (t), the population of Australia each year, wheret = 0 is the year 2000.
144
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 151/202
17.3. THE INDEFINITE INTEGRAL
17.3 The Indefinite Integral
17.3.1 Notation
• For the moment, we note that what we are doing is actually finding an ‘anti-derivative of p(t):
Definition | Antiderivative, or “Primitive” FunctionThe antiderivative of some function f (x) is some function whose deriva-tive is f (x). Normally, we use the notation,
F ′(x) = f (x) , (17.1)
where F (x) is the antiderivative of the function f (x).
• For any given function, f (x), there can exist a number of primitives.
– Consider the primitives of f (x) = 3x2. We can have x3, x3+2π, x3−10,....
• In general notation, we can write all the primitives of f (x) = 3x2 as:
F (x) = x3 + c (17.2)
where c is any constant.
Definition | Indefinite IntegralIf F (x) is a primitive of f (x), the indefinite integral of f (x) is denoted:
f (x)dx = F (x) + c (17.3)
where c is any constant.
Definition | The Integral SignSuppose we have some function f (x) and we wish to find the antiderivative(or integral) of f (x), then we would write,
f (x) dx = F (x)+c
integral sign
integrand
variable of integration
constant of integration
where we use the special notation
. . . dx to indicate the antiderivative pro-cedure, with f (x) being the integrand and in this case, x is the variableof integration, yielding the function F (x), plus some constant of inte-gration c.
17.3.2 The Constant of Integration
What’s c about again?
• Recall our population example, we had a strange result when we tried to usereal numbers;
145
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 152/202
LECTURE 17. INTEGRAL CALCULUS: UNLOCKING ECONOMIC
DYNAMICS
• This arises because of the fact that say,
F (x) = 4x + 3 . . . F ′(x) = f (x) = 4
... the constant (3) disappears!
• So when we go back from the derivative, to the primitive function f (x) byintegration, we don’t know the value of any constant, or if it was there atall...
• We can get at the value of c, however, if we have one known point – (x, f (x)),which we can use to solve for c.
• So when we write down an integral, we add the c out of good practice, to befound later, if possible.
Example:
Using the same population example as before, find P (t) if p(t) = 0.8t−1
2
and P (0) = 19.6.
Note: On finding a value for c In the example above we used an initial value, that is,when t = 0 to find our value for c. This is the easiest way to go, if such an initial point is available, because it directly gives you the value for c, as above. However, anyknown (x, f (x)) pair will enable you to solve for c.
17.3.3 Tools of the Trade
Basic rules
Definition | Integration resultsFollowing from corresponding rules of differentiation, we have,
xa dx = 1
a + 1xa+1 + c (a = −1)
1
x dx = ln |x| + c
eax dx = 1
aeax + c (a = 0)
a
x
dx =
1
ln a ax
+ c (a > 0, a = 1)
146
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 153/202
17.3. THE INDEFINITE INTEGRAL
Rules of operation
Definition | Integration rules of operation
(summation)
[f (x) + g(x)] dx =
f (x) dx +
g(x) dx
(multiple)
kf (x) dx = k
f (x) dx
... notice the similarity to the differentiation rules we’ve already covered.
Example:
Find
(x3 − x + 1) dx and
3x2 dx.
Example: All the rules at once Find
5ex − x−2 + 3
x
dx (x = 0).
17.3.4 Techniques of Integration
Definition | Substitution ruleThe integral of f (u)(du
dx ) with respect to the variable x is the integral of f (u)with respect to the variable u:
f (u)
du
dx dx =
f (u) du = F (u) + c (17.4)
which is useful if this situation can be recognised.
147
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 154/202
LECTURE 17. INTEGRAL CALCULUS: UNLOCKING ECONOMIC
DYNAMICS
Example: Substitution rule Find the integral of the function f (x) = 2x(x2 + 1).
Example: The really useful substitution rule! Find 6x2(x3 + 2)99 dx.
17.4 The Definite Integral
HPW 14.7
HPW 14.8
17.4.1 Notation
Being definite!
• So far, we have only considered (with the exception of our population example)integrals of the indefinite kind – only variables were used in place of numbers;
• However, we can actually calculate the value of our integrals, in particular,we often wish to calculate the value of an integral between two values of x inthe domain of f , say b, a where b > a;
• We do this by calculating the difference between F (b) and F (a),
[F (b) + c] − [F (a) + c] = F (b) − F (a)
• Notice, we lose the value of the constant c
Definition | The Definite IntegralTo find the numerical value of an integral
f (x) dx over the interval x =
(a, b), where b > a, we calculate the definite integral written,
b
af (x) dx = F (x)
b
a
= F (b) − F (a) (17.5)
where b and a are the upper limit of integration and lower limit of
integration respectively.
148
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 155/202
17.4. THE DEFINITE INTEGRAL
Example:
Evaluate
5
1 3x2 dx.
Example:
Suppose f (x) = k(1−
ex), find ba
f (x) dx (k is a constant).
17.4.2 As an Area
Integration by another name...
• Look closely again at the definite integral formula, ba
f (x) dx
• Leaving the first part aside for the moment, ‘ b
a ’, consider what the ‘f (x) dx’part is doing: An area of an rectangle is being calculated, having dimensions
A = f (x0) × dx
y
x
• In fact, as we calculate the definite integral b
a f (x) dx we are actually calcu-lating a sum of areas that lie between the function and the x axis betweenpoints b and a;
149
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 156/202
LECTURE 17. INTEGRAL CALCULUS: UNLOCKING ECONOMIC
DYNAMICS
• That’s why (if you squint!), you’ll see that the
b
a
part is like an ‘S’ for Sum!
The definite integral, calculating the area between the function and the x-axis, b
af (x) dx
will give a positive area for regions above the x-axis, but a negative area for regions below the x-axis.
With our area understanding of the definite integral, we have the following:
Definition | Properties of the Definite Integral
ba
f (x) dx = − a
bf (x) dx a
a
f (x) dx = 0
ba
kf (x) dx = k b
af (x) dx c
af (x) dx =
cb
f (x) dx +
ba
f (x) dx
In the last rule, it is assumed a < b < c, that is, we can chop up the area into parts.
Example:
Suppose f (x) = ex/3
−3, evaluate 6−3 f (x) dx and compare it to the
region that lies between the x-axis and f (x) on the interval [−3, 6].
150
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 157/202
Lecture18Differential Equations & Growth I
18.1 Introduction
Last time we introduced the concept of the anti-derivative, otherwise known asthe integral. This opened up to us the area of business dynamics , that is, where weare likely to start with an observation concerning the way a variable changes overtime, and then move to an expression for the value of the variable at a chosen pointin time. In this lecture, we extend these ideas to nibble off a small piece of a verylarge area in economic, engineering and physical mathematics – that of differentialequations.
At this level, we will only consider the first class of such equations, those of first-order, and first-degree. There are, however, many more types of differentialequations, some linear, some non-linear. Again, like we found with our integrationrules, some very smart people have put together tables of differential equations.Thus, we only need to recognise the type of equation and then apply the correct rulefrom the table. We’ll investigate the derivation of a couple of these in this lecturebut most of these derivations are beyond the scope of our course.
So where do differential equations get applied in business? The answer is “al-most everywhere”. The class we look at towards the end of this lecture – that of exponential growth – are so common in economic activity, that they are often re-ferred to as ‘natural growth’ equations. This partly has to do with the way thatbiological populations tend to grow (hence the ‘natural’ bit), but also is about the‘commonness’ of this kind of growth. It comes about where the growth results inmore entities (people, bacteria, firms etc.) that can accomplish further growth! Thatis, each cycle of growth, produces more ability for the population to grow; it buildson itself. Not surprisingly, this kind of growth is very effective. Next time you seesome cheese go mouldy in your home seemingly overnight, you might remember thepower of exponential growth to go from even a seemingly small base to a large (andsmelly, in the case of cheese bacteria), thriving population.
Agenda
1. Integration by another name ... differential equations;
2. Solution method;
3. Application to growth equations: exponential growth.
151
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 158/202
LECTURE 18. DIFFERENTIAL EQUATIONS & GROWTH I
18.2 Differential Equations
HPW 15.5 18.2.1 Notation
Terminology
• Suppose you were faced with the following relationship between x and y ,dy
dx
2
+ y − 4 = 0 ,
• Since we have an equation where a variable enters both ‘plainly’ and as someform of derivative we have a differential equation;
Definition | Differential EquationAn equation where a variable enters as a derivative is called a differential
equation, day
dxa
b
+ ky = c (18.1)
where a and b indicate the order and degree of the equation respectively,and k and c are constants, e.g. a first-order differential equation
of degree 2, is one in which a = 1 and b = 2,dy
dx
2
+ 2y = 4
Example:Consider the equations,
(a)
dy
dx
3
+ 4y = 12 (b) d2y
dt2 − y = 0 ,
what order and degree are these differential equations?
Order? Degree? In this course, we will only consider differential equations of first-order and degree 1. That is, of the form,
dy
dx + ky = c
152
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 159/202
18.2. DIFFERENTIAL EQUATIONS
Definition | Homogeneous CaseGiven some (say) first-order differential equation in general form,
dydx
+ ky = c (18.2)
then if c = 0, we say that (18.2) is an example of the homogeneous case
of differential equations.
18.2.2 Solution Technique
Example:Find the general solution to,
dydx
= xy where y > 0 .
Separation of variables
• Recall how we solved the previous example:
1. From,
dy
dx · · · = . . .
2. To, . . . dy =
. . . dx
• That is, we took it from the dydx form, into a form which could be integrated
on both sides...
• This technique is called ‘separation of variables’ because of the way inwhich we arrange our problem to have each variable separated by the ‘=’ signfor integration.
153
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 160/202
LECTURE 18. DIFFERENTIAL EQUATIONS & GROWTH I
Example:
Solve the equation, dydt + 2y = 6 by using separation of variables.
18.2.3 General and Definite Solutions
Being definite
• Up till now we have left our solutions with a constant in them (either c orA);
• Such a solution is known as a general solution;
• However, just like in integration of last lecture, we can use an initial condi-tion to find a definite solution...
Example:Given the general solution, y = Ae−2t + 3, and initial condition y(0) = 10,
find the definite solution.
Note: Definite vs. Particular Solutions You may also find discussion of a particularsolution of a differential equation. This arises because, as you will have seen, the choice of the constant A (for example) in the above equation is somewhat arbitrary.Any choice of A as a constant will give rise to a solution of the initial differential equation – that is, the particular equation that this choice gives rise to will display dynamics in line with the original differential equation. However, there is one special choice of A that will satisfy an initial condition – when t = 0. This is special, since it will uniquely describe not only the dynamics of the system being analysed, but also,the actual value at a given time of the system itself, due to solving for A with the initial conditions of the system in mind. In this way, we can talk about three kinds of solutions: the general solution,
yg(t) = Ae−2t + 3 ,
a particular solution, where we just choose some A arbitrarily,
y p(t) = 16e−2t + 3 ,
154
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 161/202
18.2. DIFFERENTIAL EQUATIONS
and the special case, where we choose A such that the initial conditions are satisfied,which is the definite solution,
yd(t) = 7e
−2t
+ 3 .
Example:Show that the general solution to the non-homogeneous first-order differ-ential equation, dy
dt + ay = b (y > b/a) is y(t) = Ae−at + ba . (Harder)
Example:Using the result of the previous example and assuming that y(0) = y0,show that the definite solution is y(t) = [y0 − b
a ]e−at + ba .
From the previous two examples, we can now say the following.
Definition | Solution of a Non-homogeneous Differential EquationGiven a first-order non-homogeneous differential equation of the form,
dy
dt + ay(t) = b and y(0) = y0
where a and b are constants, the solution will be given by,
y(t) =
y0 − b
a
e−at +
b
a . (18.3)
By realising that the homogeneous case is where b = 0 we can say the following.
155
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 162/202
LECTURE 18. DIFFERENTIAL EQUATIONS & GROWTH I
Definition | Solution of a Homogeneous Differential EquationGiven a first-order homogeneous differential equation of the form,
dy
dt + ay(t) = 0 and y(0) = y0
where a is a constant, the solution will be given by,
y(t) = y0e−at . (18.4)
Example: Check
Solve (again) the differential equation dydt + 2y = 6 where y (0) = 10.
18.3 Topics in Growth
HPW 15.6 18.3.1 Exponential Growth
Differential Equations & Growth
• The previous work now gives us a new insight into the nature of growth;
• Consider an account that pays interest continuously – by how much does itgrow in an infinitely small time period dt?
• The account value, say V has a rate of growth, that depends on the interestrate r and the amount of money in the account at the time, S , that is,
dS
dt = Sr
... familiar?
Solving,
dS
dt = Sr
∴ 1
S dS = r dt
∴ ln |S | + c1 = rt + c2
∴ S = ert+c = Aert
156
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 163/202
18.3. TOPICS IN GROWTH
Now, in the case of a bank account, the initial condition S (0) is just the initialprincipal placed in the account, P , so:
S (t) = P ert
... our continuously compounded annuity formula!
Definition | The Exponential Growth formA differential equation of the form,
dy
dt = ay(t) , (18.5)
where a is a constant, is an exponential growth equation, having solu-tion,
y(t) = y0eat (18.6)
where y0 is an initial value. The following cases arise:
• If a > 0 we have exponential growth; and
• If a < 0 we have exponential decay.
Growth & Decay...
Consider the equation y(t) = 2e±1
2t. It is either in a growth mode or a decay
one as follows:
y
t
Example:The CIA fact-book1 predicted Australia’s population growth rate in 2006to be 0.85%. Find a general equation for Australia’s population at anygiven time.
157
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 164/202
LECTURE 18. DIFFERENTIAL EQUATIONS & GROWTH I
Example:Using the equation derived from the previous example, find how long itwould take at this rate for Australia’s population to double.
Example:However, the fact-book also says that Australia’s net migration is 3.85migrants per 1000 population per year (2006). Given this fact, re-calculatethe years to double the population of Australia.
158
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 165/202
Lecture19Differential Equations & Growth II
19.1 Introduction
We introduced the concept of growth last lecture. However, despite all the interestthat we can gain from the exponential growth story, the reality is that it has somenot very pleasing properties. The most significant of which is its limit behaviour.As time goes to infinity, we find the exponential curve sky-rocketing off any graphpaper in the world, itself reaching infinite heights. Now while some may think thatthis is true — that populations, stocks, money can grow and grow infinitely — othersbeg to differ!
The more realistic view would suggest that just like money doesn’t grow on
trees, there are limits to growth. Whether in the form of capacity constraints formanufacturing plants (we just can’t get any more inputs out of the ground), or asin-built restraint mechanisms as in yeast growth (they literally begin to die in theirown waste), things eventually reach a limit. So first up, we will study a limitedgrowth equation, and see how it can be used. In the second case, we will round off one more sharp edge to get a possibly even more realistic growth equation.
Of course, we could keep going and going, creating richer and richer models of growth, but for now, it will suffice to cover the main three models. They are relativelysimple, but despite any failings they still describe some situations very well. Thusthey are commonly used in modern commercial and economic calculations. We’lleven attempt to go back to 1788 and see if we can calculate the growth rate of the
recorded Australian population, and along the way, make a bold prediction aboutthe limits to Australia’s population growth!
Agenda
1. Study the exponential growth curve;
2. Correct the limit behaviour – the limited growth curve;
3. A further attempt – the logistic growth curve;
4. Apply to Australian data since 1788!
159
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 166/202
LECTURE 19. DIFFERENTIAL EQUATIONS & GROWTH II
19.2 Limited Growth
HPW 15.6 19.2.1 A Problem of Limits
Limits to Growth?
• Last time, we considered the case of exponential growth, that is, where wehad a growth equation,
dy
dt + ay = b and y(0) = y0
giving an equation with respect to time of,
y(t) =
y0 − b
a
e−at +
b
a .
• What about at t
→ ∞?
Example:
Show that the limit of y(t) =
y0 − ba
eαt + b
a is ba for α < 0 and ∞ for
α > 0.
• The second case of the previous example presents us with a problem: expo-nential growth can be unbounded! ;
• This might be desirable for some situations, but for most, we will want thegrowth to find a natural limit, due to some carrying capacity constraintfor example:
y
t
• What is needed is that the growth rate begins high, but goes to zero as somecapacity level is reached;
• In other words, we need the growth rate to be proportional to the deviationfrom the carrying capacity:
dN
dt = k(M − N (t))
... where M is the carrying capacity, and k is a rate constant.
160
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 167/202
19.2. LIMITED GROWTH
19.2.2 Limiting Exponential Growth
Definition |
Limited GrowthIf the rate of change of some quantity y with time t is given by,
dN
dt = k(M − N (t)) , (19.1)
where M is the growth limit and k is the rate constant, then the quantity will have the limited growth equation of time,
N (t) = M − Ae−kt (19.2)
where A is a constant and A = M − N 0 if N (0) = N 0 is the given initial condition.
Example:By the method of separation of variables, prove the previous definition forlimited growth.
19.2.3 Seeing it Graphically
Examples of limited growth:
y
t
161
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 168/202
LECTURE 19. DIFFERENTIAL EQUATIONS & GROWTH II
Example:Suppose that a government economist works out that Australia’s carryingcapacity is 52 million people. Using the final constant of growth (internal
and migration) from the last lecture, how long will it take for Australia’spopulation to be at 90% of carrying capacity? (Assume current populationis 20 million.)
19.3 Logistic Growth
HPW 15.6 19.3.1 A Problem at the Beginning
A further refinement?
• Consider again the limited growth curve:
y
t
... if this were for population growth, is there still something a bit worryingabout its shape?
• The curve starts with maximum slope! But a population is likely to startoff very slowly and then build in gradient, before slowing under the capacityconstraint.
Building a Better Curve
• We still want the exponential growth component of the dynamics, but we’dlike the capacity constraint to stop growth when p → K , but also to be smallfor small p;
• So... how about taking our exponential growth rate (in terms of populationdynamics),
dp
dt = kpM
− p
M
... and then multiplying by the fraction M − pM ;
162
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 169/202
19.3. LOGISTIC GROWTH
• The growth rate is now the product of the size of the population, and the
difference between the maximum size and the actual size of the population.
19.3.2 Logistic Growth Defined
Definition | Logistic GrowthGiven an equation of dynamics for variable N in terms of t,
dN
dt = kN
M − N
M
(19.3)
we will yield a logistic growth equation of the form,
N (t) = M
1 + Ae−kt (19.4)
where M is the capacity constraint, k is the constant of growth and A is a constant.
Challenge: can you work out how to obtain (19.4) from (19.3)?
Example:Show that for the logistic growth function,
p(t) = M
1 + Ae−kt ,
if p(0) = p0, then A = M
p0 − 1.
Examples of Logistic Growth: changing the rate constant
y
t
19.3.3 Examples of Logistic Growth
Where does logistic growth occur?
163
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 170/202
LECTURE 19. DIFFERENTIAL EQUATIONS & GROWTH II
• Animal growth (including human): from cell division (1,2,4,8,16,32,...) toeventual growth slow-down and full maturity (then shrinking in older age!);
• Population change;
• As a distribution (more on this in session 2), especially in the Logit Distribu-tion (used in Econometrics);
19.3.4 Applied to Australian Population Data
What’s the Limit of Australia’s Population?
• To the data: http://www.abs.gov.au, ‘Australian Historical Population Statis-tics’ (under ‘Population Characteristics’ by title);
• The data:
1. Range: 1788 – 2004;
2. Initial recorded value (1788): 859;
3. Last value (2004): 19,997,785;
• We have the population equation,
p(t) = M
1 + Ae−k(t−t0 )
where A = M p0
−1, and t − t0 adjusts t to get the start-year of our logistic curvecorrect.
• The population data (from the ABS is plotted as black dots);
• An attempt to fit the data follows! (M = 30mil, k = 0.03, p0 = 859, t0 = 1630(why??)) Set t0 = 1788...;
1800 1900 2000 2100 2200 2300 24000
0.5
1
1.5
2
2.5
3
3.5
4x 10
7
t
p ( t )
164
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 171/202
19.3. LOGISTIC GROWTH
Example:With our model fitted above, find the rate of population growth in the year1788.
Summary
• Growth is important in economics and business;
• Different systems will grow in different ways, we can now model three commonones:
1. Exponential growth;
2. Limited (exponential) growth;
3. Logistic growth.
• The last (logistic) seems the most natural (scarcity is our reason for study!),
but it has its critics.
• Keep watching the Australian data – you’ve seen Australia’s carrying capacity (30 million) here first!!
165
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 172/202
LECTURE 19. DIFFERENTIAL EQUATIONS & GROWTH II
19.4 Appendix: An Integration Workout
(From challenge above) Prove that the equation for logistic growth,
dN
dt = kN
M − N
M
yields the following equation with respect to time:
N (t) = M
1 + Ae−kt ?
WARNING! Only look below, after you have tried it yourself!
We have,dN
dt = kN M
−N
M
=
k
M [N (M − N )]
separating variables gives, 1
N (M − N ) dy =
k
M dt
which after integration gives,
1
M ln
N
M − N
+ c1 =
k
M t + c2
(recall, that 1
x(ax + b) dx = −1
b ln
ax + b
x
which can be rearranged (by log-laws) to give,
1
x(ax + b) dx =
1
b ln
x
ax + b
.)
Now, by multiplying both sides by M , and collecting the constants into a singleconstant c, we have,
ln
N
M − N
= kt + c ,
which can be further rearranged (by log laws, again), to give,
ekt+c = N
M − N
∴ N (1 + Aekt) = M Aekt (let A = ec)
∴ N = M Aekt
1 + Aekt .
Finally, we divide the numerator and denominator by Aekt to obtain,
y = M
1
Ae−kt
+ 1
= M
1 + Be−kt
where B is a constant standing in for 1A , which is what we were required to prove.
166
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 173/202
Lecture20Multivariable Calculus: The Partial
Derivative
20.1 Introduction
Up until now you may have been wondering why we have only dealt with (mainly)functions of just one variable (e.g. f (x)). The reason is that this is the simplestcase, and therefore is a good place to begin. However, as you are no doubt aware,much of the useful quantitative work that gets done is on functions of more thanone variable — multivariable functions (e.g. f (x, y)). (In fact, if you can rememberback to linear programming, we were actually dealing with functions of this sort,
but only in very straight-forward, but still useful, ways).What does a function of more than one variable look like? Given the usefulness
to business and economic problems of being able to find the maxima and minimaof functions, can we do the same in the many variable case? In regards to the firstquestions, if the function is just of two-variables then we can make a representationof it in three-dimensional space. But anything more than this, and we don’t reallyhave the means to show it graphically. For the purposes of this course, however,we’ll stick to functions of two-variables. Moreover, the techniques we develop ontwo-variable functions are all applicable to any multivariable functions.
In terms of the second question – about finding maxima and minima — thisrequires us as a first step to be able to deal with rates of change in the multivariable
case. Here, we do a similar thing to what we did in the single variable case, butwe have to make sure we are careful that we are precise about the input/outputrate-effect that we are analysing. Since in this many-variable world, we have morethan one input variable that might cause the output variable to change. Therefore,when we try to look at the slope of the function, we must look at one variable’seffect at a time. This technique is called partial differentiation.
Agenda
1. Functions of two-variables – the third dimension;
2. Analysing slope in 3D – the partial derivative;
3. Applications of the partial derivative;
167
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 174/202
LECTURE 20. MULTIVARIABLE CALCULUS: THE PARTIAL DERIVATIVE
4. Further analysis and methods.
20.2 Functions of two-variables
HPW 17.1 The third-dimension...
• So far, we have dealt (in calculus) with functions of the form,
f (x) , f ′(x), f ′′(x)
• Common to them all is the single independent variable (x);
• What if we have a function of the form,
f (x1, x2) f ′(x1, x2)
• ... What does this kind of function look like?
• ... Is there such a thing as the derivative?
???
• (We need to be careful... what does f ′(·) actually mean in this context?? )
20.2.1 Seeing it Graphically
A second look at linear programming
• Recall our Bean House Linear Programming example from a few lecturesago?
• We had constraints that gave a feasible area which was used with theobjective function to find the optimal solution...
• ... This is an example of a function:
f (x1, x2) . . . π(x1, x2)
• Now in three dimensions...
• Constraints are actually planes;
• The Objective function in this case is also a plane;
• Our
optimal point occured at the corner of the two constraints;
• We found the best payoff to match this point (these are level curves).
168
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 175/202
20.2. FUNCTIONS OF TWO-VARIABLES
x1
x2 z
π(x1, x2)
π1
π2
π∗
The general case
• Suppose we have some function, z = f (x, y)
• Then a point will be (x0, y0, z0) = (x0, y0, f (x0, y0)),
• Or, a plane will be constructed by fixing one axis value:
1. XZ plane: fix y = y0;
2. XY plane: fix z = z0;
3. YZ plane: fix x = x0;
xy
z
xz plane
xy
z
x y p l a
n e
xy
z
yzplane
20.2.2 Derivatives in this ContextHPW 17.2,
17.3What is the slope???
• Can we get some kind of expression for slope in our new function of twovariable?
• What would it look like?
• Recall: slope is normally expressed as,
df
d . . .
... that is, we differentiate with respect to a variable – we are calculatingthe change in the function value, with respect to a change in an inputvariable...
169
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 176/202
LECTURE 20. MULTIVARIABLE CALCULUS: THE PARTIAL DERIVATIVE
• In our new framework, we do just the same thing...
Definition | Partial Derivative
For some function f (x, y), the partial derivative of f with respect to x,expressed as,
δf
δx = f x (20.1)
and for the point (x0, y0) is given by the limit,
f x(x0, y0) = limh→∞
f (x0 + h, y0) − f (x0, y0)
h . (20.2)
The partial derivative with respect to y is given similarly
δf
δy
= f y (20.3)
and found in the same way.
Back to the plot
• Consider our function again, z = f (x, y),
• The partial derivative of f with respect to x at the point (x0, y0) will be the
slope of f in the xz plane.
• Similarly, the partial derivative of f with respect to y at the point (x0, y0)
will be the slope of f in the yz plane.
x
y
z
f x(x0, y0)
x
y
z
f y(x
0, y0)
What does f x tell us?
• The partial derivative, say f x, tells us the answer to the question,
By how much does f vary, for a given change in x all else remaining the same.
• That is, we are analysing the slope of f in one dimension only, keeping other
dimensions fixed.
• This helps to untangle the influences of the many variables on the function f .
170
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 177/202
20.3. THE PARTIAL DERIVATIVE METHOD
20.3 The Partial Derivative Method
20.3.1 First order partial derivatives
Example:Given y = f (x1, x2) = 3x2
1 + x1x2 + 4x22, find f x1
and f x2.
Example:Find f x and f y given that f (x, y) = (2x + 4)(y − 3).
20.3.2 Second order partial derivatives
HPW 17.5Higher order partial derivatives?
• Recall that in differentiation, with one variable, we could calculate,
df
dx ...
d2f
dx2 ...
d3f
dx3 ...
• ... Which was useful to determine the ‘rate of change of the derivative of f ’ –in other words, the ‘acceleration’ or ‘deceleration’ of the change in f ;
• Can we do a similar thing with partial derivatives? What would it mean?
• Suppose we took the partial derivatives of a function f (x, y),
f x and f y
δ(f x)
δx
δ(f x)
δy and δ(f y)
δy
δ(f y)
δx
• Now suppose we took the partial derivatives of each of these.
171
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 178/202
LECTURE 20. MULTIVARIABLE CALCULUS: THE PARTIAL DERIVATIVE
We get FOUR different partial derivatives:
f xx f xy f yy f yx
• What do each of the FOUR partial derivatives mean??
• What does f xx tell us?
– f xx tells us the rate of change of f x with respect to x; or
– f xx tells us by how much the gradient (with respect to x) of f changes,as x is varied.
• What about f xy? (a cross partial derivative or mixed partial deriva-
tive)
– f xy tells us the rate of change of f x with respect to y; or
– f xy tells us by how much the gradient (with respect to x) of f changes,as y is varied.
20.3.3 Seeing it graphically
Higher derivatives: f yx graphically
• We now know about f y – the partial derivative of f , keeping x constant;
• As we take the partial derivative w.r.t. x of f y, we get f yx: it asks, how doesthe gradient of f with respect to y change as x is varied? (green arrow)
x
y
z
172
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 179/202
20.4. METHODS OF PARTIAL DIFFERENTIATION
Example:In the graphical example above, the function is f (x, y) = 2 − (1 − x)2 −(1 − y)2. Show that f xy = f yx = 0. That is, that the partial derivatives
f x and f y do not change as the ‘other’ variable is changed.
Example:Find the second-order partial derivatives of the function z = f (x, y) =x3e−2y.
Don’t be surprised if you keep finding that
f xy = f yx
... a theorem (Young’s theorem) tells us that so long as the twocross-partial derivatives are continuous, the order in which we cal-culate the cross-partial derivative doesn’t matter. ... In this course, we’ll only deal with this kind of function.
20.4 Methods of Partial Differentiation
Further methods in partial differentiation
• Suppose that instead of the situation we have been dealing with z = f (x, y):
zx
y
f
f
• We have the following:
173
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 180/202
LECTURE 20. MULTIVARIABLE CALCULUS: THE PARTIAL DERIVATIVE
zx
yt
f
f
g
h
where z = f (x, y) but also, x = g(t) and y = h(t);
• Here, z is affected by t indirectly, but can we get an expression for δzδt ?
20.4.1 The Chain Rule
HPW 17.6 Definition | Chain-ruleGiven a function z = f (x, y) where x and y are both functions of another variable (or variables), e.g. x = g(t), and y = h(t), then if the functions f ,g and h have continuous partial derivatives, then we have,
δz
δt =
δz
δx
δx
δt +
δz
δy
δy
δt (20.4)
or,δz
δt = f x
δx
δt + f y
δy
δt . (20.5)
Example: Chain rule
Find δzδt given that z (x, y) = x+y
2x2 and x(t) = 2t2 + 1 and y (t) = 3t.
20.4.2 Total Differentials
Getting all the change together...
• In practice, a special application of the chain rule gives us a useful piece of information;
• We ask the question, ‘by how much does z change, given an infinitesimal changein x or y ?’ (given that x and y are a function of something else)
• We can see that (by the chain rule) we have
dz
dt =
δz
δx
dx
dt +
δz
δy
dy
dt
as a first approximation, but we notice that we can take out the common 1
dtfactor, to be left with,
dz = f x dx + f y dy
174
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 181/202
20.4. METHODS OF PARTIAL DIFFERENTIATION
• This is called the total differential of the function z and the process bywhich we got there is total differentiation. (note, the ‘other variable’,here t has disappeared)
Definition | The Total DifferentialGiven a two variable function z = f (x, y), then the total change in z for infinitesimal changes in x and y is given by,
dz = f x dx + f y dy , (20.6)
and is known as the total differential. In general for any number of variables z = f (x1, . . . , xn) the total derivative is given by,
dz = f x1dx 1 + f x2
dx 2 + · · · + f xndx n . (20.7)
Example: Total differentiation Find the total differential of z = 3x2 + xy − 2y3.
Total differential: reprise
• So what can we see in the total differential:
dz = f x dx + f y dy
• We have a summation of the changes to z that occur for a given infinitesimal
change in x or y;• And f x and f y are acting as ‘converters’, to make sure that the tiny changes
in x and y will affect z in the correct quantities.
175
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 182/202
LECTURE 20. MULTIVARIABLE CALCULUS: THE PARTIAL DERIVATIVE
176
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 183/202
Lecture21Multi-variable Optimisation
21.1 Introduction
We now come to our final lecture in calculus. We met last time the partial derivative as a way of finding the rate of change of a function of more than one variable.Further, we could then use the partial derivative to find the total derivative of afunction and so, get at how infinitesimal changes in one of the inputs would changethe output. This time, we use this knowledge, to go one step further and use theidea of multi-variable calculus to perform optimization.
In some ways, this will look very familiar to our optimization problems undernormal single-variable calculus, but in others, we’ll need extra tools. In the firstcase, the first- and second- order conditions that we apply will look very similar, butin the second case – where we have to deal with constraints on where we are allowedto look for maxima or minima – things will get quite a bit more complicated!
In particular, we have to somehow perform our normal optimisation, but at thesame time, ensure that we don’t get off the constraint line. This sounds difficult,but in fact, a device called the Lagrange multiplier will come in very handy. Itshould be pointed out that some of the steps in between in the later cases are notshown, and are not required in this course – we’ll just take the conditions ‘as is’. Forthose interested however, any undergraduate text in calculus will be a good placeto look, most probably under the title of ‘Jacobian’ or ‘Hessian’ matrices. For therest of us, we just need to be able to apply these nice results to find out when (andif) we really are at the top (or bottom) of the hill (or depression).
Agenda
1. Extrema in two-variable functions;
2. First and second order criteria to find them;
3. Dealing with constraints;
4. Applying the technique.
21.2 Unconstrained optimisation
HPW 17.7A natural problem
177
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 184/202
LECTURE 21. MULTI-VARIABLE OPTIMISATION
• Recall, we had a function of two variables where we could find the derivativeswith respect to each input: f x, and f y – the partial derivatives;
• Now, our question will be: how to find the local extrema of these functions?
x
y
z
f x(x0, y0)
x
y
z
f y(x
0, y0)
A natural solution...
• Recall, that for functions of one variable, we solved:
f ′(x) = 0 checking: sign[f ′′(x)]
• We will do the same here since we have:
1. A local maximum or minimum must be a place where,
f x = 0 and f y = 0;
2. The type of extremum will be determined by the sign of d2z. (more onthis later!)
The mechanics...
• Recall our work with differentials and from last lecture, the total differen-tial of the function z = f (x, y):
dz = f x dx + f y dy
• This says that infinitesimal changes in z is affected by infinitesimal changes inx and y with each multiplied by a scaling factor (f x and f y respectively);
• We want the place where, to any infinitesimal change in x or y, dz = 0:
dz = 0 = f x dx + f y dy
• How to we solve this? ... f x = f y = 0.
178
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 185/202
21.2. UNCONSTRAINED OPTIMISATION
21.2.1 First order conditions
Definition | First order necessary condition for f (x, y)Given a function of two variables, f (x, y), a local extremum say (x
0, y
0) must
satisfy the first order necessary conditions for relative extrema,
f x(x0, y0) = 0 and
f y(x0, y0) = 0 .
Example:Find the extreme values of the function,
z = f (x1, x2) = 2x
2
1 + x1x2 + 4x
2
2 .
Example:For the plotted function used previously,
z = f (x, y) = 2 − (x − 1)2 − (y − 1)2 ,
find the location of the local maximum.
21.2.2 Second order conditions
What kind of extremum?
• Recall, that with normal differential equations, to get the kind of extremum,we would apply the second-order condition to the function?
179
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 186/202
LECTURE 21. MULTI-VARIABLE OPTIMISATION
• We do the same here, we want to differentiate the total differential:
dz = f x dx + f y dy
• Which we differentiate by the chain rule, treating each of (f x, f y) as a variable,and each of ( dx, dy) as constants (always an infinitesimal change):
d2z = d( dz) = δ ( dz)
δx dx +
δ ( dz)
δy dy
= δ
δx(f x dx + f y dy) dx +
δ
δy(f x dx + f y dy) dy
= ...
Note: If you were wondering where the rest of the previous derivation ends up, then the following will satisfy you, though this particular derivation is not something we
expect you to be able to reproduce – it is for your general understanding (if you wish!):
d2z = d( dz ) = δ ( dz )
δx dx +
δ ( dz )
δy dy
= δ
δx(f x dx + f y dy ) dx +
δ
δy(f x dx + f y dy ) dy
= (f xx dx + f yx dy ) dx + (f xy dx + f yy dy ) dy
= (f xx( dx )2 + f yx dy dx ) + (f xy dx dy + f yy( dy )2)
= f xx( dx )2 + 2f xy dx dy + f yy( dy )2
Now, you’ll notice that we have a quadratic equation which (like all quadratics) can
only be solved if the discriminant is greater than zero.1 In this case, the discriminant happens to be given by a special matrix representation called the Hessian determinant(or just the ‘Hessian’ for short),
|H | = f xx f xy
f yx f yy.
Like other determinants, it has the value,
|H | = f xxf yy − f xyf yx
which, for symmetric functions (i.e. f xy = f yx, as in our course) will look like,
|H
|= f xxf yy
−f 2xy .
Which must be greater than zero for us to be able to solve our original second deriva-tive, and so this is where the seemingly peculiar part of the sufficient second-ordercondition in the definition below comes from:
|H | > 0 ... ∴ f xxf yy − f 2xy > 0 .
1Recall, that for a quadratic equation of the form,
f (x) = ax2 + bx + c
the solution is given by the quadratic formula,
x = −b±√
b2 − 4ac
2awhere the square-root part (b2 −4ac) is known as the ‘discriminant’, and of course, must be greaterthan zero to have a square-root.
180
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 187/202
21.2. UNCONSTRAINED OPTIMISATION
Definition | Second-order conditions for f (x, y)Given some function of two variables f (x, y), if the first-order necessary condition is satisfied ( f x = f y = 0) at the point (x0, y0) then the second-
order sufficient conditions for a local maximum are,
f xx, f yy < 0 and f xxf yy − f 2xy > 0 , (21.1)
or for a local minimum are,
f xx, f yy > 0 and f xxf yy − f 2xy > 0 . (21.2)
Summary of conditions
We can give a summary of the necessary and sufficient conditions for estab-lishing local maxima and minima of functions of two variables as follows:
Condition Local maximum Local minimum
First-order necessary f x = f y = 0
Second-order sufficient f xx, f yy < 0 f xx, f yy > 0
f xxf yy − f 2xy > 0
Example:Find the extreme value(s) of the function z = f (x, y) = 8x3 + 2xy −3x2 +y2 + 1.
21.2.3 Saddle points
The other case ...
In the previous example, we found that the point (0,0) had f xx < 0 and f yy > 0,thus, not satisfying even the first-order necessary conditions ... what is at (0,0)?
The two second-order partial derivatives going in opposite directions tells us thatthe function (around 0,0) is curving up on one side, and curving down on theother ... a saddle point.
181
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 188/202
LECTURE 21. MULTI-VARIABLE OPTIMISATION
x
y
z
21.3 Constrained optimisation
HPW 17.8 Dealing with constraints...
• Up until now, we have been allowing our search of the function to go any-where ... it has been unconstrained;
• What about the realistic situation where we face a constraint (e.g. a budget-line)?
This will require us to perform constrained optimisation.
x
y
z
21.3.1 Dealing with the constraint I: substitution
By substitution
182
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 189/202
21.3. CONSTRAINED OPTIMISATION
Example:Using the function
z = f (x, y) = 2 − (x − 1)2
− (y − 1)2
,
and the constraint 2 = y + 25 x, find the new optimum point.
The Lagrange Multiplier
• The substitution method will work when:
1. The constraint(s) is(are) relatively simple;
2. The constraint(s) can therefore be re-arranged to perform substitutioninto the objective function.
• However, there will be times when this is not true...
• Enter: The Lagrange Multiplier Method
21.3.2 Dealing with the constraint II: the Lagrange multiplier
• Working with our function,
z = f (x, y) = 2 − (x − 1)2 − (y − 1)2 ,
and the constraint 2 = y + 25 x, suppose we incorporate the constraint in a new
function:
L = f (x,y ,λ) = 2
−(x
−1)2
−(y
−1)2 + λ[2
−(y +
2
5
x)]
• The symbol λ (‘lambda’) is some number, called a Lagrange multiplier;
• Notice the way we have written the constraint; if it is satisfied, then the [ . . . ]term will equal zero;
• Q: How to accomplish this?
• A: By treating λ as a variable, and apply our first-order conditions to L(x,y,λ)... by setting Lλ = 0 we will get the equation,
Lλ = 2 − (y +
2
5 x) = 0
... just what we wanted!
183
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 190/202
LECTURE 21. MULTI-VARIABLE OPTIMISATION
21.3.3 First order conditions
Definition | The Lagrange Multiplier MethodIn general, to optimize a function of two variables, z = f (x, y) subject tothe constraint g(x, y) = c where c is a constant, then we may write the
Lagrangian function as follows,
L = f (x, y) + λ[c − g(x, y)] (21.3)
which give the necessary first-order conditions for extrema as,
Lλ = c − g(x, y) = 0 ,
Lx = f x − λgx = 0 , and
Ly = f y − λgy = 0 .
Example:Check the previous example, using the Lagrange Multiplier method.
Solution method: reprise
• Q: Why can we be so sure that our values for x and y will solve the constrainedproblem?
• A: Because the use of the Lagrangian with the first-order condition ensures
that the constraint is satisfied.
• Check: We had (x∗, y∗) = ( 1.21, 1.52), substitute into the function for [c-g(x,y)],
[c − g(x, y)] = 2 − (y + 2
5x)
= 2 − (1.52 + 2
5(1.21))
= 2 − 2.004 ≈ 0 !
• Recap: By making the special function L (the Lagrangian), taking the partialderivative with respect to λ will ensure that when solved along with the otherfirst-order conditions, our constraint will be satisfied.
184
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 191/202
21.3. CONSTRAINED OPTIMISATION
21.3.4 Second Order Conditions
Which extremum?
Definition | Second-order sufficient conditions, constrained caseThe second-order sufficient conditions for a constrained optimization prob-lem, having Lagrangian,
L = f (x, y) + λ[c − g(x, y)] ,
and partial derivative (bordered Hessian) matrix,
|H | =0 gx gy
gx Lxx Lxy
gy Lyx Lyy
(21.4)
then for each extremum point (x∗, y∗, λ∗):1. If |H | < 0 the point is a local minimum; and
2. If |H | > 0 the point is a local maximum.
Which extremum?
Example:Check the previous example for second-order conditions.
185
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 192/202
LECTURE 21. MULTI-VARIABLE OPTIMISATION
186
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 193/202
Lecture22Applications of Constrained
Optimisation
22.1 Introduction
We have looked at multi-variable optimization, and had an overview of how theLagrange method can be used to solve optimization problems in which there is aconstraint. Far from being merely a mathematical curiosity, the Lagrange methodis extremely prominent in Economics. This is because many situations of interestto economists involve agents (individuals, firms, families, governments, etc.) maxi-mizing subject to constraints. In this lecture, we look at two prominent examples:
i) consumers choose what to consume in order to obtain the highest payoff subjectto being able to afford their consumption bundle, and ii) managers choose the in-put mix that produces the greatest possible output subject to their annual allottedbudget. We then explore what the value of the Lagrange multiplier can tell us. Wefinish up with a preview of more complicated problems that the Lagrange methodcan be used to analyze.
For other examples, as well as practice questions, see Section 17.8 of the HPWtextbook. You may also be interested in Martin Osborne’s math tutorial site thatdeals with Lagrange Multipliers:www.economics.utoronto.ca/osborne/MathTutorial/ILMF.HTM
Agenda
1. Economic Applications
• Utility maximization
• Output maximization
2. An Economic interpretation of Lagrange Multipliers
3. The power of the method: A preview of more complex problems
• Multiple Constraints
• Inequality Constraints
187
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 194/202
LECTURE 22. APPLICATIONS OF CONSTRAINED OPTIMISATION
22.2 Economic Applications
22.2.1 Consumer Behaviour: Utility Maximization
Scenario: Let’s think about China
China has experienced huge economic growth recently, and we are interested in the effects of an increased income on consumption patterns.
• To simplify matters, suppose that individuals only consume two goods: foodand transport.
• x = quantity of food consumed (as measured in, for example kilograms orcalories).
• y = quantity of transportation consumed (as measured in, for example, kilo-meters traveled).
• The individual obtains a particular utility (which you may think of as rep-resenting a level of satisfaction).
The amount of utility obtained is given by the function
U (x, y) = a[x + y] + xy (22.1)
where a ≥ 0 is just some number.
Of course, individuals are constrained in what they can consume by how muchmoney they have to spend, i.e. their budget . If the price of food is px per unit, theprice of transport is py per unit, and the individual has an income of M > 0, thenthe budget constraint is given by:
pxx + pyy = M. (22.2)
In trying to predict how consumption patterns change in response to changesin income, we are going to make the assumption that individuals consume thingsthat give them the highest utility, subject to the budget constraint. That is, theindividual is assumed to face the following problem:
maxx,y
a[x + y] + xy, subject to: pxx + pyy = M
Using previous notation:
f (x, y) = U (x, y)
g(x, y) = pxx + pyy
c = M
The Lagrangian associated with this problem is:
L = f (x, y) + λ[c − g(x, y)]
= a[x + y] + xy + λ[M − ( pxx + pyy)]
188
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 195/202
22.2. ECONOMIC APPLICATIONS
In order to calculate optimal consumption levels for this consumer, we go to thefirst-order conditions:
Lx = 0 : 0x + 1y − pxλ = −aLy = 0 : 1x + 0y − pyλ = −a
Lλ = 0 : pxx + pyy + 0λ = M
The first-order conditions represent a system of linear equations, implying that wecan use our matrix-based techniques for finding the solution.
Specifically, we have:
0 1 − px
1 0 − py
px py 0
xyλ
=
−a−aM
If you solve this correctly, you will find that the solution is:
x∗ = M +( py− px)a2 px
y∗ = M +( px− py)a2 py
,
where we will assume that a is small enough such that these are non-negative.These expressions provide some insight into how prices and incomes influence the
demand for both products. We see that the consumption of both goods increases asincome increases, decreases as it’s own price increases and increases as the price of the other good increases. Does this seem reasonable?
At this point we can ask ‘What is the utility level that maximizing individuals will achieve when their income is M and they face prices px and py?’ . This is simplythe value that their utility function takes when evaluated at the optimal (as opposedto arbitrary) consumption levels.
By plugging in the solutions by ‘brute force’, we end up with:
u(x∗, y∗) = a
M + ( py − px)a
2 px+
M + ( px − py)a
2 py
+
M + ( py − px)a
2 px
M + ( px − py)a
2 py
. (22.3)
Definition | Direct and Indirect Utility FunctionsSince the optimal consumption choices depend on prices and income, we can think of u(x∗, y∗) as being a function of prices and income. Let this
function be denoted V (M, px, py). The function V (M, px, py) is known as the indirect utility function, whereas the underlying function, u(x, y)is known as the direct utility function.
To simplify matters, lets just focus on the case where a = 0. Here we have
V (M, px, py) = M 2
4 px py. (22.4)
Again, this tells us how the maximized level of utility that an individual obtains isrelated to income and prices (when a = 0). This function will help us later on whenwe discuss the interpretation of Lagrange multipliers.
189
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 196/202
LECTURE 22. APPLICATIONS OF CONSTRAINED OPTIMISATION
Second-order conditions
While we have found values of x and y that are candidates for solutions to the
constrained optimization problem, we need to check the second-order conditions toensure that the solution in fact represents a maximum (as opposed to a saddle pointor a minimum).
For this, we need to verify that the determinant of the bordered Hessian matrixis positive:
|H | =
0 gx gy
gx Lxx Lxy
gy Lxy Lyy
> 0?
To start filling in the Hessian, recall that
g(x, y) = pxx + pyy
and that the Lagrangian function is
L = a[x + y] + xy + λ[M − ( pxx + pyy)]
Clearly gx = px and gy = py. The others are not difficult to work out:
Lxx = 0 Lyy = 0 Lxy = 1.
Therefore, we have
|H | =
0 px py
px 0 1 py 1 0
,
which is easily calculated as 2 px py . Since this is greater than zero, the second-ordercondition for a maximum is satisfied.
22.2.2 An Interesting Observation?
We can solve the above problem for different utility functions.
• For example, it is easy to try u = xy, since this corresponds to the case inwhich a = 0.
• Now try u = ln x + ln y,
• and u = x2y2.
You should find that the solution is the same for all three utility functions. What is going on? To explore this, draw the level curves associated with each of thesefunctions.
190
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 197/202
22.2. ECONOMIC APPLICATIONS
22.2.3 Managerial Behaviour: Output Maximization
Production requires capital (K ) and labour (L):
Y (L, K ) = L 12 K 1
2
Capital costs r per unit, and labour costs w per unit
E (L, K ) = wL + rK
Scenario: The Manager’s Problem
As a manager, you are given a budget, B. Your problem is to choose (K, L) so as to produce the most output with this budget.
The problem:
maxL,K
Y (L, K ), subject to: E (L, K ) = B
That is:
maxL,K
L12 K
12 , subject to: wL + rK = B
Using previous notation:
f (L, K ) = Y (L, K ) g(L, K ) = E (L, K ) c = B
The Lagrangian function is:
L = f (L, K ) + λ[c − g(K, L)]
= L12 K
12 + λ[B − (wL + rK )],
and the first-order conditions are:
LL = 0 : 1
2L−
1
2 K 1
2 = λw (22.5)
LK = 0 : 1
2L
12 K −
12 = λr (22.6)
Lλ = 0 : B = wL + rK (22.7)
• An important difference between this system of equations and the previoussystem is that this system is not linear.
• That is, we can not express the system in matrix form.
• Thus, manipulating these equations will require some special attention. Oneway to solve this system is to use the following steps.
First, (22.6)÷(22.5):
L
K =
r
w ⇒ L =
r
wK. (22.8)
191
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 198/202
LECTURE 22. APPLICATIONS OF CONSTRAINED OPTIMISATION
Use this in (22.7):
B = w r
wK + rK
= 2rK.
By simple re-arranging we get that
K ∗ = B
2r,
and by using (22.8), we have
L∗ = B
2w.
It is always important to check that your answers make sense.
• First, if the allowed budget, B, increases what should happen to the optimalinput choices?
• Does this occur?
• What should happen to the optimal amount of capital used when the cost of capital, r , increases?
• What should happen to the optimal amount of labour used when the cost of labour, w, increases?
• Do these occur?• To be thorough, you may also wish to check that, if we were to use the inputs
in the proposed quantities, that the total cost of doing so is exactly B. Is it?
Second-order conditions
While we have found values of capital and labour that are candidates for solutions tothe constrained optimization problem, we need to check the second-order conditionsto ensure that the solution in fact represents a maximum (as opposed to a saddlepoint or a minimum). For this, we need to verify that the determinant of thebordered Hessian matrix is positive:
|H | =
0 gL gK
gL LLL LLK
gK LKL LKK
> 0?
To start filling in the Hessian, recall that
g(L, K ) = wL + rK
and that the Lagrangian function is
L = L12 K
12 + λ[B − (wL + rK )]
Clearly gL = w and gK = r.
192
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 199/202
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 200/202
LECTURE 22. APPLICATIONS OF CONSTRAINED OPTIMISATION
Interpretation
Definition | Economic Meaning of the Lagrange Multiplier
The value of the Lagrange multiplier tells us how much the optimal value of the objective function changes as the constraint changes.In other words, consider the problem of choosing x1 and x2 so as to maximize F (x1, x2) subject to g(x1, x2) = c. Let the solution be x∗1(c) and x∗2(c), with an associated Lagrange multiplier of λ∗. Let the (constrained) maximized value of the objective function be F ∗(c) ≡ F (x∗1(c), x∗2(c)). Then, we have
λ∗ = dF ∗(c)
dc .
To show this, note that from the chain rule we havedF ∗(c)
dc =
∂F
∂x1
dx1
dc +
∂F
∂x2
dx2
dc . (22.9)
From the first-order conditions, we have
∂F
∂x1= λ
∂g
∂x1(22.10)
∂F
∂x2= λ
∂g
∂x2. (22.11)
Substituting these in gives
dF ∗(c)
dc = λ
∂g
∂x1
dx1
dc + λ
∂g
∂x2
dx2
dc (22.12)
= λ
∂g
∂x1
dx1
dc +
∂g
∂x2
dx2
dc
. (22.13)
The term in brackets (by reverse-engineering the chain rule) just describes how muchg changes when c changes. That is, since the constraint requires
g(x∗1(c), x∗2(c)) = c, (22.14)
we can differentiate both sides to get that
∂
∂c{g(x∗1(c), x∗2(c))} = 1. (22.15)
By using the chain rule, the derivative on the left will exactly by the term in bracketsabove. Therefore, we are left with the conclusion that
dF ∗(c)
dc = λ [1] = λ. (22.16)
For instance, if you use the first-order conditions to solve for λ in the outputmaximization problem, you will find that
λ = 1
2
1
wr
12
. (22.17)
194
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 201/202
22.4. THE POWER OF THE METHOD: A PREVIEW
That is, if the manager is given an extra dollar of budget to work with, then theywill be able to produce an extra λ units of output. Notice that λ depends on theinput prices w and r . Does this make sense?
The information provided by the Lagrange multiplier is useful if, for example,you were the CEO of a company that was in charge of overseeing managers indifferent divisions that each each face a problem similar to the one just described.To be concrete, suppose that your company has an office in Singapore and an officein Hong Kong and each location is managed by a local manager. Although the sameproduction technology is used, rent and wage rates differ across the two locations.As the CEO you must decide how to allocate the company’s resources across thesetwo branches. If one location had less expensive rent and wages, then your decisionwould be easy — give all the resources to the place that is cheaper. However, mattersare not as clear if say wages were lower and rents were higher in Singapore. To makethe comparison, you would have to compare the Lagrange multipliers arising from
each manager’s optimization problem and choose to divert resources to the managerwith the higher multiplier. A non-obvious insight arises from (22.17): choose to giveresources to the place in which the product of the wage and rent is the smallest.
Returning to the utility-maximizing consumer, λ is interpreted as measuring howmuch maximized utility increases as income increases. When a = 0 we have that
λ = M
2 · px · py.
We also worked out that
V (M, px, py) = M 2
4 · px · py. (22.18)
Notice that
∂V
∂M =
2 · M
4 · px · py=
M
2 · px · py= λ. (22.19)
22.4 The Power of the Method: A Preview
While perhaps initially daunting, using the Lagrange method to solve constrainedoptimization problems gets much easier with practice. Once you have invested theeffort in understanding the method, it may seem that there must be easier ways of solving these problems (via substitution of the constraint, for example). In some
cases this will be true, however the method presented here is just the tip of theiceberg — the basic method that you have (hopefully) mastered can be applied tomuch larger problems. Covering these extensions in any detail is beyond the scopeof this course, however it is useful to get a sense of just how powerful these (andrelated) methods are.
22.4.1 Multiple Constraints
• So far we have worked with a single constraint. You are quite right in thinkingthat a useful tool will be able to accommodate many constraints simultaneously- the method described above does this with minimal fuss.
• Simply, one extra Lagrange multiplier is added for each additional constraint.The value of the multiplier has the expected interpretation - the change in theoptimized objective function when the associated constraint is slightly relaxed.
195
7/23/2019 Quantitative Analysis for Business & Economics
http://slidepdf.com/reader/full/quantitative-analysis-for-business-economics 202/202
LECTURE 22. APPLICATIONS OF CONSTRAINED OPTIMISATION
• To keep things manageable, we have only worked with objective functions thattake on two arguments (e.g. x and y, or K and L). What would happen if we added an extra constraint to such a problem?
22.4.2 Inequality Constraints
Throughout we have only considered constraints that hold with equality. In manycases this is natural - e.g. if there exists at least one good for which it is always desir-able to have greater quantities of, then choosing quantities to consume to maximizeutility will always require that you spend all of your available resources.1 Similarly,if you are trying to maximize output then you will always spend your entire budgetin purchasing inputs that are to be transformed into output. In these cases, it makessense that we use an equality constraint.
However, even in these cases, the problem we really want to analyze is one in
which there is an inequality constraint. For instance, we want our consumer to beable to spend any amount that they like as long as it is no greater than their availableb d t W d t t t f th t d ll f th i if th