Question
Consider a univariate normal model with mean and variance . Suppose we use a Beta(2,2) prior for (somehow we know is between zero and one)
Consider a univariate normal model with mean and variance . Suppose we use a Beta(2,2) prior for (somehow we know is between zero and one) and a log-normal(1,10) prior for (recall that if a random variable X is log-normal(m, v) then logX is N(m, v)). Assume a priori that and are independent. Implement a Metropolis-Hastings algorithm to evaluate the posterior distribution of and . Remember that you have to jointly accept or reject and . Also compute the posterior probability that is bigger than 0.5.
Here are the data:
2.3656491
2.4952035
1.0837817
0.7586751
0.8780483
1.2765341
1.4598699
0.1801679
-1.0093589
1.4870201
-0.1193149
0.2578262
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started