# Module 18 Bayesian Data Analysis

by Patrick Boily and Ehssan Ghashim

Bayesian analysis is sometimes maligned by data analysts, due in part to the perceived element of arbitrariness associated with the selection of a meaningful prior distribution for a specific problem and the (former) difficulties involved with producing posterior distributions for all but the simplest situations.

On the other hand, we have heard it said that while classical data analysts need a large bag of clever tricks to unleash on their data, Bayesians only ever really need one.’’ With the advent of efficient numerical samplers, modern data analysts cannot shy away from adding the Bayesian arrow to their quiver.

In this module, we introduce the basic concepts underpinning Bayesian analysis, and we present a small number of examples that illustrate the strengths of the approach.

### Contents

18.1 Plausible Reasoning
18.1.1 Rules of Probability
18.1.2 Bayes’ Theorem
18.1.3 Bayesian Inference Basics
18.1.4 Bayesian Data Analysis

18.2 Examples
18.2.1 The Mysterious Coin
18.2.2 The Salary Question
18.2.3 Money (Dollar Bill Y’All)

18.3 Prior Distributions
18.3.1 Conjugate Priors
18.3.2 Uninformative Priors
18.3.3 Informative Priors
18.3.4 Maximum Entropy Priors

18.4 Posterior Distributions
18.4.1 High-Density Intervals
18.4.2 MCMC Methods
18.4.3 The MH Algorithm