Question: Binomial (unknown , n) beta/Poisson model. Consider a binomial sampling model x | , n Bi(n, ). a. For fixed n and
Binomial (unknown θ, n) ∧ beta/Poisson model. Consider a binomial sampling model x | θ, n ∼ Bi(n, θ).
a. For fixed n and θ ∼ Be(a0, b0), find the marginal distribution p(x). This distribution is known as beta-binomial (cf. Section 3.1).
b. Assume now that also n is unknown, h(n) ∝ 1/n 2
. Plot the joint posterior distribution h(n, θ | x) for x = 50, and (a0, b0) = (1, 4).
Hint: Use a grid on 0.01
≤ θ ≤ 0.99 and x ≤ n ≤ 500. Use the R function lgamma(n+1) to evaluate ln(n!).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
