load(draw)$ 
set_draw_defaults(draw_realpart=false)$
fpprintprec:5$ ratprint:false$  kill(all)$

# Uncertainty

This chapter considers the making of decisions under conditions
of uncertainty. 

## Risk Preferences

## Measuring Risk Aversion

Examining the certainty equivalent and the risk premium, as above, 
is one simple way to characterize the strength of risk preferences for a 
particular lottery. Two, more general ways of describing risk preferences 
are absolute risk aversion and relative risk aversion.

### Certainty Equivalent and Risk Premium

Return to the previous example, with p = 0.5. The expected utility 
of the lottery is 0.67693. The certainty equivalent is the amount  
of wealth that would yield the same utility as the lottery. That is, 
the consumer would be indifferent between the lottery and the certainty 
equivalent wealth level: W = 22.598 yields U = 0.67693.

U1(W,R):=1-%e^(-0.1*W/R)$  W0: 25$  R0:2$ 
EU1(W,R,x,y,p):=p*U1(W-x,R)+(1-p)*U1(W+y,R);
x0:10$ y0:10$ p0:0.5$

float(solve(EU1(W0,R0,x0,y0,p0)-U1(CertEq,R0),CertEq));
CertEq0: rhs(%[1]);

The risk premium, the difference between the certainty equivalent 
and expected outcome of the lottery, represents the wealth (in expectation) 
that the consumer is willing to give up in order to have certainty.

The cell below shows that the risk premium is a function of p, decreasing as 
p increases. The rate of decrease for this utility function and initial wealth 
level is $20 per one percentage point increase in p. 

RiskPr: (p*(W0-x0)+(1-p)*(W0+y0))-CertEq0$ diff(RiskPr,p)$
RiskPr0:subst(p=p0,RiskPr)$ 
matrix(["Risk premium expression","Expression Slope", 
"Expression Value"],[RiskPr, diff(RiskPr,p),RiskPr0]);

The graph below shows the certainty equivalent value that is derived above. 

wxdraw2d(xtics_rotate=true,xtics={12.5,W0-x0,CertEq0,W0, W0+x0},
 yrange=[0.4,0.85],user_preamble=("set key bottom; set xlabel right"),
 points_joined=true,line_type=dots, 
 points([[12.5,(EU1(W0,R0,x0,y0,p0))], 
 [CertEq0,(EU1(W0,R0,x0,y0,p0))],[CertEq0,0]]),
 points([[(W0-x0),0],[(W0-x0),U1(W0-x0,R0)],
 [(W0+y0),U1(W0+y0,R0)],[W0+y0,0]]),
 points([[12.5,EU1(W0,R0,x0,y0,p0)],[(p0*(W0-x0)+(1-p0)*(W0+y0)),
  EU1(W0,R0,x0,y0,p0)],[(p0*(W0-x0)+(1-p0)*(W0+y0)),0]]),
 line_type=solid,xlabel="Wealth ($)",ylabel="Utility",
 key="Utility when R=2", explicit(U1(W,R0),W,12.5,37.5),
 dimensions=[480,480] )$

Changing R affects both the risk premium and the certainty 
equivalent, as the following table demonstrates.

Rlist: makelist(-1+1.5*i,i,1,8)$
CertEq(R):=''(rhs((solve(EU1(W0,R,x0,y0,p0)=U1(W,R),W))[1]))$
CertEqList:float(CertEq(Rlist))$
RiskPr(R):=''(p0*(W0-x0)+(1-p0)*(W0+y0)-CertEq(R))$
RiskPrList:float(RiskPr(Rlist))$

names:matrix(["R","Certainty Equivalent","Risk Premium"])$
numbers:transpose(matrix(Rlist, CertEqList,RiskPrList))$
addrow(names,numbers);

Although the certainty equivalent and risk premium are useful for 
examining how different risk preferences dictate different responses 
to a given lottery, they are do not provide an adequate basis 
for making broader statements about risk preferences across different 
lotteries. Two alternatives have been developed: Absolute Risk Aversion 
and Relative Risk Aversion.

### Absolute Risk Aversion

The Arrow-Pratt measure  of risk aversion, the Absolute Risk Aversion measure, is
R(W) = -U"(W)/U'(W) -- the ratio of the second derivative of utility with respect 
to wealth and the first derivative of the function. For the exponential utility 
function, R(W) is:

R1(W):=''(-1*(diff(U1(W,R),W,2)/diff(U1(W,R),W)));

R defines risk aversion, which is not related to W.

Utility functions can display a wide range of behavior with regard to 
W. Consider the following utility function:

[U2(W,R):=(W^(1-R))/(1-R),
R2(W):=''(-1*(diff(diff(U2(W,R),W),W)/diff(U2(W,R),W)))];

Risk preference depends on both R and W, falling as W increases. A function
like this one is said to exhibit Decreasing Absolute Risk Aversion (DARA). 
\index{DARA!Decreasing Absolute Risk Aversion}
\index{risk aversion!Decreasing Absolute Risk Aversion}
Increasing Absolute Risk Aversion is also possible. 

Finally, consider the following utility function:

[U3(W,R):=(R*W-1)^3+1,
R3(W):=''(-1*(diff(diff(U3(W,R),W),W)/diff(U3(W,R),W)))];

R3 = 2R/(1 - RW), so if R*W < 1, R3 > 0 and if R*W > 1, R3 < 0.

The graph below shows utility functions for two individuals. The
gray diamonds indicate W at which each person ceases being risk averse.

wxdraw2d(xlabel="Wealth",ylabel="utility",
 user_preamble="set key bottom" ,
 yrange=[0,2.5],line_width=2,key="R = 2.5", 
 explicit(U3(W,2.5),W,0,1), color=red,
 key="R = 1.25",explicit(U3(W,1.25),W,0,1.5), color=gray, 
 point_size=2,  key="Inflection Points",point_type=13,
 points([[1/2.5,U3(1/2.5,2.5)]]),
 key="", points([[1/1.25,U3(1/1.25,1.25)]])  )$

### Relative Risk Aversion

An alternative measure of risk preferences is Relative Risk Aversion.
RR(W) = -W*U"(W)/U'(W). For the exponential utility function RR(W) is:

RR1(W):=''(-W*(diff(U1(W,R),W,2)/diff(U1(W,R),W)));

The exponential utility function displays constant absolute risk aversion, 
but increasing relative risk aversion.