Open ym-han opened 4 years ago
I'm not quite sure this is correct, shouldn't sample_μ
also be drawn from a normal distribution, Normal(178, 100)
?
While I think this would work here I'm not sure what I think about this in general since it won't generalize to other distributions while drawing from a Distribution
should.
Yes, I forgot to add
μ = Normal(178, 20) # for 4.14
σ = Uniform(0, 50)
μ_big_sd = Normal(178, 100) # for 4.15
ppd_new_μ = sample_h(μ_big_sd, σ)
I'll try to check if this works later today
Also, just to clarify: the key proposition I'm relying on with the sampling is this.
Let Y = μ+σZ, where Z∼N(0,1). Then Y∼N(μ,σ^2).
Might be worth noting that given how we're dealing with normals (linear transform of normals is also normal), another way to get the prior predictive distribution would be:
The crucial line is the ppd line; I included the rest because I was worried about making typos if I changed it to your notation/nomenclature.