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)
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
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!