Change anything and everything

Fundamentals of Bayesian Data Analysis in R

Rasmus Bååth

Data Scientist

Fundamentals of Bayesian Data Analysis in R

Fundamentals of Bayesian Data Analysis in R

Next up on reasons to use Bayesian data analysis

  1. You can include information sources in addition to the data.
  2. You can make any comparisons between groups or data sets.
  3. You can use the result of a Bayesian analysis to do Decision Analysis.
  4. You can change the underlying statistical model.
Fundamentals of Bayesian Data Analysis in R

Completely switch out the binomial model

  • Why? Well, you have some new data...
  • A banner ad for your site.
  • You don't pay per view, you pay per day.
  • A trial resulted in 19 clicks in a day
  • How many daily site visits, should we expect, on average, if we pay for this banner?
Fundamentals of Bayesian Data Analysis in R

A model for counts per day

  • Split the day into 1440 minutes.
  • What proportion of minutes results in a click on the ad?
Fundamentals of Bayesian Data Analysis in R

A model for counts per day

  • Split the day into 1440 minutes.
  • What proportion of minutes results in a click on the ad?
  • Split the day into 86400 seconds.
  • What proportion of seconds results in a click on the ad?
Fundamentals of Bayesian Data Analysis in R

A model for counts per day

  • Split the day into 1440 minutes.
  • What proportion of minutes results in a click on the ad?
  • Split the day into 86400 seconds.
  • What proportion of seconds results in a click on the ad?
  • Split the day into 86400000 milliseconds.
  • What proportion of milliseconds results in a click on the ad?
Fundamentals of Bayesian Data Analysis in R

A model for counts per day

  • Split the day into 1440 minutes.
  • What proportion of minutes results in a click on the ad?
  • Split the day into 86400 seconds.
  • What proportion of seconds results in a click on the ad?
  • Split the day into 86400000 milliseconds.
  • What proportion of milliseconds results in a click on the ad?
  • Split the day into infinite parts...
  • ???
Fundamentals of Bayesian Data Analysis in R

The Poisson distribution

  • One parameter: The mean number of events per time unit.
  • rpois samples from the Poisson distribution.
Fundamentals of Bayesian Data Analysis in R

The Poisson distribution

n_clicks <- rpois(n = 100000, lambda = 20)
hist(n_clicks)

Fundamentals of Bayesian Data Analysis in R

Let's find out in the exercises!

Fundamentals of Bayesian Data Analysis in R

Preparing Video For Download...