Two parameter model
Centered on normal distribution
Background knowledge about Distribution
η∼Γ−1(α,β)p(η∣α,β)=Γ(α)βα(η1)α+1e−ηβMean:α−1β,Var:(α−1)2(α−2)β2 θ∼χ2(ν)≡Γ(ν/2,1/2)θ∼χ−2(ν,τ2)≡Γ−1(ν/2,ντ2/2) One parameter
Normal model with known mean
y∣σ2∼N(μ,σ2)σ2∼χ−2(ν0,σ02)σ2∣y∼χ−2(νn,σn2) νn=ν0+nσn2=ν0+nν0σ02+ns(y)f(y∣σ2)=h(y)c(σ2)exp(σ2s(y)) Two parameter
Normal data with a conjugate prior
p(y∣μ,σ2)∝σ−nexp(−2σ21Σ(yi−μ)2)p(μ,σ2)=p(μ∣σ2)p(σ2)∝σ−1(σ2)−(2ν0+1)exp[−2σ21(ν0σ02+κ0(μ0−μ)2)]Ninvχ2(μ0,σ02/κ0;ν0,σ02)μ∣σ2∼N(μ0,σ2/κ0)σ2∼χ−2(ν0,σ02) p(μ,σ2∣y)∼Ninvχ2(μn,κnσn2;νn,σn2)μn=κ0+nκ0μ0+κ0+nnyˉκn=κ0+nνn=ν0+n Example
(a) Give your posterior distribution for θ
y∣θ∼N(θ,202)θ∼N(180,402)θ∣y∼N(μ,τn2)τn2=1/τ02+n/σ21=1/1600+n/4001=1+4n1600μn=τn2(τ021μ0+σ2nyˉ)=1+4n180+600n (b) Give a posterior predictive distribution for y~
E(y~∣y)=E(E(y~∣μ)∣y)=E(μ∣y)=μnV(y~∣y)=E(V(y~∣μ)∣y)+V(E(y~∣μ)∣y)=σ2+τn2 y~∣y∼N(μn,400+τn2) (c) 95% posterior interval for θ and posterior predictive interval for y~(n=10)
95% posterior interval for θ∣y
(μn−1.9610τn,μ+1.9610τn)∵θ∣y∼N(μn,τn2) In the same way, we can also get posterior predictive interval with the distribution in (b)
(d) Do the same for n=100