Review of Probability and Statistics

Download Report

Transcript Review of Probability and Statistics

Optimization
unconstrained and constrained
Calculus part II
Setting-Up Optimization Problems
•
Define the agent’s goal: objective function and
identify the agent’s choice (control) variables
•
Identify restrictions (if any) on the agent’s choices
(constraints). If no constraints exist, then we have
unconstrained minimization or maximization
problems.
If constraints exist, what type?
Equality Constraints (Lagrangian)
Inequality Constraints (Linear Programming)
Mathematically,
Optimize y = f(x1, x2, . . . ,xn)
subject to (s.t.)
gj (x1, x2, . . . ,xn) ≤ bj
or
= bj
j = 1, 2, . . ., m.
or
≥ bj
y = f(x1, x2, . . . ,xn) → objective function
x1, x2, . . . ,xn → set of decision variables (n)
optimize → either maximize or minimize
gi(x1, x2, . . . ,xn) → constraints (m)
Constraints refer to
•
•
•
•
restrictions on resources
legal constraints
environmental constraints
behavioral constraints
Review of Derivatives
•
dy
 f ' ( x)
y=f(x): First-order condition:
dx
2
d y
Second-order condition: dx2  f ' ' ( x)
Constant function:
y  f ( x)  a
f ' ( x)  0
•
•
• Power function:
• Sum of functions:
y  f ( x)  g ( x)
f ' ( x)  baxb 1
dy
 f ' ( x)  g ' ( x)
dx
dy
 f ' ( x) g ( x)  f ( x) g ' ( x)
y  f ( x) g ( x )
dx
• Product rule:
• Quotient rule:
• Chain rule:
y  f ( x)  ax b
f ( x)
y
g ( x)
y  f ( g ( x))
dy f ' ( x) g ( x)  f ( x) g ' ( x)

dx
g ( x)2
dy
 f ' ( g ( x)) g ' ( x)
dx
Unconstrainted Univariate
Maximization Problems: max f(x)
• Solution:
• Derive First Order Condition (FOC): f’(x)=0
• Check Second Order Condition (SOC): f’’(x)<0
• Local vs. global: If more than one point satisfy both
FOC and SOC, evaluate the objective function at
each point to identify the maximum.
Example
PROFIT = -40 + 140Q – 10Q2
Find Q that maximizes profit
Example
PROFIT = -40 + 140Q – 10Q2
Find Q that maximizes profit
dPROFIT
 140 – 20Q = set 0
dQ
Q=7
d 2 PROFIT
- 20 < 0

dQ2
max profit occurs at Q = 7
max profit = -40 + 140(7) – 10(7)2
max profit = $450
Minimization Problems: Min
f(x)
• Solution:
• Derive First Order Condition (FOC): f’(x)=0
• Check Second Order Condition (SOC): f’’(x)>0
• Local vs. global: If more than one point satisfy both
FOC and SOC, evaluate the objective function at
each point to identify the minimum.
Example
COST = 15 - .04Q + .00008Q2
Find Q that minimizes cost
Example
COST = 15 - .04Q + .00008Q2
Find Q that minimizes cost
dCOST -.04 + .00016Q = set 0

dQ
Q = 250
d 2 COST
 .00016 > 0
2
dQ
Minimize cost at Q = 250
min cost = $10
Unconstrained Multivariate
Optimization
•
Max
•
FOC:
•
SOC:
2 y
x 2
y  g ( x, z )
y
x
y
 g x ( x, z )
( x, z ) z 2 ( x, z ) 
 g z ( x, z )
2 y
 g zz ( x, z )  0
z 2
2 y
 g xx ( x, z )  0
2
x
2 y
z

2 y
xz
( x, z )

2 y
zx

( x, z )  0
Example
Find Q1 and Q2 that maximize Profit
PROFIT  60  140Q1  100Q2 10Q12  8Q22  6Q1Q2
Example
PROFIT is a function of the output of two products
(e.g.heating oil and gasoline)
Q1
Q2
PROFIT  60  140Q1  100Q2 10Q12  8Q22  6Q1Q2
dPROFIT
 140 20Q1  6Q2  set 0
dQ1
dPROFIT
 100 16Q2  6Q1  set 0
dQ2
20Q1  6Q2  140
6Q1  16Q2  100
Solve Simultaneously Q1 = 5.77 units
Q2 = 4.08 units
Second-Order Conditions
2
d PROFIT
 20
2
dQ1
d 2 PROFIT
 6
dQ1 dQ2
d 2 PROFIT
 16
2
dQ2
2
 d 2 PROFIT  d 2 PROFIT   d 2 PROFIT 


  
  0
2
2
dQ1
dQ2


  dQ1 dQ2 
(-20)(-16) – (-6)2 > 0
320 – 36 > 0
we have maximized profit.
Constrained Optimization
•
•
•
•
Solution: Lagrangian Multiplier Method
Maximize y = f(x1, x2, x3, …, xn)
s.t. g(x1, x2, x3, …, xn) = b
Solution:
• Set up Lagrangian:
L( x1 , x2 ,...,xn ,  )  f ( x1 , x2 ,...,xn )   g ( x1 , x2 ,...,xn )  b.
• FOC:
Lx1 ( x1, x 2,..., xn,  )  0
...
Lxn ( x1, x 2,..., xn,  )  0
L ( x1, x 2,..., xn,  )  g ( x1, x 2,..., xn)  b  0
Lagrangian Multiplier
• Interpretation of Lagrangian Multiplier λ: the
shadow value of the constrained resource.
o If the constrained resource increases by 1 unit, the
objective function will change by λ units.
Example
2
2
Maximize Profit =  60  140Q1  100Q2 10Q1  8Q2  6Q1Q2
subject to (s.t.) 20Q1 + 40Q2 = 200
Could solve by direct substitution
Note that 20Q1 = 200 – 40Q2 → Q1 = 10 – 2Q2
Maximize Profit =
 60 140(10  2Q2 ) 100Q2 10(10  2Q2) 2  8Q22  6(10  Q2 )Q2
Q2  2.22 units
Q1  5.56 units
Lagrangian Multiplier Method
Formulat eLagrangianFunct ion
L PROFIT  60  140Q1  100Q2  10Q12  8Q22  6Q1Q2
  (20Q1  40Q2  200)
MaximizingL profit Maximizestheprofitfunctionas long as 20Q1  40Q2  200.
Decision variables are Q1 , Q2 , .
dL profit
dQ1
dL profit
dQ2
dL profit
d
 140 20Q1  6Q2  20  set 0
 100 16Q2  6Q1  40  set 0
 (20Q  40Q2  200)  set 0
T herefore,280 40Q1  12Q2  100 6Q1  16Q2 .
or
34Q1  4Q2  180
also
20Q1  40Q2  200
 Q1  5.56 units
Q2  2.22 units
Same answer as before
When Q1  5.56 units and Q2  2.22 units
  .774
 measures thechangein thevalue of theobjectivefunction
resultingfrom a one unit changein thevalue of theconstraint.