- 1 (250.04 KiB) Viewed 77 times
(r–m)2) - 2 In the Bayesian context, let the prior be f(p) = 2-4 (an exp(1)) and the likelihood be f(x|m) 2пе N(m, 1), a
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
(r–m)2) - 2 In the Bayesian context, let the prior be f(p) = 2-4 (an exp(1)) and the likelihood be f(x|m) 2пе N(m, 1), a
(r–m)2) - 2 In the Bayesian context, let the prior be f(p) = 2-4 (an exp(1)) and the likelihood be f(x|m) 2пе N(m, 1), a normal distribution with mean m and variance 1. Suppose we observe the single value x 3. Copy the code on page 14 making the following changes: = • Instead of a sequence from 0 to 1, use a sequence from -5 to 10 • instead of the likelihood using dbinom (...) use dnorm(x=3, mean=p, sd=1) • instead of the prior using dbeta(...) use dexp(p,rate=1) • Don't forget to rescale like on the top of page 16 (a) (1 mark) Find a 95% credible interval for the mean (b) (1 mark) Give a plot (like a barplot) for the posterior (c) (1 mark) Explain why the distribution looks cut off