11.07.2015 Views

statisticalrethinkin..

statisticalrethinkin..

statisticalrethinkin..

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.3. A GAUSSIAN MODEL OF HEIGHT 99Density0.0 0.1 0.2 0.3 0.44 6 8 10 12sigmaFIGURE 4.4. Samples from the posterior for only 20 adult heights, instead ofthe full set of 352. On the le: Samples of µ and σ drawn from the posterior.On the right: e posterior of σ, averaging over µ. e black curve is acomparison to a Gaussian distribution with the same mean and variance.Unlike for the posterior from the full set of 352 heights, now the uncertaintyin σ is asymmetrical, with a long tail towards larger values. Your own plotswill look a bit different, because the 20 heights are sampled randomly.definition you were introduced to earlier in this chapter. Each line in the definition hasa corresponding definition in the form of R code. e engine inside map then uses thesedefinitions to define the posterior probability at each combination of parameter values. enit can climb the posterior distribution and find the peak, its MAP.Let’s begin by repeating the code to load the data and select out the adults:library(rethinking)data(Howell1)d

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!