A little bit of background

Fundamentals of Bayesian Data Analysis in R

Rasmus Bååth

Data Scientist

Fundamentals of Bayesian Data Analysis in R

Probability

  • A number between 0 and 1.
  • A statement about certainty / uncertainty.
  • 1 is complete certainty something is the case.
  • 0 is complete certainty something is not the case.
  • Not only about yes/no events.
Fundamentals of Bayesian Data Analysis in R

Fundamentals of Bayesian Data Analysis in R

Fundamentals of Bayesian Data Analysis in R

 

 

 

The role of probability distributions in Bayesian data analysis is to represent uncertainty, and the role of Bayesian inference is to update probability distributions to reflect what has been learned from data.

Fundamentals of Bayesian Data Analysis in R

A Bayesian model for the proportion of success

  • prop_model(data)
  • The data is a vector of successes and failures represented by 1s and 0s.
  • There is an unknown underlying proportion of success.
  • If data point is a success is only affected by this proportion.
  • Prior to seeing any data, any underlying proportion of success is equally likely.
  • The result is a probability distribution that represents what the model knows about the underlying proportion of success.
Fundamentals of Bayesian Data Analysis in R

Trying out prop_model

data <- c()
prop_model(data)

Fundamentals of Bayesian Data Analysis in R

Trying out prop_model

data <- c(0)
prop_model(data)

Fundamentals of Bayesian Data Analysis in R

Trying out prop_model

data <- c(0, 1)
prop_model(data)

Fundamentals of Bayesian Data Analysis in R

Trying out prop_model

data <- c(0, 1, 0)
prop_model(data)

Fundamentals of Bayesian Data Analysis in R

Trying out prop_model

data <- c(0, 1, 0, 0)
prop_model(data)

Fundamentals of Bayesian Data Analysis in R

Trying out prop_model

data <- c(0, 1, 0, 0, 0)
prop_model(data)

Fundamentals of Bayesian Data Analysis in R

Trying out prop_model

data <- c(0, 1, 0, 0, 0, 1)
prop_model(data)

Fundamentals of Bayesian Data Analysis in R

Now, you try out prop_model!

Fundamentals of Bayesian Data Analysis in R

Preparing Video For Download...