Question: We will use the Minitab macro BinoGCP.mac or the equivalent R function to find the posterior distribution of the binomial probability when the observation

We will use the Minitab macro BinoGCP.mac or the equivalent R function to find the posterior distribution of the binomial probability π when the observation distribution of Y |π is binomial (n, π) and we have a general continuous prior for π. Suppose the prior has the shape given by g(π) =





π for π ≤ .2

.2 for .2 <π<.3

.5 − π for .3 < π ≤ .5 0 for .5 < π

.

Store the values of π and prior g(π)in columns c1 and c2, respectively. Suppose out of n = 20 independent trials, y = 7 successes were observed.

(a) Use BinoGCP.mac or the equivalent R function to determine the posterior distribution g(π|y). Details for invoking BinoGCP.mac and the equivalent R function are in Appendix 3 and Appendix 4, respectively.

(b) Use tintegral.mac ind the posterior mean and posterior standard deviation of π. Details for invoking tintegral.mac and the equivalent R function are in Appendix 3 and Appendix 4, respectively.

(c) Find a 95% credible interval for π by using tintegral.mac or the equivalent R function.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Statistics Econometrics Questions!