> [!Example]- Table of Contents
> **I Bayesian Foundations**
> - [**1** The Big (Bayesian) Picture](https://www.bayesrulesbook.com/chapter-1)
> - [**1.1** Thinking like a Bayesian](https://www.bayesrulesbook.com/chapter-1#thinking-like-a-bayesian)
> - [**1.2** A quick history lesson](https://www.bayesrulesbook.com/chapter-1#a-quick-history-lesson)
> - [**1.3** A look ahead](https://www.bayesrulesbook.com/chapter-1#a-look-ahead)
> - [**1.4** Chapter summary](https://www.bayesrulesbook.com/chapter-1#chapter-summary)
> - [**1.5** Exercises](https://www.bayesrulesbook.com/chapter-1#exercises)
> - [**2** Bayes’ Rule](https://www.bayesrulesbook.com/chapter-2)
> - [**2.1** Building a Bayesian model for events](https://www.bayesrulesbook.com/chapter-2#building-a-bayesian-model-for-events "2.1 Building a Bayesian model for events")
> - [**2.2** Example: Pop vs soda vs coke](https://www.bayesrulesbook.com/chapter-2#michelle-simple)
> - [**2.3** Building a Bayesian model for random variables](https://www.bayesrulesbook.com/chapter-2#cousin-cole "2.3 Building a Bayesian model for random variables")
> - [**2.4** Chapter summary](https://www.bayesrulesbook.com/chapter-2#chapter-summary-1)
> - [**2.5** Exercises](https://www.bayesrulesbook.com/chapter-2#exercises-1)
> - [**3** The Beta-Binomial Bayesian Model](https://www.bayesrulesbook.com/chapter-3)
> - [**3.1** The Beta prior model](https://www.bayesrulesbook.com/chapter-3#ch3-prior)
> - [**3.2** The Binomial data model & likelihood function](https://www.bayesrulesbook.com/chapter-3#the-binomial-data-model-likelihood-function "3.2 The Binomial data model & likelihood function")
> - [**3.3** The Beta posterior model](https://www.bayesrulesbook.com/chapter-3#the-beta-posterior-model)
> - [**3.4** The Beta-Binomial model](https://www.bayesrulesbook.com/chapter-3#ch3-bbmodel)
> - [**3.5** Simulating the Beta-Binomial](https://www.bayesrulesbook.com/chapter-3#chapter-3-simulation)
> - [**3.6** Example: Milgram’s behavioral study of obedience](https://www.bayesrulesbook.com/chapter-3#milgram-3 "3.6 Example: Milgram’s behavioral study of obedience")
> - [**3.7** Chapter summary](https://www.bayesrulesbook.com/chapter-3#chapter-summary-2)
> - [**3.8** Exercises](https://www.bayesrulesbook.com/chapter-3#exercises-2)
> - [**4** Balance and Sequentiality in Bayesian Analyses](https://www.bayesrulesbook.com/chapter-4 "4 Balance and Sequentiality in Bayesian Analyses")
> - [**4.1** Different priors, different posteriors](https://www.bayesrulesbook.com/chapter-4#ch4-priors)
> - [**4.2** Different data, different posteriors](https://www.bayesrulesbook.com/chapter-4#ch4-data)
> - [**4.3** Striking a balance between the prior & data](https://www.bayesrulesbook.com/chapter-4#striking-a-balance-between-the-prior-data "4.3 Striking a balance between the prior & data")
> - [**4.4** Sequential analysis: Evolving with data](https://www.bayesrulesbook.com/chapter-4#ch4-sequential "4.4 Sequential analysis: Evolving with data")
> - [**4.5** Proving data order invariance](https://www.bayesrulesbook.com/chapter-4#proving-data-order-invariance)
> - [**4.6** Don’t be stubborn](https://www.bayesrulesbook.com/chapter-4#dont-be-stubborn)
> - [**4.7** A note on subjectivity](https://www.bayesrulesbook.com/chapter-4#a-note-on-subjectivity)
> - [**4.8** Chapter summary](https://www.bayesrulesbook.com/chapter-4#chapter-summary-3)
> - [**4.9** Exercises](https://www.bayesrulesbook.com/chapter-4#exercises-3)
> - [**5** Conjugate Families](https://www.bayesrulesbook.com/chapter-5)
> - [**5.1** Revisiting choice of prior](https://www.bayesrulesbook.com/chapter-5#revisiting-choice-of-prior)
> - [**5.2** Gamma-Poisson conjugate family](https://www.bayesrulesbook.com/chapter-5#gamma-poisson-conjugate-family)
> - [**5.3** Normal-Normal conjugate family](https://www.bayesrulesbook.com/chapter-5#normal-normal-conjugate-family)
> - [**5.4** Why no simulation in this chapter?](https://www.bayesrulesbook.com/chapter-5#why-no-simulation-in-this-chapter)
> - [**5.5** Critiques of conjugate family models](https://www.bayesrulesbook.com/chapter-5#critiques-of-conjugate-family-models "5.5 Critiques of conjugate family models")
> - [**5.6** Chapter summary](https://www.bayesrulesbook.com/chapter-5#chapter-summary-4)
> - [**5.7** Exercises](https://www.bayesrulesbook.com/chapter-5#exercises-4)
> **II Posterior Simulation & Analysis**
> - [**6** Approximating the Posterior](https://www.bayesrulesbook.com/chapter-6)
> - [**6.1** Grid approximation](https://www.bayesrulesbook.com/chapter-6#grid-approximation)
> - [**6.2** Markov chains via rstan](https://www.bayesrulesbook.com/chapter-6#markov-chains-via-rstan)
> - [**6.3** Markov chain diagnostics](https://www.bayesrulesbook.com/chapter-6#diagnostics)
> - [**6.4** Chapter summary](https://www.bayesrulesbook.com/chapter-6#chapter-summary-5)
> - [**6.5** Exercises](https://www.bayesrulesbook.com/chapter-6#exercises-5)
> - [**7** MCMC under the Hood](https://www.bayesrulesbook.com/chapter-7)
> - [**7.1** The big idea](https://www.bayesrulesbook.com/chapter-7#the-big-idea)
> - [**7.2** The Metropolis-Hastings algorithm](https://www.bayesrulesbook.com/chapter-7#the-metropolis-hastings-algorithm)
> - [**7.3** Implementing the Metropolis-Hastings](https://www.bayesrulesbook.com/chapter-7#ch7-implementation "7.3 Implementing the Metropolis-Hastings")
> - [**7.4** Tuning the Metropolis-Hastings algorithm](https://www.bayesrulesbook.com/chapter-7#tuning-the-metropolis-hastings-algorithm "7.4 Tuning the Metropolis-Hastings algorithm")
> - [**7.5** A Beta-Binomial example](https://www.bayesrulesbook.com/chapter-7#a-beta-binomial-example-1)
> - [**7.6** Why the algorithm works](https://www.bayesrulesbook.com/chapter-7#why-the-algorithm-works)
> - [**7.7** Variations on the theme](https://www.bayesrulesbook.com/chapter-7#variations-on-the-theme)
> - [**7.8** Chapter summary](https://www.bayesrulesbook.com/chapter-7#chapter-summary-6)
> - [**7.9** Exercises](https://www.bayesrulesbook.com/chapter-7#exercises-6)
> - [**8** Posterior Inference & Prediction](https://www.bayesrulesbook.com/chapter-8)
> - [**8.1** Posterior estimation](https://www.bayesrulesbook.com/chapter-8#chapter-8-estimation)
> - [**8.2** Posterior hypothesis testing](https://www.bayesrulesbook.com/chapter-8#posterior-hypothesis-testing)
> - [**8.3** Posterior prediction](https://www.bayesrulesbook.com/chapter-8#ch8-post-pred)
> - [**8.4** Posterior analysis with MCMC](https://www.bayesrulesbook.com/chapter-8#posterior-analysis-with-mcmc)
> - [**8.5** Bayesian benefits](https://www.bayesrulesbook.com/chapter-8#benefits-chapter-8)
> - [**8.6** Chapter summary](https://www.bayesrulesbook.com/chapter-8#chapter-summary-7)
> - [**8.7** Exercises](https://www.bayesrulesbook.com/chapter-8#exercises-7)
> **III Bayesian Regression & Classification**
> - [**9** Simple Normal Regression](https://www.bayesrulesbook.com/chapter-9)
> - [**9.1** Building the regression model](https://www.bayesrulesbook.com/chapter-9#building-the-regression-model)
> - [**9.2** Tuning prior models for regression parameters](https://www.bayesrulesbook.com/chapter-9#tuning-prior-models-for-regression-parameters "9.2 Tuning prior models for regression parameters")
> - [**9.3** Posterior simulation](https://www.bayesrulesbook.com/chapter-9#ch9-post-sim)
> - [**9.4** Interpreting the posterior](https://www.bayesrulesbook.com/chapter-9#interpreting-the-posterior)
> - [**9.5** Posterior prediction](https://www.bayesrulesbook.com/chapter-9#chapter-9-prediction)
> - [**9.6** Sequential regression modeling](https://www.bayesrulesbook.com/chapter-9#sequential-regression-modeling)
> - [**9.7** Using default rstanarm priors](https://www.bayesrulesbook.com/chapter-9#ch9-default)
> - [**9.8** You’re not done yet!](https://www.bayesrulesbook.com/chapter-9#youre-not-done-yet)
> - [**9.9** Chapter summary](https://www.bayesrulesbook.com/chapter-9#chapter-summary-8)
> - [**9.10** Exercises](https://www.bayesrulesbook.com/chapter-9#exercises-8)
> - [**10** Evaluating Regression Models](https://www.bayesrulesbook.com/chapter-10)
> - [**10.1** Is the model fair?](https://www.bayesrulesbook.com/chapter-10#is-the-model-fair)
> - [**10.2** How wrong is the model?](https://www.bayesrulesbook.com/chapter-10#chapter-10-wrong-model)
> - [**10.3** How accurate are the posterior predictive models?](https://www.bayesrulesbook.com/chapter-10#chapter-10-train-test "10.3 How accurate are the posterior predictive models?")
> - [**10.4** How good is the MCMC simulation vs how good is the model?](https://www.bayesrulesbook.com/chapter-10#how-good-is-the-mcmc-simulation-vs-how-good-is-the-model "10.4 How good is the MCMC simulation vs how good is the model?")
> - [**10.5** Chapter summary](https://www.bayesrulesbook.com/chapter-10#chapter-summary-9)
> - [**10.6** Exercises](https://www.bayesrulesbook.com/chapter-10#exercises-9)
> - [**11** Extending the Normal Regression Model](https://www.bayesrulesbook.com/chapter-11 "11 Extending the Normal Regression Model")
> - [**11.1** Utilizing a categorical predictor](https://www.bayesrulesbook.com/chapter-11#utilizing-a-categorical-predictor)
> - [**11.2** Utilizing two predictors](https://www.bayesrulesbook.com/chapter-11#ch-11-2-predictors)
> - [**11.3** Optional: Utilizing interaction terms](https://www.bayesrulesbook.com/chapter-11#optional-utilizing-interaction-terms "11.3 Optional: Utilizing interaction terms")
> - [**11.4** Dreaming bigger: Utilizing more than 2 predictors!](https://www.bayesrulesbook.com/chapter-11#ch11-more "11.4 Dreaming bigger: Utilizing more than 2 predictors!")
> - [**11.5** Model evaluation & comparison](https://www.bayesrulesbook.com/chapter-11#ch11-model-comparison)
> - [**11.6** Chapter summary](https://www.bayesrulesbook.com/chapter-11#chapter-summary-10)
> - [**11.7** Exercises](https://www.bayesrulesbook.com/chapter-11#exercises-10)
> - [**12** Poisson & Negative Binomial Regression](https://www.bayesrulesbook.com/chapter-12 "12 Poisson & Negative Binomial Regression")
> - [**12.1** Building the Poisson regression model](https://www.bayesrulesbook.com/chapter-12#building-the-poisson-regression-model "12.1 Building the Poisson regression model")
> - [**12.2** Simulating the posterior](https://www.bayesrulesbook.com/chapter-12#ch12-simulation)
> - [**12.3** Interpreting the posterior](https://www.bayesrulesbook.com/chapter-12#ch12-interp-pois)
> - [**12.4** Posterior prediction](https://www.bayesrulesbook.com/chapter-12#posterior-prediction-1)
> - [**12.5** Model evaluation](https://www.bayesrulesbook.com/chapter-12#model-evaluation)
> - [**12.6** Negative Binomial regression for overdispersed counts](https://www.bayesrulesbook.com/chapter-12#chapter-12-overdispersion "12.6 Negative Binomial regression for overdispersed counts")
> - [**12.7** Generalized linear models: Building on the theme](https://www.bayesrulesbook.com/chapter-12#ch12-glm "12.7 Generalized linear models: Building on the theme")
> - [**12.8** Chapter summary](https://www.bayesrulesbook.com/chapter-12#chapter-summary-11)
> - [**12.9** Exercises](https://www.bayesrulesbook.com/chapter-12#exercises-11)
> - [**13** Logistic Regression](https://www.bayesrulesbook.com/chapter-13)
> - [**13.1** Pause: Odds & probability](https://www.bayesrulesbook.com/chapter-13#pause-odds-probability)
> - [**13.2** Building the logistic regression model](https://www.bayesrulesbook.com/chapter-13#building-the-logistic-regression-model "13.2 Building the logistic regression model")
> - [**13.3** Simulating the posterior](https://www.bayesrulesbook.com/chapter-13#ch13-post-sim-sec)
> - [**13.4** Prediction & classification](https://www.bayesrulesbook.com/chapter-13#chapter-13-prediction)
> - [**13.5** Model evaluation](https://www.bayesrulesbook.com/chapter-13#model-evaluation-1)
> - [**13.6** Extending the model](https://www.bayesrulesbook.com/chapter-13#extending-the-model)
> - [**13.7** Chapter summary](https://www.bayesrulesbook.com/chapter-13#chapter-summary-12)
> - [**13.8** Exercises](https://www.bayesrulesbook.com/chapter-13#exercises-12)
> - [**14** Naive Bayes Classification](https://www.bayesrulesbook.com/chapter-14)
> - [**14.1** Classifying one penguin](https://www.bayesrulesbook.com/chapter-14#naive-one-case)
> - [**14.2** Implementing & evaluating naive Bayes classification](https://www.bayesrulesbook.com/chapter-14#implementing-evaluating-naive-bayes-classification "14.2 Implementing & evaluating naive Bayes classification")
> - [**14.3** Naive Bayes vs logistic regression](https://www.bayesrulesbook.com/chapter-14#naive-bayes-vs-logistic-regression "14.3 Naive Bayes vs logistic regression")
> - [**14.4** Chapter summary](https://www.bayesrulesbook.com/chapter-14#chapter-summary-13)
> - [**14.5** Exercises](https://www.bayesrulesbook.com/chapter-14#exercises-13)
> **IV Hierarchical Bayesian models**
> - [**15** Hierarchical Models are Exciting](https://www.bayesrulesbook.com/chapter-15)
> - [**15.1** Complete pooling](https://www.bayesrulesbook.com/chapter-15#ch15-complete)
> - [**15.2** No pooling](https://www.bayesrulesbook.com/chapter-15#no-pooling)
> - [**15.3** Hierarchical data](https://www.bayesrulesbook.com/chapter-15#hierarchical-data)
> - [**15.4** Partial pooling with hierarchical models](https://www.bayesrulesbook.com/chapter-15#partial-pooling-with-hierarchical-models "15.4 Partial pooling with hierarchical models")
> - [**15.5** Chapter summary](https://www.bayesrulesbook.com/chapter-15#chapter-summary-14)
> - [**15.6** Exercises](https://www.bayesrulesbook.com/chapter-15#exercises-14)
> - [**16** (Normal) Hierarchical Models without Predictors](https://www.bayesrulesbook.com/chapter-16 "16 (Normal) Hierarchical Models without Predictors")
> - [**16.1** Complete pooled model](https://www.bayesrulesbook.com/chapter-16#chapter-16-complete-pooling)
> - [**16.2** No pooled model](https://www.bayesrulesbook.com/chapter-16#chapter-16-no-pooling)
> - [**16.3** Building the hierarchical model](https://www.bayesrulesbook.com/chapter-16#hierarchical-building-16)
> - [**16.4** Posterior analysis](https://www.bayesrulesbook.com/chapter-16#ch-16-analyze)
> - [**16.5** Posterior prediction](https://www.bayesrulesbook.com/chapter-16#ch16-prediction)
> - [**16.6** Shrinkage & the bias-variance trade-off](https://www.bayesrulesbook.com/chapter-16#shrinkage-the-bias-variance-trade-off "16.6 Shrinkage & the bias-variance trade-off")
> - [**16.7** Not everything is hierarchical](https://www.bayesrulesbook.com/chapter-16#ch-16-nonhierarchical)
> - [**16.8** Chapter summary](https://www.bayesrulesbook.com/chapter-16#chapter-summary-15)
> - [**16.9** Exercises](https://www.bayesrulesbook.com/chapter-16#exercises-15)
> - [**17** (Normal) Hierarchical Models with Predictors](https://www.bayesrulesbook.com/chapter-17 "17 (Normal) Hierarchical Models with Predictors")
> - [**17.1** First steps: Complete pooling](https://www.bayesrulesbook.com/chapter-17#first-steps-complete-pooling)
> - [**17.2** Hierarchical model with varying intercepts](https://www.bayesrulesbook.com/chapter-17#hierarchical-model-with-varying-intercepts "17.2 Hierarchical model with varying intercepts")
> - [**17.3** Hierarchical model with varying intercepts & slopes](https://www.bayesrulesbook.com/chapter-17#hierarchical-model-with-varying-intercepts-slopes "17.3 Hierarchical model with varying intercepts & slopes")
> - [**17.4** Model evaluation & selection](https://www.bayesrulesbook.com/chapter-17#model-evaluation-selection)
> - [**17.5** Posterior prediction](https://www.bayesrulesbook.com/chapter-17#posterior-prediction-2)
> - [**17.6** Details: Longitudinal data](https://www.bayesrulesbook.com/chapter-17#details-longitudinal-data)
> - [**17.7** Example: Danceability](https://www.bayesrulesbook.com/chapter-17#example-danceability)
> - [**17.8** Chapter summary](https://www.bayesrulesbook.com/chapter-17#chapter-summary-16)
> - [**17.9** Exercises](https://www.bayesrulesbook.com/chapter-17#exercises-16)
> - [**18** Non-Normal Hierarchical Regression & Classification](https://www.bayesrulesbook.com/chapter-18 "18 Non-Normal Hierarchical Regression & Classification")
> - [**18.1** Hierarchical logistic regression](https://www.bayesrulesbook.com/chapter-18#hierarchical-logistic-regression)
> - [**18.2** Hierarchical Poisson & Negative Binomial regression](https://www.bayesrulesbook.com/chapter-18#hierarchical-poisson-negative-binomial-regression "18.2 Hierarchical Poisson & Negative Binomial regression")
> - [**18.3** Chapter summary](https://www.bayesrulesbook.com/chapter-18#chapter-summary-17)
> - [**18.4** Exercises](https://www.bayesrulesbook.com/chapter-18#exercises-17)
> - [**19** Adding More Layers](https://www.bayesrulesbook.com/chapter-19)
> - [**19.1** Group-level predictors](https://www.bayesrulesbook.com/chapter-19#group-level-predictors)
> - [**19.2** Incorporating two (or more!) grouping variables](https://www.bayesrulesbook.com/chapter-19#incorporating-two-or-more-grouping-variables "19.2 Incorporating two (or more!) grouping variables")
> - [**19.3** Exercises](https://www.bayesrulesbook.com/chapter-19#exercises-18)
> - [**19.4** Goodbye!](https://www.bayesrulesbook.com/chapter-19#goodbye)
> - [References](https://www.bayesrulesbook.com/references)