RESTRICTED OPEN BOOK EXAMINATION
Data provided:
"Statistics Tables" by H.R. Neave
(Not to be removed from the examination hall.)
PAS383
SCHOOL OF MATHEMATICS AND STATISTICS
Autumn Semester 20062007
Bayesian Statistics
2 hours
RESTRICTED OPEN BOOK EXAMINATION.
Candidates may bring to the examination lecture notes and associated lecture material
(but no textbooks) plus a calculator which conforms to University regulations.
All answers will be marked, but credit will be given for only the best
THREE answers.
All
questions carry equal weight. Total marks 90.
NOT TO BE REMOVED FROM THE EXAMINATION HALL
PAS383
1
Turn Over
PAS383
1
Prior uncertainty about a population mean is described by a N (20; 9) distribution.
Four conditionally independent observations, x1 ; : : : ; x4 , are available with x j N (; 4), with x1 = 18, x2 = 17, x3 = 21 and x4 = 16.
(a) With prior information only, state the optimum estimate of under
quadratic loss, and give the expected loss using this estimate. (2 marks)
i
(b)
State the posterior distribution of given x = fx1 ; : : : ; x4 g, calculate the
posterior mean and variance, and give a 95% highest posterior density
interval for .
(7 marks)
(c)
Suppose that is to be estimated by d under the zero-one loss function
L(d; ) = 0 if jd j < 1, and L(d; ) = 1 otherwise. If d is chosen to
be the posterior mode, calculate the expected loss using this estimate.
(7 marks)
(d)
Show that the predictive distribution of z jx = fx1 ; : : : ; x4 g, where z j N (; 4), is a normal distribution. You are not required to give expressions
for the mean and variance.
(8 marks)
(e)
A fth observation x5 is available with x5 j; 2
largest value of 2 such that
N (; 2).
Derive the
V ar (jx1 ; : : : ; x5 ) < 0:5 V ar (jx1 ; : : : ; x4 ):
(6 marks)
PAS383
2
Continued
PAS383
2
The number of successes x in sequence of n trials has a Binomial (n; ) distribution, conditional on an unknown parameter . Suppose your prior beliefs are that
E () = 1=3 and V ar () = 1=18.
(a) If Beta(a; b) distribution is tted to your prior beliefs, obtain the values of
a and b.
(4 marks)
(b)
Given n = 10 and x = 3, give your posterior distribution of , and calculate
the your posterior mean and variance of . What is your probability of
observing a success in any single trial?
(4 marks)
(c)
If z is the number of successes in a further 3 trials, compute P (z = 2jx =
3; n = 10).
(6 marks)
(d)
Suppose you have to estimate , and have a quadratic loss for the size of
your estimation error. You may either estimate now, or pay for another
5 trials, at a cost of k units of loss, and then estimate . Let y be the
number of successes in these 5 trials. Prove that you should only pay for
another 5 trials if
E (y 2 jx; n) > 6156k
22:282:
(10 marks)
(e)
Consider the weak prior distribution Beta(0; 0). Using the fact that
the integrals
Z 1
1 dt and Z 1 1 dt
0
t
0
1
t
both diverge, explain why the posterior distribution given the single observation x j Binomial (1; ) will also be improper.
(6 marks)
PAS383
3
Turn Over
PAS383
3
A clinical trial has been conducted to test the eects of a new drug designed
to treat epilepsy. Patients are assigned to either the drug or a placebo, and the
number of seizures over the duration of the trial are recorded. Data for the rst
six patients are given in the following table.
patient treatment group number of seizures
1
placebo
22
2
placebo
19
3
placebo
15
4
drug
14
5
drug
7
6
drug
11
A model is proposed for these data, and implemented in WinBUGS. The code
listing is given below
model{
for(i in 1:6){
x[i]~dpois(lambda[i])
log(lambda[i])<-delta[i]+t[i]*alpha
delta[i]~dnorm(mu,tau) }
mu~dnorm(0,0.01)
alpha~dnorm(0,0.01)
tau~dgamma(0.001,0.001)}
list(x=c(22,19,15,14,7,11),t=c(0,0,0,1,1,1))
list(mu=0,tau=1,alpha=0)
(a)
Dening your notation, describe the model that has been tted to these
data, i.e. state the likelihood function for the observed data and hierarchical
prior distribution for the unknown parameters. Give interpretations of the
parameters and .
(9 marks)
i
(b)
PAS383
Draw a directed acyclic graph (DAG) to represent this model.
4
(6 marks)
Question 3 continued on next page
PAS383
3
(continued)
(c)
Suppose the following lines are now added to the main WinBUGS code
within the model{ } environment:
beta~dnorm(mu,tau)
log(gamma1)<-beta+alpha
log(gamma2)<-beta
theta1~dpois(gamma1)
theta2~dpois(gamma2)
Given the following summary statistics, provide 95% prediction intervals
for the number of seizures that the 7th patient would experience during
the trial given the placebo, and the number of seizures that the 7th patient
would experience given the drug.
node
gamma1
gamma2
theta1
theta2
mean median 2.5% 97.5%
11.1
19.1
11.1
19.2
10.5
18.4
10.0
18.0
5.6
10.0
3.0
8.0
18.8
31.6
21.0
35.0
(2 marks)
(d)
Briey explain why the full conditional distribution
f ( j; 1 ; : : : ; 6 ; ; x1 ; : : : ; x6 ; t1 ; : : : ; t6 );
is proportional to f ( )f (1 ; : : : ; 6 j; ). Prove that this full conditional
distribution is a gamma distribution, giving expressions for the mean and
variance.
(9 marks)
(e)
PAS383
How would the prior distribution of have to be modied such that the
distribution of j1 ; : : : ; 6 could be obtained analytically?
(4 marks)
5
Turn Over
PAS383
4
(a)
Data x1 ; : : : ; x are observed, with x j N (; 1). Let (l; u ) be the 95%
condence interval for obtained from x1 ; : : : ; x . Explain why it is not
true that
n
i
n
P f 2 (l; u )jx1 ; : : : ; x g = 0:95;
n
using either
(i)
frequentist probability;
(b)
(c)
(3 marks)
(ii)
subjective probability, for any individual with prior knowledge about
.
(3 marks)
(i)
You are eliciting an expert's prior beliefs about an unknown quantity
. You rst elicit the expert's prior expectation E (). If you then
ask for the expert's 95th percentile for , briey explain how an
anchoring eect could lead to overcondence on the part of the
expert.
(3 marks)
(ii)
When eliciting a measure of dispersion, is it better to ask for a
variance or two percentiles such as the expert's 5th and 95th? Give
a brief justication for your answer.
(3 marks)
Four observations y1 ; : : : ; y4 are conditionally independent given , with
x j N (; 4). A hypothesis test is to be conducted of the form H0 : 10 and H1 : < 10. Falsely rejecting H0 incurs p0 units of loss, and falsely
accepting H0 incurs p1 units of loss. Correctly accepting
or rejecting H0
P
does not incur any penalty. Suppose you observe 4=1 y = 46. Assuming
an improper prior distribution f () / 1, if Bayes' rule tells you to accept
H0 , what is the largest value that p1 can take, expressed in terms of p0 ?
i
i
i
(9 marks)
(d)
A coin is tossed 10 times, with x the observed number of heads. Consider
the two following models for x :
: the coin is fair, with x Binomial (10; 0:5)
: the coin is biased, with x j Binomial (10; ) and U [0; 1]
If x = 8 is observed, compute the Bayes factor P (x jM1 )=P (x jM2 ), and
M1
M2
comment briey on the result.
End of Question Paper
PAS383
6
(9 marks)
© Copyright 2026 Paperzz