In The Bayesian Context Let The Prior Be F P E An Exp 1 And The Likelihood Be F X M 27e N M 1 A Norma 1 (151.97 KiB) Viewed 85 times
In the Bayesian context, let the prior be f(p) = e-' (an exp(1)) and the likelihood be f(x|m) – (27e*"") N(m,1), a normal distribution with mean m and variance 1. Simulate a distribution of x like the code on page 9 making the following changes: replace rbeta(...) with rexp(1) • replace rbinom (...) use rnorm (n=1, mean=p, sd=1) • to make it go faster, replace 1e6 with 100 or with 1000 (fewer simulated values) *Note, do not set a seed for the randomization. (a) (2 marks) Provide a histogram of your simulated distribution
(b) (2 marks) Give the five number summary using output from summary(xvalues)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!