1.3 Bayesian reports: Decision theory under uncertainty

The Bayesian framework allows reporting the full posterior distributions. However, some situations require reporting a specific value of the posterior distribution (point estimate), an informative interval (set), point or interval predictions, and/or selecting a specific model. Decision theory offers an elegant framework to make decisions regarding the optimal posterior values to report (J. O. Berger 2013).

The starting point is a loss function, which is a non-negative real-valued function whose arguments are the unknown state of nature (Θ), and a set of actions to be taken (A), that is, L(θ,a):Θ×AR+.

This function is a mathematical representation of the loss incurred from making mistakes. In particular, selecting action aA when θΘ is the true state. In our case, the unknown state of nature can refer to parameters, functions of them, future or unknown realizations, models, etc.

From a Bayesian perspective, we should choose the action that minimizes the posterior expected loss (a(y)), that is, the posterior risk function (E[L(θ,a)y]), a(y)=argminaA E[L(θ,a)y], where E[L(θ,a)y]=ΘL(θ,a)π(θy)dθ.12

Different loss functions imply different optimal decisions. We illustrate this assuming θR.

  • The quadratic loss function, L(θ,a)=[θa]2, gives as the optimal decision the posterior mean, a(y)=E[θy], that is:

E[θy]=argminaA Θ[θa]2π(θy)dθ.

To obtain this result, let’s use the first-order condition, differentiate the risk function with respect to a, interchange the differential and integral order, and set the result equal to zero:

2Θ[θa]π(θy)dθ=0.

This implies that

aΘπ(θy)dθ=a(y)=Θθπ(θy)dθ=E[θy],

that is, the posterior mean is the Bayesian optimal action. This means that we should report the posterior mean as a point estimate of θ when facing the quadratic loss function.

  • The generalized quadratic loss function, L(θ,a)=w(θ)[θa]2, where w(θ)>0 is a weighting function, gives as the optimal decision rule the weighted mean. We should follow the same steps as the previous result to obtain

a(y)=E[w(θ)×θy]E[w(θ)y].

Observe that the weighted average is driven by the weighting function w(θ).

  • The absolute error loss function, L(θ,a)=|θa|, gives as the optimal action the posterior median (Exercise 5).

  • The generalized absolute error function,

L(θ,a)={K0(θa),if θa0,K1(aθ),if θa<0,K0,K1>0,

implies the following risk function:

E[L(θ,a)y]=aK1(aθ)π(θy)dθ+aK0(θa)π(θy)dθ.

Differentiating with respect to a, interchanging differentials and integrals, and equating to zero, we get:

K1aπ(θy)dθK0aπ(θy)dθ=0.

Thus, we have

aπ(θy)dθ=K0K0+K1,

that is, any K0K0+K1-percentile of π(θy) is an optimal Bayesian estimate of θ.

We can also use decision theory under uncertainty in hypothesis testing. In particular, testing H0:θΘ0 versus H1:θΘ1, where Θ=Θ0Θ1 and =Θ0Θ1, there are two actions of interest, a0 and a1, where aj denotes not rejecting Hj, for j={0,1}.

Given the 0Kj loss function:

L(θ,aj)={0,if θΘj,Kj,if θΘi,ji,

where there is no loss if the right decision is made, for instance, not rejecting H0 when θΘ0, and the loss is Kj when an error is made. For example, a type I error occurs when rejecting the null hypothesis (H0) when it is true (θΘ0), which results in a loss of K1 due to choosing action a1, not rejecting H1.

The posterior expected loss associated with decision aj, i.e., not rejecting Hj, is:

E[L(θ,aj)y]=0×P(Θjy)+KjP(Θiy)=KjP(Θiy),ji.

Therefore, the Bayes optimal decision is the one that minimizes the posterior expected loss. That is, the null hypothesis is rejected (a1 is not rejected) when

K0P(Θ1y)>K1P(Θ0y).

Given our framework, Θ=Θ0Θ1 and =Θ0Θ1, we have P(Θ0y)=1P(Θ1y). As a result, the rejection region of the Bayesian test is:

R={y:P(Θ1y)>K1K1+K0}.

Decision theory also helps to construct interval (region) estimates. Let ΘC(y)Θ be a credible set for θ, and let the loss function be defined as:

L(θ,ΘC(y))=11{θΘC(y)},

where

1{θΘC(y)}={1,if θΘC(y),0,if θΘC(y).

Thus, the loss function becomes:

L(θ,ΘC(y))={0,if θΘC(y),1,if θΘC(y).

This is a 0-1 loss function, which equals zero when θΘC(y) and equals one when θΘC(y). Consequently, the risk function is:

1P(θΘC(y)).

Given a measure of credibility α(y) that defines the level of trust that θΘC(y), we can measure the accuracy of the report by the loss function:

L(θ,α(y))=[1{θΘC(y)}α(y)]2.

This loss function could be used to suggest a choice of the report α(y). Given that this is a quadratic loss function, the optimal action is the posterior mean, that is,

E[1{θΘC(y)}y]=P(θΘC(y)y).

This probability can be calculated given the posterior distribution as

P(θΘC(y)y)=ΘC(y)π(θy)dθ.

This represents a measure of the belief that θΘC(y) given the prior beliefs and sample information.

The set ΘC(y)Θ is a 100(1α)% credible set with respect to π(θy) if

P(θΘC(y)y)=ΘC(y)π(θy)dθ=1α.

Two alternatives for reporting credible sets are the symmetric credible set and the highest posterior density set (HPD). The former is based on the α2% and (1α2)% percentiles of the posterior distribution, and the latter is a 100(1α)% credible interval for θ with the property that it has the smallest distance compared to any other 100(1α)% credible interval for θ based on the posterior distribution. Specifically,

C(y)={θ:π(θy)k(α)},

where k(α) is the largest number such that

θ:π(θy)k(α)π(θy)dθ=1α.

The HPD set can be a collection of disjoint intervals when working with multimodal posterior densities. Additionally, HPD sets have the limitation of not necessarily being invariant under transformations.

Decision theory can also be used to perform prediction (point, sets, or probabilistic). Suppose that there is a loss function L(Y0,a) involving the prediction of Y0. Then, the expected loss is

EY0[L(Y0,a)]=Y0L(y0,a)π(y0y)dy0,

where π(y0y) is the predictive density function. Thus, we make an optimal choice for prediction that minimizes the risk function given a specific loss function.

Although Bayesian Model Averaging (BMA) allows for incorporating model uncertainty in a regression framework, sometimes it is desirable to select just one model. A compelling alternative is to choose the model with the highest posterior model probability. This model is the best alternative for prediction in the case of a 0-1 loss function (Clyde and George 2004).

Example: Health insurance continues

We show some optimal rules in the health insurance example, specifically the best point estimates of λ under the quadratic, absolute, and generalized absolute loss functions. For the generalized absolute loss function, we assume that underestimating λ is twice as costly as overestimating it, i.e., K0=2 and K1=1.

Given that the posterior distribution of λ is G(α0+Ni=1yi,β0β0N+1), and using the hyperparameters from empirical Bayes, we obtain the following optimal point estimates:

  • The posterior mean: E[λy]=αnβn=1.2,
  • The posterior median: 1.19,
  • The 2/3-th quantile: 1.26.

These are the optimal point estimates for the quadratic, absolute, and generalized absolute loss functions, respectively.

In addition, we test the null hypothesis H0:λ[0,1) versus the alternative hypothesis H1:λ[1,), setting K0=K1=1. We should reject the null hypothesis since P(λ[0,1))=0.9>K1K0+K1=0.5.

The 95% symmetric credible interval is (0.91,1.53), and the highest posterior density (HPD) interval is (0.90,1.51). Finally, the optimal point prediction under the quadratic loss function is 1.2, which is the mean value of the posterior predictive distribution. The optimal model, assuming a 0-1 loss function, is the model using the hyperparameters from the empirical Bayes procedure, since the posterior model probability of this model is approximately 1, whereas the posterior model probability of the model using vague hyperparameters is approximately 0.

an <- sum(y) + a0EB 
# Posterior shape parameter
bn <- b0EB / (N*b0EB + 1) 
# Posterior scale parameter
S <- 1000000 
# Number of posterior draws
Draws <- rgamma(1000000, shape = an, scale = bn) 
# Posterior draws
###### Point estimation ########
OptQua <- an*bn 
# Mean: Optimal choice quadratic loss function
OptQua
## [1] 1.200952
OptAbs <- qgamma(0.5, shape = an, scale = bn) 
# Median: Optimal choice absolute loss function
OptAbs
## [1] 1.194034
# Setting K0 = 2 and K1 = 1, that is, to underestimate lambda is twice as costly as to overestimate it.
K0 <- 2; K1 <- 1
OptGenAbs <- quantile(Draws, K0/(K0 + K1)) 
# Median: Optimal choice generalized absolute loss function
OptGenAbs
## 66.66667% 
##  1.263182
###### Hypothesis test ########
# H0: lambda in [0,1) vs H1: lambda in [1, Inf]
K0 <- 1; K1 <- 1
ProbH0 <- pgamma(1, shape = an, scale = bn) 
ProbH0 # Posterior  probability H0
## [1] 0.09569011
ProbH1 <- 1 -ProbH0
ProbH1 # Posterior  probability H1
## [1] 0.9043099
# We should reject H0 given ProbH1 > K1 / (K0 + K1) 
###### Credible intervals ########
LimInf <- qgamma(0.025, shape = an, scale = bn) # Lower bound
LimInf
## [1] 0.9114851
LimSup <- qgamma(0.975, shape = an, scale = bn) # Upper bound
LimSup
## [1] 1.529724
HDI <- HDInterval::hdi(Draws, credMass = 0.95) # Highest posterior density credible interval
HDI
##     lower     upper 
## 0.9007934 1.5163109 
## attr(,"credMass")
## [1] 0.95
###### Predictive optimal choices ########
p <- bn / (bn + 1) # Probability negative binomial density
OptPred <- p/(1-p)*an # Optimal point prediction given a quadratic loss function in prediction
OptPred
## [1] 1.200952

References

Berger, James O. 2013. Statistical Decision Theory and Bayesian Analysis. Springer Science & Business Media.
Chernozhukov, V., and H. Hong. 2003. “An MCMC Approach to Classical Estimation.” Journal of Econometrics 115: 293–346.
Clyde, M., and E. George. 2004. “Model Uncertatinty.” Statistical Science 19 (1): 81–94.

  1. Chernozhukov and Hong (2003) propose Laplace-type estimators (LTE) based on the quasi-posterior, p(θ)=exp{Ln(θ)}π(θ)Θexp{Ln(θ)}π(θ)dθ, where Ln(θ) is not necessarily a log-likelihood function. The LTE minimizes the quasi-posterior risk.↩︎