第二章
Folding garden example.
We want P(theta|D),
we first P(D|theta), to see the plausibility of D, given different theta.
Likelihood = dbinom(参见二项分布)
unstandardized posterior = likelihood*prior
Standardized posterior = Ust.P/sum(Ust.P)
Three ways to approximate the posterior:
- Grid approximation (simple, works well for small data but data with a lot of parameters)**changing prior? E.g., All the same:1
- Quadratic approximation (Gaussian, the more data the better, Analytical calculation)**fomular unclear.
- MCMC. (In later chapter)
Coding~