You are on page 1of 3

Bayesian Methods for Data Analysis: Assignment 1

Instructor: Karthik Sriram

Please follow the instructions

• Assignment is due on 20-Jan-2019 by 11:59 PM. Late submission will not be accepted.

• This is a group assignment containing two questions. Your group size should be ≤ 3. Names

of group members must be clearly written in your submission.

• Assignment submission should be in the form of a report that clearly articulates the for-

mulation, solution approach and any logic used to arrive at the answers. Just providing

final answers or just pointing to R codes or excel files may not fetch any credit.

Unclear and disorganized presentation will be penalized.

• Submission needs to be in soft copy. Scan of neatly hand-written is acceptable. Any support-

ing R code or Excel files (with appropriate labels/comments) must also be emailed before the

deadline. Please email the soft copy to Ms.Dhawani Nilesh Shah ( email: dhawa-

nis@iima.ac.in ).

• Short and crisp answers will be appreciated. It is not necessary to derive any formulas that

have already been derived in class. However, you should state clearly any formula you are

applying directly.

All the Best!


1. (5+5+5 marks) Consider the bank loan example similar to the one discussed in class. In

such problems, assuming that LGDs are normally distributed may not be very appropriate.

For example, the proprietary Moodys analytics “Loss Calc” model assumes a Beta distri-

bution for modeling LGD. Accordingly, assume that the past data are observations from

Beta(a, b), where a and b are unknown. Let the observed past LGD data on 5 deals be

4%, 5%, 10%, 12% and 69%. Further, suppose that based on a focus group discussion with

experienced risk managers, the following prior (Table 1) was obtained for (a, b)1 .

Table 1: Prior Distribution for (a, b)


(a, b) Probability
(8, 1) 0.10
(2, 5) 0.15
(2, 2) 0.55
(5, 2) 0.20

a. Compute the posterior distribution for (a, b).

b. Without using simulations, based on the predictive distribution, compute the probability

that the LGD will be greater than 45%?

c. Based on the predictive distribution, compute the 95th percentile of LGD ? (hint: Here,

you may use simulations)

1
A more realistic prior would be a “continuous” joint distribution for (a, b). A discrete joint distribution is provided
for simplicity. The formulations will be similar for a continuous prior but computations may need more sophisticated
tools such as Markov chain monte carlo(MCMC) techniques, which will be discussed later in the course

2
2. Bayesian Sample Size Determination (5 + 5+ 5 marks):

Suppose a recent survey conducted in a city to estimate the prevalence (p) of certain type of

arthritis in women aged 70 or older, resulted in a 95% HPD interval [0.3, 0.7] for p. Suppose

you want to conduct a further study to estimate p with more accuracy than the previous

study (say length of 95% credible interval less than 0.1 ). Suppose you decide to use the

result from the previous study as a prior for your future study and you formulate the problem

as a beta-binomial model, i.e. data X = number of women with the given type of arthritis

out of a random sample of n women aged 70 or older, will follow Binomial(n, p). You take

the prior p ∼ Beta(a, b).

a). Based on the past study, determine the parameters a and b of the beta prior that you could

use for the future study. (hint: Give some thought to what the shape of such a distribution

would look like and then you may have to use R or excel to solve for a, b).

For next set of questions (b) and (c), suppose that you have decided to use a = 20, b = 30 as

the prior for your study. Now your objective is to determine the sample size to achieve an

accuracy (i.e. length of 95% credible interval) of less than 0.1. Note that this accuracy would

be better than the previous study.

b). Note that credible interval will depend on the value of X we are going to observe, which

is random. For n = 10, compute the length of 95% credible interval for each possible value

of X (i.e. X = 0, 1, 2, ..., n). (To keep it simple, you may use the percentile based interval

instead of HPD). Compute the expected value of the length w.r.t the marginal distribution

of X obtained using the binomial likelihood and beta prior.

c) For what sample size, i.e. value of n, can we ensure that the expected length of the 95%

credible interval is less than 0.1 ?

You might also like