

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Name: __________________________________________4-digit or 4-letter code for posting grade: ____
Bayesian Statistics
PRACTICE PROBLEMS for FINAL EXAM 2007
Final exam Fall 2006, Instructor: Cowles
Show any computations that you carry out.1. We wish to make inference about the population mean
μ^ of body temperature in degrees
Fahrenheit in healthy adults.
We will assume that body temperatures follow a normal
distribution in this population. We have a dataset that includes measured body temper-atures on 130 healthy adults.(a) Suppose we wish to test the hypotheses:
H:^ μ^0
H:^ μ >A^
Suppose further that we place the following prior on
μ: μ^ ∼^ N ormal
where 10 is the prior
variance. i. What prior probability on
His implied by this prior on^0
μ? (Circle one).
A.^ P r(H
B.^ P r(H
C.^ P r(H
D. The normal prior on
μ^ has no relationship to the hypothesis test.
ii. Suppose that the data was such that it produced a posterior probability of thenull hypothesis
P r(H|y^0
What is the Bayes factor in favor of
Hagainst^0
H? (numeric answer)^1
(b) Suppose instead that we want to do a two-sided test of a point null hypothesis,namely:
H:^ μ^0
H:^ μA^
Suppose we used the same prior on
μ^ that was given above: μ ∼ N ormal
where 10 is the prior
variance.
i. What prior probability on
His implied by this prior on^0
μ? (Circle one).
A.^ P r(H
B.^ P r(H
C.^ P r(H
D. The normal prior on
μ^ has no relationship to the hypothesis test.
ii. Would it be possible to compute a Bayes factor in this case? Briefly state whyor why not.
p^ is constant from one trial to another.
-^ The experiment continues until a total of
r^ successes are observed, where
r^ is fixed
in advance.The negative binomial probability mass function for random variable
X^ and parameter
p
is:
f^ (x;^ p, r)
(x^ + = r^ −^ 1)!p x! (r^ −^ 1)!^
rx(1^ −^ p)
,^ x^ = 0,
Here^ r^ is a known constant (the number of successes).When a dog competes in an agility event, he or she may receive either a qualifyingscore (Q) or a non-qualifying score (NQ). To earn the Elite Regular title in NADACagility requires 3 qualifying scores. If we can assume that the trials are independent andthe success probability is constant for a particular dog, then we might use the negativebinomial distribution for the number of NQ’s (failures) that a dog received before earningthe title (that is, before the 3rd success).The attached WinBUGS code involves a model for data on 5 dogs who have achievedthe Elite Regular title.
The data vector
x^ shows how many NQ’s each dog had before
completing the title.(a) Is the Beta family the conjugate prior for the negative binomial likelihood? Brieflyshow why or why not.
(b) On the back of this sheet, draw a directed graph of the model given in the WinBUGScode.(c) Circle all the statements below that are true of the model given in the WinBUGScode.i. The model permits each dog to have a different success probability.ii. The model is hierarchical.iii. The model assumes that different dogs’
p’s are drawn from a common probability
distribution.iv. The parameters of the common probability distribution from which the differentdogs’^ p’s are drawn, are assumed fixed and known. (d) In a Gibbs sampler algorithm for fitting this model, which quantities would appearin the full conditional distribution for
p? (Circle as many as are appropriate.)^1
i.^ p^2 ii.^ x^1 iii.^ x^2 iv.^ α v.^ β (e) Derive the full conditional distribution of
α.^ Show your work.
If it is a standard
density, identify it. Otherwise state that it is nonstandard.(f) The trace plots suggest:i. almost immediate convergence of sampler outputii. high autocorrelation in the output for
α^ and^ β
iii. a need to discard at least 500 burn-in iterationsiv. none of the above
(g) I was concerned that that there might be more variability among the
xvalues thani^
would be typical if the the corresponding
p’s really were drawn from a common betai
density. Note that WinBUGS contains a built-in function called
sd^ that computes
the standard deviation (a measure of variability) of a vector of values.
Explain in
one sentence what each of the following lines in the WinBUGS program does:i. xpred[i]
∼^ dnegbin( p[i], r ) ii. bigger
<^ −^ step(sdreal - sdpred) (h) Based on the WinBUGS output, is there evidence that the model does fail to accountfor enough variability between
xvalues? Explain briefly.i^