joelgrus / data-science-from-scratch

code for Data Science From Scratch book
MIT License
8.63k stars 4.5k forks source link

Bayesian Inference unclear #48

Open TBOS87 opened 6 years ago

TBOS87 commented 6 years ago

Hi Joel,

Im am currently going through your book. I really like it although some things go a little quick for me. Especially chapter 7 on bayesian Inference. I understand that with bayesian inference you update your prior believes. like the example you give: beta(1,1) becomes beta(4,8) after 10 throws with 3 heads. Giving a probability of 0.33 .

What confuses me is the figure 7-1 and 7-2. How did you make these figures? Did you make them with the function "beta_pdf" on the page before (89). Then x is the number of throws and alpha and beta are the respecitve probabilities of heads and tails?

Best, Tijl