http://bayesrulesbook.com/./ | Internal Links | Dofollow |
News | Internal Links | Dofollow |
Foreword | Internal Links | Dofollow |
Preface | Internal Links | Dofollow |
Audience | Internal Links | Dofollow |
Navigating this book | Internal Links | Dofollow |
Getting set up | Internal Links | Dofollow |
Accessibility and inclusion | Internal Links | Dofollow |
Contact us | Internal Links | Dofollow |
Acknowledgments | Internal Links | Dofollow |
License | Internal Links | Dofollow |
About the Authors | Internal Links | Dofollow |
1 The Big (Bayesian) Picture | Internal Links | Dofollow |
1.1 Thinking like a Bayesian | Internal Links | Dofollow |
1.1.1 Quiz yourself | Internal Links | Dofollow |
1.1.2 The meaning of probability | Internal Links | Dofollow |
1.1.3 The Bayesian balancing act | Internal Links | Dofollow |
1.1.4 Asking questions | Internal Links | Dofollow |
1.2 A quick history lesson | Internal Links | Dofollow |
1.3 A look ahead | Internal Links | Dofollow |
1.3.1 Unit 1: Bayesian foundations | Internal Links | Dofollow |
1.3.2 Unit 2: Posterior simulation & analysis | Internal Links | Dofollow |
1.3.3 Unit 3: Bayesian regression & classification | Internal Links | Dofollow |
1.3.4 Unit 4: Hierarchical Bayesian models | Internal Links | Dofollow |
1.4 Chapter summary | Internal Links | Dofollow |
1.5 Exercises | Internal Links | Dofollow |
2 Bayes’ Rule | Internal Links | Dofollow |
2.1 Building a Bayesian model for events | Internal Links | Dofollow |
2.1.1 Prior probability model | Internal Links | Dofollow |
2.1.2 Conditional probability & likelihood | Internal Links | Dofollow |
2.1.3 Normalizing constants | Internal Links | Dofollow |
2.1.4 Posterior probability model via Bayes’ Rule! | Internal Links | Dofollow |
2.1.5 Posterior simulation | Internal Links | Dofollow |
2.2 Example: Pop vs soda vs coke | Internal Links | Dofollow |
2.3 Building a Bayesian model for random variables | Internal Links | Dofollow |
2.3.1 Prior probability model | Internal Links | Dofollow |
2.3.2 The Binomial data model | Internal Links | Dofollow |
2.3.3 The Binomial likelihood function | Internal Links | Dofollow |
2.3.4 Normalizing constant | Internal Links | Dofollow |
2.3.5 Posterior probability model | Internal Links | Dofollow |
2.3.6 Posterior shortcut | Internal Links | Dofollow |
2.3.7 Posterior simulation | Internal Links | Dofollow |
2.4 Chapter summary | Internal Links | Dofollow |
2.5 Exercises | Internal Links | Dofollow |
2.5.1 Building up to Bayes’ Rule | Internal Links | Dofollow |
2.5.2 Practice Bayes’ Rule for events | Internal Links | Dofollow |
2.5.3 Practice Bayes’ Rule for random variables | Internal Links | Dofollow |
2.5.4 Simulation exercises | Internal Links | Dofollow |
3 The Beta-Binomial Bayesian Model | Internal Links | Dofollow |
3.1 The Beta prior model | Internal Links | Dofollow |
3.1.1 Beta foundations | Internal Links | Dofollow |
3.1.2 Tuning the Beta prior | Internal Links | Dofollow |
3.2 The Binomial data model & likelihood function | Internal Links | Dofollow |
3.3 The Beta posterior model | Internal Links | Dofollow |
3.4 The Beta-Binomial model | Internal Links | Dofollow |
3.5 Simulating the Beta-Binomial | Internal Links | Dofollow |
3.6 Example: Milgram’s behavioral study of obedience | Internal Links | Dofollow |
3.6.1 A Bayesian analysis | Internal Links | Dofollow |
3.6.2 The role of ethics in statistics and data science | Internal Links | Dofollow |
3.7 Chapter summary | Internal Links | Dofollow |
3.8 Exercises | Internal Links | Dofollow |
3.8.1 Practice: Beta prior models | Internal Links | Dofollow |
3.8.2 Practice: Beta-Binomial models | Internal Links | Dofollow |
4 Balance and Sequentiality in Bayesian Analyses | Internal Links | Dofollow |
4.1 Different priors, different posteriors | Internal Links | Dofollow |
4.2 Different data, different posteriors | Internal Links | Dofollow |
4.3 Striking a balance between the prior & data | Internal Links | Dofollow |
4.3.1 Connecting observations to concepts | Internal Links | Dofollow |
4.3.2 Connecting concepts to theory | Internal Links | Dofollow |
4.4 Sequential analysis: Evolving with data | Internal Links | Dofollow |
4.5 Proving data order invariance | Internal Links | Dofollow |
4.6 Don’t be stubborn | Internal Links | Dofollow |
4.7 A note on subjectivity | Internal Links | Dofollow |
4.8 Chapter summary | Internal Links | Dofollow |
4.9 Exercises | Internal Links | Dofollow |
4.9.1 Review exercises | Internal Links | Dofollow |
4.9.2 Practice: Different priors, different posteriors | Internal Links | Dofollow |
4.9.3 Practice: Balancing the data & prior | Internal Links | Dofollow |
4.9.4 Practice: Sequentiality | Internal Links | Dofollow |
5 Conjugate Families | Internal Links | Dofollow |
5.1 Revisiting choice of prior | Internal Links | Dofollow |
5.2 Gamma-Poisson conjugate family | Internal Links | Dofollow |
5.2.1 The Poisson data model | Internal Links | Dofollow |
5.2.2 Potential priors | Internal Links | Dofollow |
5.2.3 Gamma prior | Internal Links | Dofollow |
5.2.4 Gamma-Poisson conjugacy | Internal Links | Dofollow |
5.3 Normal-Normal conjugate family | Internal Links | Dofollow |
5.3.1 The Normal data model | Internal Links | Dofollow |
5.3.2 Normal prior | Internal Links | Dofollow |
5.3.3 Normal-Normal conjugacy | Internal Links | Dofollow |
5.3.4 Optional: Proving Normal-Normal conjugacy | Internal Links | Dofollow |
5.4 Why no simulation in this chapter? | Internal Links | Dofollow |
5.5 Critiques of conjugate family models | Internal Links | Dofollow |
5.6 Chapter summary | Internal Links | Dofollow |
5.7 Exercises | Internal Links | Dofollow |
5.7.1 Practice: Gamma-Poisson | Internal Links | Dofollow |
5.7.2 Practice: Normal-Normal | Internal Links | Dofollow |
5.7.3 General practice exercises | Internal Links | Dofollow |
6 Approximating the Posterior | Internal Links | Dofollow |
6.1 Grid approximation | Internal Links | Dofollow |
6.1.1 A Beta-Binomial example | Internal Links | Dofollow |
6.1.2 A Gamma-Poisson example | Internal Links | Dofollow |
6.1.3 Limitations | Internal Links | Dofollow |
6.2 Markov chains via rstan | Internal Links | Dofollow |
6.2.1 A Beta-Binomial example | Internal Links | Dofollow |
6.2.2 A Gamma-Poisson example | Internal Links | Dofollow |
6.3 Markov chain diagnostics | Internal Links | Dofollow |
6.3.1 Examining trace plots | Internal Links | Dofollow |
6.3.2 Comparing parallel chains | Internal Links | Dofollow |
6.3.3 Calculating effective sample size & autocorrelation | Internal Links | Dofollow |
6.3.4 Calculating R-hat | Internal Links | Dofollow |
6.4 Chapter summary | Internal Links | Dofollow |
6.5 Exercises | Internal Links | Dofollow |
6.5.1 Conceptual exercises | Internal Links | Dofollow |
6.5.2 Practice: Grid approximation | Internal Links | Dofollow |
6.5.3 Practice: MCMC | Internal Links | Dofollow |
7 MCMC under the Hood | Internal Links | Dofollow |
7.1 The big idea | Internal Links | Dofollow |
7.2 The Metropolis-Hastings algorithm | Internal Links | Dofollow |
7.3 Implementing the Metropolis-Hastings | Internal Links | Dofollow |
7.4 Tuning the Metropolis-Hastings algorithm | Internal Links | Dofollow |
7.5 A Beta-Binomial example | Internal Links | Dofollow |
7.6 Why the algorithm works | Internal Links | Dofollow |
7.7 Variations on the theme | Internal Links | Dofollow |
7.8 Chapter summary | Internal Links | Dofollow |
7.9 Exercises | Internal Links | Dofollow |
7.9.1 Conceptual exercises | Internal Links | Dofollow |
7.9.2 Practice: Normal-Normal simulation | Internal Links | Dofollow |
7.9.3 Practice: Simulating more Bayesian models | Internal Links | Dofollow |
8 Posterior Inference & Prediction | Internal Links | Dofollow |
8.1 Posterior estimation | Internal Links | Dofollow |
8.2 Posterior hypothesis testing | Internal Links | Dofollow |
8.2.1 One-sided tests | Internal Links | Dofollow |
8.2.2 Two-sided tests | Internal Links | Dofollow |
8.3 Posterior prediction | Internal Links | Dofollow |
8.4 Posterior analysis with MCMC | Internal Links | Dofollow |
8.4.1 Posterior simulation | Internal Links | Dofollow |
8.4.2 Posterior estimation & hypothesis testing | Internal Links | Dofollow |
8.4.3 Posterior prediction | Internal Links | Dofollow |
8.5 Bayesian benefits | Internal Links | Dofollow |
8.6 Chapter summary | Internal Links | Dofollow |
8.7 Exercises | Internal Links | Dofollow |
8.7.1 Conceptual exercises | Internal Links | Dofollow |
8.7.2 Practice exercises | Internal Links | Dofollow |
8.7.3 Applied exercises | Internal Links | Dofollow |
9 Simple Normal Regression | Internal Links | Dofollow |
9.1 Building the regression model | Internal Links | Dofollow |
9.1.1 Specifying the data model | Internal Links | Dofollow |
9.1.2 Specifying the priors | Internal Links | Dofollow |
9.1.3 Putting it all together | Internal Links | Dofollow |
9.2 Tuning prior models for regression parameters | Internal Links | Dofollow |
9.3 Posterior simulation | Internal Links | Dofollow |
9.3.1 Simulation via rstanarm | Internal Links | Dofollow |
9.3.2 Optional: Simulation via rstan | Internal Links | Dofollow |
9.4 Interpreting the posterior | Internal Links | Dofollow |
9.5 Posterior prediction | Internal Links | Dofollow |
9.5.1 Building a posterior predictive model | Internal Links | Dofollow |
9.5.2 Posterior prediction with rstanarm | Internal Links | Dofollow |
9.6 Sequential regression modeling | Internal Links | Dofollow |
9.7 Using default rstanarm priors | Internal Links | Dofollow |
9.8 You’re not done yet! | Internal Links | Dofollow |
9.9 Chapter summary | Internal Links | Dofollow |
9.10 Exercises | Internal Links | Dofollow |
9.10.1 Conceptual exercises | Internal Links | Dofollow |
9.10.2 Applied exercises | Internal Links | Dofollow |
10 Evaluating Regression Models | Internal Links | Dofollow |
10.1 Is the model fair? | Internal Links | Dofollow |
10.2 How wrong is the model? | Internal Links | Dofollow |
10.2.1 Checking the model assumptions | Internal Links | Dofollow |
10.2.2 Dealing with wrong models | Internal Links | Dofollow |
10.3 How accurate are the posterior predictive models? | Internal Links | Dofollow |
10.3.1 Posterior predictive summaries | Internal Links | Dofollow |
10.3.2 Cross-validation | Internal Links | Dofollow |
10.3.3 Expected log-predictive density | Internal Links | Dofollow |
10.3.4 Improving posterior predictive accuracy | Internal Links | Dofollow |
10.4 How good is the MCMC simulation vs how good is the model? | Internal Links | Dofollow |
10.5 Chapter summary | Internal Links | Dofollow |
10.6 Exercises | Internal Links | Dofollow |
10.6.1 Conceptual exercises | Internal Links | Dofollow |
10.6.2 Applied exercises | Internal Links | Dofollow |
10.6.3 Open-ended exercises | Internal Links | Dofollow |
11 Extending the Normal Regression Model | Internal Links | Dofollow |
11.1 Utilizing a categorical predictor | Internal Links | Dofollow |
11.1.1 Building the model | Internal Links | Dofollow |
11.1.2 Simulating the posterior | Internal Links | Dofollow |
11.2 Utilizing two predictors | Internal Links | Dofollow |
11.2.1 Building the model | Internal Links | Dofollow |
11.2.2 Understanding the priors | Internal Links | Dofollow |
11.2.3 Simulating the posterior | Internal Links | Dofollow |
11.2.4 Posterior prediction | Internal Links | Dofollow |
11.3 Optional: Utilizing interaction terms | Internal Links | Dofollow |
11.3.1 Building the model | Internal Links | Dofollow |
11.3.2 Simulating the posterior | Internal Links | Dofollow |
11.3.3 Do you need an interaction term? | Internal Links | Dofollow |
11.4 Dreaming bigger: Utilizing more than 2 predictors! | Internal Links | Dofollow |
11.5 Model evaluation & comparison | Internal Links | Dofollow |
11.5.1 Evaluating predictive accuracy using visualizations | Internal Links | Dofollow |
11.5.2 Evaluating predictive accuracy using cross-validation | Internal Links | Dofollow |
11.5.3 Evaluating predictive accuracy using ELPD | Internal Links | Dofollow |
11.5.4 The bias-variance trade-off | Internal Links | Dofollow |
11.6 Chapter summary | Internal Links | Dofollow |
11.7 Exercises | Internal Links | Dofollow |
11.7.1 Conceptual exercises | Internal Links | Dofollow |
11.7.2 Applied exercises | Internal Links | Dofollow |
11.7.3 Open-ended exercises | Internal Links | Dofollow |
12 Poisson & Negative Binomial Regression | Internal Links | Dofollow |
12.1 Building the Poisson regression model | Internal Links | Dofollow |
12.1.1 Specifying the data model | Internal Links | Dofollow |
12.1.2 Specifying the priors | Internal Links | Dofollow |
12.2 Simulating the posterior | Internal Links | Dofollow |
12.3 Interpreting the posterior | Internal Links | Dofollow |
12.4 Posterior prediction | Internal Links | Dofollow |
12.5 Model evaluation | Internal Links | Dofollow |
12.6 Negative Binomial regression for overdispersed counts | Internal Links | Dofollow |
12.7 Generalized linear models: Building on the theme | Internal Links | Dofollow |
12.8 Chapter summary | Internal Links | Dofollow |
12.9 Exercises | Internal Links | Dofollow |
12.9.1 Conceptual exercises | Internal Links | Dofollow |
12.9.2 Applied exercises | Internal Links | Dofollow |
13 Logistic Regression | Internal Links | Dofollow |
13.1 Pause: Odds & probability | Internal Links | Dofollow |
13.2 Building the logistic regression model | Internal Links | Dofollow |
13.2.1 Specifying the data model | Internal Links | Dofollow |
13.2.2 Specifying the priors | Internal Links | Dofollow |
13.3 Simulating the posterior | Internal Links | Dofollow |
13.4 Prediction & classification | Internal Links | Dofollow |
13.5 Model evaluation | Internal Links | Dofollow |
13.6 Extending the model | Internal Links | Dofollow |
13.7 Chapter summary | Internal Links | Dofollow |
13.8 Exercises | Internal Links | Dofollow |
13.8.1 Conceptual exercises | Internal Links | Dofollow |
13.8.2 Applied exercises | Internal Links | Dofollow |
13.8.3 Open-ended exercises | Internal Links | Dofollow |
14 Naive Bayes Classification | Internal Links | Dofollow |
14.1 Classifying one penguin | Internal Links | Dofollow |
14.1.1 One categorical predictor | Internal Links | Dofollow |
14.1.2 One quantitative predictor | Internal Links | Dofollow |
14.1.3 Two predictors | Internal Links | Dofollow |
14.2 Implementing & evaluating naive Bayes classification | Internal Links | Dofollow |
14.3 Naive Bayes vs logistic regression | Internal Links | Dofollow |
14.4 Chapter summary | Internal Links | Dofollow |
14.5 Exercises | Internal Links | Dofollow |
14.5.1 Conceptual exercises | Internal Links | Dofollow |
14.5.2 Applied exercises | Internal Links | Dofollow |
14.5.3 Open-ended exercises | Internal Links | Dofollow |
15 Hierarchical Models are Exciting | Internal Links | Dofollow |
15.1 Complete pooling | Internal Links | Dofollow |
15.2 No pooling | Internal Links | Dofollow |
15.3 Hierarchical data | Internal Links | Dofollow |
15.4 Partial pooling with hierarchical models | Internal Links | Dofollow |
15.5 Chapter summary | Internal Links | Dofollow |
15.6 Exercises | Internal Links | Dofollow |
15.6.1 Conceptual exercises | Internal Links | Dofollow |
15.6.2 Applied exercises | Internal Links | Dofollow |
16 (Normal) Hierarchical Models without Predictors | Internal Links | Dofollow |
16.1 Complete pooled model | Internal Links | Dofollow |
16.2 No pooled model | Internal Links | Dofollow |
16.3 Building the hierarchical model | Internal Links | Dofollow |
16.3.1 The hierarchy | Internal Links | Dofollow |
16.3.2 Another way to think about it | Internal Links | Dofollow |
16.3.3 Within- vs between-group variability | Internal Links | Dofollow |
16.4 Posterior analysis | Internal Links | Dofollow |
16.4.1 Posterior simulation | Internal Links | Dofollow |
16.4.2 Posterior analysis of global parameters | Internal Links | Dofollow |
16.4.3 Posterior analysis of group-specific parameters | Internal Links | Dofollow |
16.5 Posterior prediction | Internal Links | Dofollow |
16.6 Shrinkage & the bias-variance trade-off | Internal Links | Dofollow |
16.7 Not everything is hierarchical | Internal Links | Dofollow |
16.8 Chapter summary | Internal Links | Dofollow |
16.9 Exercises | Internal Links | Dofollow |
16.9.1 Conceptual exercises | Internal Links | Dofollow |
16.9.2 Applied exercises | Internal Links | Dofollow |
17 (Normal) Hierarchical Models with Predictors | Internal Links | Dofollow |
17.1 First steps: Complete pooling | Internal Links | Dofollow |
17.2 Hierarchical model with varying intercepts | Internal Links | Dofollow |
17.2.1 Model building | Internal Links | Dofollow |
17.2.2 Another way to think about it | Internal Links | Dofollow |
17.2.3 Tuning the prior | Internal Links | Dofollow |
17.2.4 Posterior simulation & analysis | Internal Links | Dofollow |
17.3 Hierarchical model with varying intercepts & slopes | Internal Links | Dofollow |
17.3.1 Model building | Internal Links | Dofollow |
17.3.2 Optional: The decomposition of covariance model | Internal Links | Dofollow |
17.3.3 Posterior simulation & analysis | Internal Links | Dofollow |
17.4 Model evaluation & selection | Internal Links | Dofollow |
17.5 Posterior prediction | Internal Links | Dofollow |
17.6 Details: Longitudinal data | Internal Links | Dofollow |
17.7 Example: Danceability | Internal Links | Dofollow |
17.8 Chapter summary | Internal Links | Dofollow |
17.9 Exercises | Internal Links | Dofollow |
17.9.1 Conceptual exercises | Internal Links | Dofollow |
17.9.2 Applied exercises | Internal Links | Dofollow |
17.9.3 Open-ended exercises | Internal Links | Dofollow |
18 Non-Normal Hierarchical Regression & Classification | Internal Links | Dofollow |
18.1 Hierarchical logistic regression | Internal Links | Dofollow |
18.1.1 Model building & simulation | Internal Links | Dofollow |
18.1.2 Posterior analysis | Internal Links | Dofollow |
18.1.3 Posterior classification | Internal Links | Dofollow |
18.1.4 Model evaluation | Internal Links | Dofollow |
18.2 Hierarchical Poisson & Negative Binomial regression | Internal Links | Dofollow |
18.2.1 Model building & simulation | Internal Links | Dofollow |
18.2.2 Posterior analysis | Internal Links | Dofollow |
18.2.3 Model evaluation | Internal Links | Dofollow |
18.3 Chapter summary | Internal Links | Dofollow |
18.4 Exercises | Internal Links | Dofollow |
18.4.1 Applied & conceptual exercises | Internal Links | Dofollow |
18.4.2 Open-ended exercises | Internal Links | Dofollow |
19 Adding More Layers | Internal Links | Dofollow |
19.1 Group-level predictors | Internal Links | Dofollow |
19.1.1 A model using only individual-level predictors | Internal Links | Dofollow |
19.1.2 Incorporating group-level predictors | Internal Links | Dofollow |
19.1.3 Posterior simulation & global analysis | Internal Links | Dofollow |
19.1.4 Posterior group-level analysis | Internal Links | Dofollow |
19.1.5 We’re just scratching the surface! | Internal Links | Dofollow |
19.2 Incorporating two (or more!) grouping variables | Internal Links | Dofollow |
19.2.1 Data with two grouping variables | Internal Links | Dofollow |
19.2.2 Building a model with two grouping variables | Internal Links | Dofollow |
19.2.3 Simulating models with two grouping variables | Internal Links | Dofollow |
19.2.4 Examining the group-specific parameters | Internal Links | Dofollow |
19.2.5 We’re just scratching the surface! | Internal Links | Dofollow |
19.3 Exercises | Internal Links | Dofollow |
19.3.1 Conceptual exercises | Internal Links | Dofollow |
19.3.2 Applied exercises | Internal Links | Dofollow |
19.4 Goodbye! | Internal Links | Dofollow |
References | Internal Links | Dofollow |
Published with bookdown | External Links | Dofollow |
available in print by CRC Press | External Links | Dofollow |
https://bayes-rules.github.io/ | External Links | Dofollow |
Social
Social Data
Cost and overhead previously rendered this semi-public form of communication unfeasible.
But advances in social networking technology from 2004-2010 has made broader concepts of sharing possible.