Docsity

Practice Problems for Final Exam - Bayesian Statistics | 22S 138, Exams of Statistics

Toggle sidebar
bg1
Name: __________________________________________
4-digit or 4-letter code for posting grade: ____
Bayesian Statistics, 22S:138
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 bo dy temperature in degrees
Fahrenheit in healthy adults. We will assume that bo dy 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:
H0:µ≤98.6
HA:µ > 98.6
Suppose further that we place the following prior on µ:
µ∼Norm al(98.6,10)
where 10 is the prior variance.
i. What prior probability on H0is implied by this prior on µ? (Circle one).
A. Pr (H0) = 0
B. Pr (H0) = 0.5
C. Pr (H0) = 1.0
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 the
null hypothesis
Pr (H0|y) = 0.74
What is the Bayes factor in favor of H0against H1? (numeric answer)
(b) Suppose instead that we want to do a two-sided test of a point null hypothesis,
namely:
H0:µ= 98.6
HA:µ6= 98.6
Suppose we used the same prior on µthat was given above:
µ∼Norm al(98.6,10)
where 10 is the prior variance.
1
i. What prior probability on H0is implied by this prior on µ? (Circle one).
A. Pr (H0) = 0
B. Pr (H0) = 0.5
C. Pr (H0) = 1.0
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 why
or why not.
2. The negative binomial distribution is used when the number of successes is fixed and
we’re interested in the number of failures before reaching the fixed number of successes.
An experiment which follows a negative binomial distribution will satisfy the following
requirements:
•The experiment consists of a sequence of indep endent trials.
•Each trial has two possible outcomes, S or F.
•The probability of success, pis constant from one trial to another.
•The experiment continues until a total of rsuccesses are observed, where ris fixed
in advance.
The negative binomial probability mass function for random variable Xand parameter p
is:
f(x;p, r) = (x+r−1)!
x! (r−1)! pr(1 −p)x, x = 0,1,2,...
Here ris a known constant (the number of successes).
When a dog competes in an agility event, he or she may receive either a qualifying
score (Q) or a non-qualifying score (NQ). To earn the Elite Regular title in NADAC
agility requires 3 qualifying scores. If we can assume that the trials are independent and
the success probability is constant for a particular dog, then we might use the negative
binomial distribution for the number of NQ’s (failures) that a dog received before earning
the title (that is, before the 3rd success).
The attached WinBUGS code involves a model for data on 5 dogs who have achieved
the Elite Regular title. The data vector xshows how many NQ’s each dog had before
completing the title.
(a) Is the Beta family the conjugate prior for the negative binomial likelihood? Briefly
show why or why not.
2
pf2

Partial preview of the text

Download Practice Problems for Final Exam - Bayesian Statistics | 22S 138 and more Exams Statistics in PDF only on Docsity!

Name: __________________________________________4-digit or 4-letter code for posting grade: ____

Bayesian Statistics

, 22S:

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

≤^98.^6

H:^ μ >A^

98.^6

Suppose further that we place the following prior on

μ: μ^ ∼^ N ormal

(98.^6 ,^ 10)

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

) = 0.^50

C.^ P r(H

) = 1.^00

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

) = 0.^74

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

= 98.^6

H:^ μA^

6 = 98.^6

Suppose we used the same prior on

μ^ that was given above: μ ∼ N ormal

(98.^6 ,^ 10)

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

) = 0.^50

C.^ P r(H

) = 1.^00

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.

  1. The negative binomial distribution is used when the number of successes is fixed andwe’re interested in the number of failures before reaching the fixed number of successes.An experiment which follows a negative binomial distribution will satisfy the followingrequirements:^ •^ The experiment consists of a sequence of independent trials.^ •^ Each trial has two possible outcomes, S or F.^ •^ The probability of success,

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,

1 ,^2 ,...

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^

  1. You are assisting a sociology student to assess his subjective probability of event A (whichis the event that he will receive an A in a particular graduate course in sociology). Youoffer him a choice of two games of chance:Game 1: he will win $100 if he gets an A in the courseGame 2: he will win $100 if you flip a fair coin and it comes up headsHe chooses game 2.(a) In what interval do you conclude that his subjective probability of event A lies? (givenumeric endpoints of interval)(b) Describe how you might specify the two games for the next step in assessing hissubjective probability. (Do this in the way that will produce the shortest interval inthe fewest steps.)