Intro Optimization - University of Utah Economics
Download
Report
Transcript Intro Optimization - University of Utah Economics
Intro Optimization
Constraints
Optimization
Why this is important:
In microeconomics we want to represent the ways that
consumers and producers behave in a way that allows us to
forecast or predict how they might respond to economic
changes (for example – taxes).
The basis of the model of Demand & Supply is linked to the
mathematical issue of constrained optimization.
It might be helpful for you to remember that consumers &
producers really don’t make calculus decisions when they
buy or sell. But the models we develop do work and can
accurately model behavior.
The models are well suited to econometric estimation.
Classic Problem
A farmer has 100 feet of fencing and
wants to build a rectangular enclosure
to maximize area.
What are the optimal dimensions?
Area = XY (Objective Function)
100 = 2X + 2Y (Contraint)
Classical
Via the process of embedding we can
collapse a 2 variable decision problem
into a one variable decision problem.
This eliminates one degree of freedom.
For example, X = 50 – Y.
Area = XY = (50-Y)Y=50Y-Y2
Fence
A = 50Y – Y2
A’ = 50 – 2Y
FOC Y* = 25
A’’ = -2 < 0 Evaluated at Y*
Thus X* = 50 – Y* = 50 – 25 = 25
So the optimal design is to utilize the
fencing and make a square enclosure
Fencing Continued
Now let’s assume the farmer can build
the enclosure along the side of a stream
or existing building.
So the constraint is now something like
100 = 2X + Y
Or Y = 100 – 2X
Or A = XY = X(100-2X) = 100X – 2X2
Fence Continued
A = 100X – 2X2
A’ = 100 – 4X
X* = 25
A’’ = - 4 < 0
So Y* = 100 – 2X* = 50
Now the optimal enclosed region is not
square
Embedding
It may not always be convenient to
embed the constraints into the objective
function to collapse the set of choice
variables.
The Lagrangian method is frequently
used in economics and statistics to
accommodate constrained optimization
problems. (I.E. RLS instead of OLS)
Lagrangian Multiplier
This method is algorithmic which makes
it outstanding for many problems.
Step by step we take our objective
function (eg, f(x,y)) and rewrite any
constraints in the form gi(x,y) = 0
where gi represents the ith constraint.
Lagrangian
We form a new function L(x,y,λ) where
λ is a new variable called the
Lagrangian multiplier. Note we would
have as many λ’s as we would
constraints.
L = f + λg
Now we take derivatives
L(x,y,λ)
We will arrive at a system of equations
which we simultaneously solve,
generating our FOC’s
Lx = 0
Ly = 0
Lλ = 0
Example
Area = XY
Constraint 100 = 2X + 2Y
L = XY + λ(100 – 2X – 2Y)
Lx = Y - 2λ
Ly = X - 2λ
Lλ = 100 – 2X – 2Y
3 Equations 3 Unknowns
Lx = Y - 2λ
=
0
Ly = X - 2λ
=
0
Lλ = 100 – 2X – 2Y
=
0
Solution?
From Eqns 1 and 2 we see X = Y
Substitute in Eqn 3 to get X = Y = 25
What about SOC’s?
This involves finding the principal
minors of a matrix called the bordered
Hessian.
What are principal minors?
Why are they important?
Hessians
Hessians are square matrices comprised
of 2nd order partial derivatives.
When evaluated at critical values we
might be able to determine if a Hessian
matrix has what is called sign
definiteness.
For example, the function x2 + y2 is
always ≥ 0.
x2 + y2
fx = 2x, fy = 2y, fxx = 2,
fxy = 0, and fyy = 2.
Ultimately we want to find
the determinants of the
minors of the Hessian and
the sign patterning
associated with them.
2
0
0
2
For our class
We will deal with easy to solve utility
and production functions which yield
solutions having anticipated SOC’s.
The probability of your having to
calculate the signs of the principal
minors for a problem on the final exam
is P(m) with 0 ≤ P(m) ≤ 0.1
Maple
Maple is a mathematical calculator that
is useful in learning calculus. It can
also solve systems of equations and has
built-in optimizing algorithms.
Although you won’t be able to use
Maple on the final exam, it is a very
good tool to facilitate learning.
Maple
Let’s take a look at some problems
from our textbook and translate them
into the Maple language.
Maple is available for you to use in the
computer lab.
I think Maple (or Mathematica) is also
available at Pantip Plaza!