1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is...

66
1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes this is the case. Example: Age = Days Alive/365.25 Usually, this is not the case. Example: midterm mark depends on: how much you study how well you study intelligence, etc

Transcript of 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is...

Page 1: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

1

4. Models with MultipleExplanatory Variables

Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X).

Sometimes this is the case. Example: Age = Days Alive/365.25

Usually, this is not the case. Example: midterm mark depends on: how much you study how well you study intelligence, etc

Page 2: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

2

4. Multi Variable Examples:Demand = f( price of good, price of substitutes,

income, price of compliments)

Consumption = f( income, tastes, wages)

Graduation rates = f( tuition, school quality, student quality)

Christmas present satisfaction = f (cost, timing, knowledge of person, presence of card, age, etc.)

Page 3: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

3

4. The Partial DerivativeIt is often impossible analyze ONE variable’s

impact if ALL variables are changing.

Instead, we analyze one variable’s impact, assuming ALL OTHER VARIABLES REMAIN CONSTANT

We do this through the partial derivative.

This chapter uses the partial derivative to expand the topics introduced in chapter 2.

Page 4: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

4

4. Calculus and Applications involving More than One Variable

4.1 Derivatives of Functions of More Than One Variable

4.2 Applications Using Partial Derivatives

4.3 Partial and Total Derivatives

4.4 Unconstrained Optimization

4.5 Constrained Optimization

Page 5: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

5

4.1 Partial DerivativesConsider the function z=f(x,y). As this function

takes into account 3 variables, it must be graphed on a 3-dimensional graph.

A partial derivative calculates the slope of a 2-dimensional “slice” of this 3-dimensional graph.

The partial derivative ∂z/∂x asks how x affects z while y is held constant (ceteris paribus).

Page 6: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

6

4.1 Partial DerivativesIn taking the partial derivative, all other variables

are kept constant and hence treated as constants (the derivative of a constant is 0).

There are a variety of ways to indicate the partial derivative:

1) ∂y/∂x2) ∂f(x,z)/∂x

3) fx(x,z)Note: dy=dx is equivalent to ∂y/∂x if y=f(x); ie: if y

only has x as an explanatory variable.(Therefore often these are used interchangeably

in economic shorthand)

Page 7: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

7

4.1 Partial DerivativesLet y = 2x2+3xz+8z2

∂y/ ∂x = 4x+3z+0∂y/ ∂z = 0+3x+16z

(0’s are dropped)Let y = xln(zx)∂ y/ ∂ x = ln(zx) + zx/zx

= ln(zx) + 1∂ y/ ∂ z = x(1/zx)x

=x/z

Page 8: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

8

4.1 Partial DerivativesLet y = 3x2z+xz3-3z/x2

∂ y/ ∂ z=3x2+3xz2-3/x2

∂ y/ ∂ x=6xz+z3+6z/x3

Try these:

z=ln(2y+x3)

Expenses=sin(a2-ab)+cos(b2-ab)

Page 9: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

9

4.1.1 Higher Partial DerivativesHigher order partial derivates are evaluated

exactly like normal higher order derivatives.It is important, however, to note what variable to

differentiate with respect to:

From before:Let y = 3x2z+xz3-3z/x2

∂ y/ ∂ z=3x2+3xz2-3/x2

∂ 2y/ ∂ z2=6xz∂ 2y/ ∂ z ∂ x=6x+3z2+6/x3

Page 10: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

10

4.1.1 Young’s TheoremFrom before:Let y = 3x2z+xz3-3z/x2

∂ y/ ∂ x=6xz+z3+6z/x3

∂ 2y/ ∂ x2=6z-18z/x4

∂ 2y/ ∂ x ∂ z=6x+3z2+6/x3

Notice that ∂2y/∂x∂z=∂2y/∂z∂xThis is reflected by YOUNG’S THEOREM:

order of differentiation doesn’t matter for higher order partial derivatives

Page 11: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

11

4.2 Applications using Partial Derivatives

As many real-world situations involve many variables, Partial Derivatives can be used to analyze our world, using tools including:

Interpreting coefficients Partial Elasticities Marginal Products

Page 12: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

12

4.2.1 Interpreting Coefficients

Given a function a=f(b,c,d), the dependent variable a is determined by a variety of explanatory variables b, c, and d.

If all dependent variables change at once, it is hard to determine if one dependent variables has a positive or negative effect on a.

A partial derivative, such as ∂ a/ ∂ c, asks how one explanatory variable (c), affects the dependent variable, a, HOLDING ALL OTHER DEPENDENT VARIABLES CONSTANT (ceteris paribus)

Page 13: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

13

4.2.1 Interpreting Coefficients

A second derivative with respect to the same variable discusses curvature.

A second cross partial derivative asks how the impact of one explanatory variable changes as another explanatory variable changes.

Ie: If Happiness = f(food, tv),∂ 2h/ ∂ f ∂tv asks how watching more tv affects

food’s effect on happiness (or how food affects tv’s effect on happiness). For example, watching TV may not increase happiness if someone is hungry.

Page 14: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

14

4.2.1 Corn ExampleConsider the following formula for corn

production:

Corn = 500+100Rain-Rain2+50Scare*Fertilizer

Corn = bushels of cornRain = centimeters of rainScare=number of scarecrowsFertilizer = tonnes of fertilizer

Explain this formula

Page 15: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

15

4.2.1 Corny Example

1) Intercept = 500

-if it doesn’t rain, there are no scarecrows and no fertilizer, the farmer will harvest 500 bushels

2) ∂Corn/∂Rain=100-2Rain

-each additional cm of rain changes corn production by 100-2Rain-positive impact if rain < 50 cm-negative impact if rain > 50 cm

Page 16: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

16

4.2.1 Corny Example

3) ∂2Corn/∂Rain2=-2<0, (concave)

-More rain has a DECREASING impact on the corn harvest

-More rain DECREASES rain’s impact on the corn harvest by 2

4) ∂Corn/∂Scare=50Fertilizer

-More scarecrows will increase the harvest 50 for every tonne of fertilizer

-if no fertilizer is used, scarecrows are useless

Page 17: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

17

4.2.1 Corny Example

5) ∂ 2Corn/∂Scare2=0 (straight line, no curvature)

-Additional scarecrows have a CONSTANT impact on corn’s harvest

6) ∂ 2Corn/∂Scare∂Fertilizer=50

-Additional fertilizer increases scarecrow’s impact on the corn harvest by 50

Page 18: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

18

4.2.1 Corny Example

7) ∂Corn/∂Fertilizer=50Scare

-More fertilizer will increase the harvest 50 for every scarecrow

-if no scarecrows are used, fertilizer is useless

8) ∂ 2Corn/∂Fertilizer2=0, (straight line)

-Additional fertilizer has a CONSTANT impact on corn’s harvest

Page 19: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

19

4.2.1 Corny Example

9) ∂ 2Corn/∂Fertilizer ∂Scare =50

-Additional scarecrows increase fertilizer’s impact on the corn harvest by 50

Page 20: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

20

4.2.1 Demand ExampleConsider the demand formula:

Q = β1 + β2 Pown + β3 Psub + β4 INC(Quantity demanded depends on a product’s own

price, price of substitutes, and income.)

Here ∂ Q/ ∂ Pown= β2 = the impact on quantity when the product’s price changes

Here ∂ Q/ ∂ Psub= β3 = the impact on quantity when the substitute’s price changes

Here ∂ Q/ ∂ INC= β4 = the impact on quantity when income changes

Page 21: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

21

4.2.3 Partial Elasticities

Furthermore, partial elasticities can also be calculated using partial derivatives:

Own-Price Elasticity = ∂ Q/ ∂ Pown(Pown/Q)

= β2(Pown/Q)

Cross-Price Elasticity = ∂ Q/ ∂ Psub(Psub/Q)

= β3(Psub/Q)

Income Elasticity = ∂ Q/ ∂ INC(INC/Q)

= β4(INC/Q)

Page 22: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

22

4.2.2 Cobb-Douglas Production Function

A favorite function of economists is the Cobb-Douglas Production Function of the form

Q=aLbKcOf

Where L=labour, K=Capital, and O=Other (education, technology, government, etc.)

This is an attractive function because if b+c+f=1, the demand function is homogeneous of degree 1. (Doubling all inputs doubles outputs…a happy concept)

Page 23: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

23

4.2.2 Cobb-Douglas UniversityConsider a production function for university

degrees:

Q=aLbKcAf

Where

L=Labour (ie: professors), K=Capital (ie: classrooms)A=Administration

Page 24: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

24

4.2.2 Average and Marginal ProductsFinding partial derivatives:

∂ Q/ ∂ L =abLb-1KcAf

=b(aLbKcAf)/L

=b(Q/L)

=b* average product of labour

-in other words, adding an additional professor will contribute a fraction of the average product of each current professor

-this partial derivative gives us the MARGINAL PRODUCT of labour

Page 25: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

25

4.2.2 Cobb-Douglas ProfessorsFor example, if 20 professors are employed by

the department, and 500 students graduate yearly, and b=0.5:

∂ Q/ ∂ L =0.5(500/20)

=12.5

Ie: Hiring another professor will graduate 12.5 more students. The marginal product of professors is 12.5

Page 26: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

26

4.2.2 Marginal ProductConsider the function Q=f(L,K,O)

The partial derivative reveals the MARGINAL PRODUCT of a factor, or incremental effect on output that a factor can have when all other factors are held constant.

∂ Q/ ∂ L=Marginal Product of Labour (MPL)

∂ Q/ ∂ K=Marginal Product of Capital (MPK)

∂ Q/ ∂ O=Marginal Product of Other (MPO)

Page 27: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

27

4.2.2 Cobb-Douglas ElasticitiesSince the “Labor Elasticity” (LE) is defined as:

LE = ∂ Q/ ∂ L(L/Q)

We can find thatLE =b(Q/L)(L/Q)

=b

The partial elasticity with respect to labor is b.The partial elasticity with respect to capital is cThe partial elasticity with respect to other is f

Page 28: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

28

4.2.2 Logs and CobbsWe can highlight elasticities by using logs:

Q=aLbKcCf

Converts to

Ln(Q)=ln(a)+bln(L)+cln(k)+fln(C)

We now find that:LE= ∂ ln(Q)/ ∂ ln(L)=b

Using logs, elasticities more apparent.

Page 29: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

29

4.2.2 Logs and Demand

Consider a log-log demand example:

Ln(Qdx)=ln(β1) +β2 ln(Px)+ β3 ln(Py)+ β4 ln(I)

We now find that:

Own Price Elasticity = β2

Cross-Price Elasticity = β3

Income Elasticity = β4

Page 30: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

30

4.2.2 ilogsConsidering the demand for the ipad, assume:

Ln(Qdipad)=2.7 -1ln(Pipad)+4 ln(Ptablet)+0.1 ln(I)

We now find that:Own Price Elasticity = -1, demand is unit elastic

Cross-Price Elasticity = 4, a 1% increase in the price of tablets causes a 4% increase in quantity demanded of ipads

Income Elasticity = 0.1, a 1% increase in income causes a 0.1% increase in quantity demanded for ipads

Page 31: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

31

4.3 Total Derivatives

Often in econometrics, one variable is influenced by a variety of other variables.

Ie: Happiness =f(sun, driving)

Ie: Productivity = f(labor, effectiveness)

Using TOTAL DERIVATIVES, we can examine how growth of one variable is caused by growth in all other variables

The following formulae will combine x’s impact on y (dy/dx) with x’s impact on y, with other variables held constant (δy/δx)

Page 32: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

Assume you are increasing the square footage of a house where

AREA = LENGTH X WIDTH

A=LW

If you increase the length,

the change in area is equal

to the increase in length

times the current width:

32

4.3 Total Derivatives

Length

Area

Width

dL

Notice that:δA/δL=W, (partial derivative, since width is constant)Therefore the increase in area is equal to:dA=(δA/δL)dL

Page 33: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

A=LW

If you increase the width,

the change in area is equal

to the increase in width

times the current length:

33

4.3 Total Derivatives

Length

Area

Width

dW

Notice that:δA/δW=L, (partial derivative, since length is constant)Therefore the increase in area is equal to:dA=(δA/δW)dW

Next we combine the two effects:

Page 34: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

A=LW

An increase in both length

and width has the following

impact on area:

34

4.3 Total Derivatives

Length

Area

Width

dW

Now we have:dA=(δA/δL)dL+(δA/δW)dW+(dW)dL

But since derivatives always deal with instantaneous slope and small changes, (dW)dL is small and ignored, resulting in:

dA=(δA/δL)dL+(δA/δW)dW

dL

Page 35: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

35

4.3 Total DerivativesLength

Area

Width

dW

dA=(δA/δL)dL+(δA/δW)dW

Effectively, we see that change in the dependent variable (A), comes from changes in the independent variables (W and L). In general, given the function z=f(x,y) we have:

dL

dyy

zdxx

zdy

y

yxfdx

x

yxfdz

),(),(

Page 36: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

In a joke factory,

QJokes=workers(funniness)

You employ 500 workers, each of which can create 100 funny jokes an hour.

How many more jokes could you create if you increase workers by 2 and their average funniness by 1 (perhaps by discovering any joke with an elephant in it is slightly more funny)? 36

4.3 Total Derivative Example

700200500

)2(100)1(500

dq

dq

fdwwdfdq

dww

qdff

qdq

Page 37: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

The key advantage of the total derivative is it takes variable interaction into account.

The partial derivative (δz/δx) examines the effect of x on z if y doesn’t change. This is the DIRECT EFFECT.

However, if x affects y which then affects z, we might want to measure this INDIRECT EFFECT.

We can modify the total derivative to do this:

37

4.3 Total Derivative Extension

dx

dy

y

z

x

z

dx

dy

y

z

dx

dx

x

z

dx

dz

dyy

zdxx

zdy

y

yxfdx

x

yxfdz

),(),(

Page 38: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

38

4.3 Total Derivative Extension

dx

dy

y

z

x

z

dx

dy

y

z

dx

dx

x

z

dx

dz

dyy

zdxx

zdy

y

yxfdx

x

yxfdz

),(),(

Here we see that x’s total impact on z is broken up into two parts:

1) x’s DIRECT impact on z (through the partial derivative)

2) x’s INDIRECT impact on z (through y)

Obviously, if x and y are unrelated, (δy/δx)=0, then the total derivative collapses to the partial derivative

Page 39: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

39

4.3 Total Derivative ExampleAssume Happiness=Candy+3(Candy)Money+Money2

h=c+3cm+m2

Furthermore, Candy=3+Money/4 (c=3+m/4)

The total derivative of happiness with regards to money:

mcdm

dh

mmcdm

dhdm

dc

c

h

m

h

dm

dh

75.2325.0

)]4/1)(31[(]23[

Page 40: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

40

4.3 Total Derivative and ElasticityTotal derivatives can also give us the relationship between elasticity and revenue that we found in Chapter 2.2.3:

demand) of elasticity price is (where )1(

)1(

QdP

dTR

dP

dQ

Q

PQ

dP

dTRdP

dQP

dP

dPQ

dP

dTR

dQQ

TRdP

P

TRdTR

PQTR

Page 41: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

41

4.4 Unconstrained Optimization

Unconstrained optimization falls into two categories:

1) Optimization using one variable (ie: changing wage to increase productivity, working conditions are constant)

2) Optimization using two (or more) variables (ie: changing wage and working conditions to maximize productivity)

Page 42: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

42

4.4 Simple Unconstrained Optimization

For a multivariable case where only one variable is controlled, optimization steps are easy:

Consider the function z=f(x)

1) FOC:

Determine where δz/δx=0 (necessary condition)

2) SOC:

δ2z/δx2<0 is necessary for a maximum

δ2z/δx2>0 is necessary for a minimum

3) Determine max/min point

Substitute the point in (2) back into the original equation.

Page 43: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

43

4.4 Simple Unconstrained Optimization

Let productivity = -wage2+10wage(working conditions)2

P(w,c)=-w2+10wc2

If working conditions=2, find the wage that maximizes productivity

P(w,c)=-w2+40w

1) FOC:

δp/δw =-2w+40=0

w=20

2) SOC:

δ2p/δw2= -2 < 0, a maximum exists

Page 44: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

44

4.4 Simple Unconstrained Optimization

P(w,c)=-w2+10wc2

w=20 (maximum confirmed)

3) Find Maximum

P(20,4)=-202+10(20)(2)2

P(20,4)=-400+800

P(20,4)=400

Productivity is maximized at 400 when wage is 20.

Page 45: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

45

4.4 Complex Unconstrained Optimization

For a multivariable case where only two variable are controlled, optimization steps are more in-depth:

Consider the function z=f(x,y)

1) FOC:

Determine where δz/δx=0 (necessary condition)

And

Determine where δz/δy=0 (necessary condition)

Page 46: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

46

4.4 Complex Unconstrained Optimization

For a multivariable case where only two variable are controlled, optimization steps harder:

Consider the function z=f(x,y)

2) SOC:

δ2z/δx2<0 and δ2z/δy2<0 are necessary for a maximum

δ2z/δx2>0 and δ2z/δy2>0 are necessary for a minimum

Plus, the cross derivatives can’t be too large compared to the own second partial derivatives:

022

2

2

2

2

yx

z

y

z

x

z

Page 47: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

47

4.4 Complex Unconstrained Optimization

If this third SOC requirement is not fulfilled, a SADDLE POINT occurs, where z is a maximum with regards to one variable but a minimum with regards to the other. (ie: wage maximizes productivity while working conditions minimizes it)

Vaguely, even though both variables work to increase z, their interaction with each other outweighs this maximizing effect

022

2

2

2

2

yx

z

y

z

x

z

Page 48: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

48

4.4 Complex Unconstrained Optimization

Let P(w,c)=-w2+wc-c2 +9c , maximize productivity

1) FOC:

δp/δw =-2w+c=0

2w=c

δp/δc=w-2c+9=0

w=2c-9

w=2(2w)-9

-3w=-9

w=3

2w=c

6=c

Page 49: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

49

4.4 Complex Unconstrained Optimization

P(w,c)=-w2+wc-c2 +9c

δp/δw =-2w+c=0

δp/δc=w-2c+9=0

w=3, c=6 (possible max/min)

2) SOC:

δ2p/δw2= -2 < 0

δ2p/δc2= -2 < 0, possible max

03

1)2)(2(

22

2

2

2

2

2

22

2

2

2

2

cw

p

c

p

w

p

cw

p

c

p

w

p Maximum confirmed

Page 50: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

50

4.4 Complex Unconstrained Optimization

P(w,c)=-w2+wc-c2 +9c

w=3, c=6 (confirmed max)

3) Find productivity:

27),(

5436189),(

)6(966)3(3),(

9),(22

22

cwp

cwp

cwp

ccwcwcwp

Productivity is maximized at 27 when wage=3 and working conditions=6.

Page 51: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

51

4.5 Constrained Optimization

Typically constrained optimization consists of maximizing or minimizing an objective function with regards to a constraint, or

Max/min z=f(x,y)

Subject to (s.t.): g(x,y)=k

Where k is a constant

Page 52: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

52

4.5 Constrained Optimization

Often economic agents are not free to make any decision they would like. They are CONSTRAINED by factors such as income, time, intelligence, etc.

When optimizing with constraints, we have two general methods:

1) Internalizing the constraint

2) Creating a Lagrangeian function

Page 53: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

53

4.5 Internalizing Constraints

If the constraint can be substituted into the equation to be optimized, we are left with an unconstrained optimization problem:

Example:

Bob works a full week, but every Saturday he has seven hours left free, either to watch TV or read. He faces the constrained optimization problem:

Max. Utility=7TV-TV2+Read (U=7TV-TV2+R)

s.t. 7=TV+Read (7=TV+R)

Page 54: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

54

4.5 Internalizing Constraints

Max. U=7TV-TV2+R

s.t. 7=TV+R

We can solve the constraint:

R=7-TV

And substitute into the objective function:

U=-TV2+7TV+(7-TV)

U=-TV2+6TV+7

Page 55: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

55

4.5 Internalizing Constraints

Max. U=7TV-TV2+R

s.t. 7=TV+R

U=-TV2+6TV+7

We can then perform unconstrained optimization:

FOC:

δU/ δTV=-2TV+6=0

TV=3

R=7-TV

R=7-3

R=4

Page 56: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

56

4.5 Internalizing Constraints

Max. U=7TV-TV2+R

s.t. 7=TV+R

U=-TV2+6TV+7, TV=3, R= 4

δU/ δTV=-2TV+6

SOC:

δ2U/ δTV2=-2<0, concave max.

Evaluate:

U=7TV-TV2+R

U=7(3)-32+4

U=21-9+4=16

Page 57: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

57

4.5 Internalizing Constraints

Max. U=7TV-TV2+R

s.t. 7=TV+R

U=-TV2+6TV+7, TV=3, R= 4

δU/ δTV=-2TV+6

δ2U/δTV2=-2<0, concave max.

U=21-9+4=16

Utility is maximized at 16 when Bob watches 3 hours of TV and reads for 4 hours.

Page 58: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

58

4.5 Internalizing Constraints

Substituting the constraint into the objective function may not be applicable for a variety of reasons:

1) The substitution makes the objective function unduly complicated, or substitution is impossible

2) You want to evaluate the impact of the constraint

3) The constraint is an inequality

4) Your exam paper asks you to do so

In this case, you must construct a Lagrangian function.

Page 59: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

59

4.5 The Lagrangian

Given the optimization problem:

Max/min z=f(x,y)

s.t. g(x,y)=k (Where k is a constant)

The Lagranean (Lagrangian) function becomes:

L=z*=z(x,y)+λ(k-g(x,y))

Where λ is known as the Lagrange Multiplier.

We then continue with FOC’s and SOC’s.

Page 60: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

60

4.5 The Lagrangian

L=z*=z(x,y)+λ(k-g(x,y))

FOC’s:0 ,0 ,0

LLL

yxNote that the third FOC simply returns the constraint,

g(x,y)=k

Typically, one will solve for λ in the first two conditions to find a relationship between x and y, then use this relationship with the third condition to solve for x and y.

Page 61: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

61

4.5 The Lagrangian

L=z*=z(x,y)+λ(k-g(x,y))

After finding FOC’s, to confirm a maximum or minimum, the SOC is employed.

This SOC must be negative for a maximum and positive for a minimum

Note that for more terms, this function becomes exponentially complicated.

SOC’s:

δxδy

δy

δg

δx

δg2

δx

δy

δg

δy

δx

δg 2

2

22

2

22

SOC

Page 62: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

62

4.5 Lagrangian example

Max. U=7TV-TV2+R

s.t. 7=TV+R

L=z*=z(x,y)+λ(k-g(x,y))

L=7TV-TV2+R+λ(7-TV-R)

FOC:

2TV-7

0-2TV-7

TV

L

1

0-1

R

L

RV

T

T7

0R-V-7L

Page 63: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

63

4.5 Lagrangian example

RTV

7)3(

1)2(

2TV-7)1(

3

127

)2()1(

TV

TV

R

R

RV

4

37

T7

:)3(

Page 64: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

64

4.5 Lagrangian Example

02

01122-101

δTVδR

δR

δg

δTV

δg2

δTV

δR

δg

δR

δTV

δg

22

2

2

22

2

22

SOC

SOC

SOC

Since the second order condition is negative, the points found are a maximum.

Notice that we found the same answers as internalizing the constraint.

Page 65: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

65

4.5 The Lagrange Multiplier

The Lagrange Multiplier, λ, provides a measure of how much of an impact relaxing the constraint would make, or how the objective function changes if k of g(x,y)=k is marginally increased.

The Lagrange multiplier answers how much the maximum or minimum changes when the constraint g(x,y)=k increases slightly to g(x,y)=k+δ

Page 66: 1 4. Models with Multiple Explanatory Variables Chapter 2 assumed that the dependent variable (Y) is affected by only ONE explanatory variable (X). Sometimes.

66

4.5 Lagrangian example

12(3)-7 2TV-7

4

3

2TV-7

R

TV

This means that if Bob gets an extra hour, his maximum utility will increase by approximately 1.

(Alternately, if Bob loses an hour of leisure, his maximum utility will decrease by approximately 1.)

Check:

If 8=TV+R, TV=3.5, R=4.5, U=16.75 (utility increases by approximately 1)