Fundamentals of Bayesian Data Analysis in R
Rasmus Bååth
Data Scientist



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.
prop_model(data)data is a vector of successes and failures represented by 1s and 0s.data <- c()
prop_model(data)

data <- c(0)
prop_model(data)

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

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

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

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

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

Fundamentals of Bayesian Data Analysis in R