Introduction to Bayesian Data Analysis (openHPI)

Introduction to Bayesian Data Analysis (openHPI)

Bayesian data analysis is increasingly becoming the tool of choice for many data-analysis problems. This free course on Bayesian data analysis will teach you basic ideas about random variables and probability distributions, Bayes' rule, and its application in simple data analysis problems. You will learn to use the R package brms (which is a front-end for the probabilistic programming language Stan). The focus will be on regression modeling, culminating in a brief introduction to hierarchical models (otherwise known as mixed or multilevel models). This course is appropriate for anyone familiar with the programming language R and for anyone who has done some frequentist data analysis (e.g., linear modeling and/or linear mixed modeling) in the past.

Introduction: Why are Bayesian methods important for data analysts?
Here are some of the advantages of Bayesian methods over the standard frequentist approach used in data analysis:

  • Prior knowledge/expertise can be incorporated into the data analysis
  • Models can be flexibly specified to reflect the assumed generative process
  • The results of the analysis – the posterior distributions of the parameters of interest – have an intuitive interpretation
  • Hypothesis testing can be carried out in a more meaningful manner than the standard used null hypothesis significance testing

Prerequisites: Who is this course for?
We assume the following in this course:

  • Basic familiarity with the programming language R, openHPI offers a free R course for Beginners (in German)
  • Experience with data analysis using linear models
  • It is helpful (but not necessary) to have had some exposure to linear mixed models using the R library lme4
  • High-school mathematics (pre-calculus)
  • Some basic concepts from probability theory (sum and product rule, conditional probability)

This course is not appropriate for participants who don't know R programming and who have no experience at all with data analysis.

Course outcomes: What will you learn from this course?

  • Some basic ideas relating to random variables
  • Some fundamental properties of probability distributions
  • Application of Bayes' rule in data analysis
  • The concept of likelihood and its role in Bayesian statistical modeling
  • Bayesian regression models using brms (a front-end for Stan)
  • How to visualize and interpret prior and posterior distributions
  • How to generate prior and posterior predictive distributions for evaluating models
  • How to interpret the results of simple regression models

After completing this course, you will be in a good position to learn how to use more advanced Bayesian methods, such as hierarchical models, finite mixture models, multinomial processing tree models, measurement error models, etc.

What you'll learn

  • Bayesian statistics
  • Data analysis
  • Bayesian regression models using brms

Course contents

Week 0 - Initial Setup:
Installing R and RStudio, rstan, brms, and other necessary packages in R; Setting up R markdown for reproducible data analyses.

Week 1 - Introduction:
Learn the foundational ideas about random variables and probability distributions; Reading: Chapter 1 of the textbook (excluding the section on bivariate distributions).

Week 2 - Bayesian data analysis:
Understand Bayes' rule, derive the posterior using Bayes' rule; visualize the prior, likelihood, and posterior; distinguish the relationship between the prior, likelihood, and posterior; incorporate prior knowledge into the analysis; Reading: Chapter 2.

Week 3 - Computational Bayesian data analysis:
Derive the posterior through sampling; perform simple regression modeling of a simple button-pressing task using Stan/brms; do prior predictive distributions, sensitivity analysis, and different classes of prior; do posterior predictive distributions; derive the log-normal likelihood; Reading: Chapter 3.

Week 4 - Bayesian regression and hierarchical models:
Perform simple linear regressions using the normal and binomial likelihoods to answer the following research questions: (i) Does attentional load affect pupil size? (ii) Does trial id affect response times? (iii) Does set size affect recall accuracy? Take a brief look-ahead at linear mixed models; Reading: Chapter 4 and up to section 5.3 of chapter 5.

Final Exam:
Final Exam

Go to Class
MOOC List is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Related Courses

Business Applications of Hypothesis Testing and Confidence Interval Estimation (Coursera) Coursera
Rice University

Business Applications of Hypothesis Testing and Confidence Interval Estimation (Coursera)

Confidence intervals and Hypothesis tests are very important tools in the Business Statistics toolbox. A mastery over these topics will help enhance your business decision making and allow you to understand and measure the extent of ‘risk’ or ‘uncertainty’ in various business processes. This course advances your knowledge about Business Statistics by introducing you to Confidence Intervals and Hypothesis Testing. These are done by easy to understand applications.

Sep 7th 2026
4 Weeks
Math for MBA and GMAT Prep (Coursera) Coursera
Emory University

Math for MBA and GMAT Prep (Coursera)

This course gives participants a basic understanding of statistics as they apply in business situations. A fair share of students considering MBA programs come from backgrounds that do not include a large amount of training in mathematics and statistics. Often, students find themselves at a disadvantage when they apply for or enroll in MBA programs. This course will give you the tools to understand how these business statistics are calculated for navigating the built-in formulas that are included in Excel, but also how to apply these formulas in an range of business settings and situations.

Sep 7th 2026
5-12 Weeks
Data Science Bootcamp (openHPI) OpenHPI
Hasso-Plattner-Institut

Data Science Bootcamp (openHPI)

The ultimate goal of the bootcamp is to cultivate strong data science skills with an emphasis on machine learning techniques to satisfactorily meet and exceed the requests of the Data science world. In the process, we will develop good habits for operating independently as data scientists and for operating as members of productive data science teams.

Jun 7th 2023
4 Weeks
Business Intelligence and Competitive Analysis (Coursera) Coursera
Rutgers University

Business Intelligence and Competitive Analysis (Coursera)

By the end of 2019, it is clear that American Airlines (AAL), the world’s largest airline group, is in trouble. With the growth rate of its stock price ranked at the bottom of all major US airlines and going in the opposite direction from the SP500 index, AAL needs to find out what is going on, and how to turn the company and its stock price around.

Aug 31st 2026
4 Weeks
Data Processing Using Python (Coursera) Coursera
Nanjing University

Data Processing Using Python (Coursera)

This course is mainly for non-computer majors. It starts with the basic syntax of Python, to how to acquire data in Python locally and from network, to how to present data, then to how to conduct basic and advanced statistic analysis and visualization of data, and finally to how to design a simple GUI to present and process data, advancing level by level.

Sep 14th 2026
5-12 Weeks
Practical Time Series Analysis (Coursera) Coursera
The State University of New York

Practical Time Series Analysis (Coursera)

Many of us are "accidental" data analysts. We trained in the sciences, business, or engineering and then found ourselves confronted with data for which we have no formal analytic training. This course is designed for people with some technical competencies who would like more than a "cookbook" approach, but who still need to concentrate on the routine sorts of presentation and analysis that deepen the understanding of our professional topics.

Sep 7th 2026
5-12 Weeks
Probabilistic Graphical Models 3: Learning (Coursera) Coursera
Stanford University

Probabilistic Graphical Models 3: Learning (Coursera)

Probabilistic graphical models (PGMs) are a rich framework for encoding probability distributions over complex domains: joint (multivariate) distributions over large numbers of random variables that interact with each other. These representations sit at the intersection of statistics and computer science, relying on concepts from probability theory, graph algorithms, machine learning, and more. They are the basis for the state-of-the-art methods in a wide variety of applications, such as medical diagnosis, image understanding, speech recognition, natural language processing, and many, many more. They are also a foundational tool in formulating many machine learning problems.

Aug 31st 2026
5-12 Weeks
Applied Plotting, Charting & Data Representation in Python (Coursera) Coursera
University of Michigan

Applied Plotting, Charting & Data Representation in Python (Coursera)

This course will introduce the learner to information visualization basics, with a focus on reporting and charting using the matplotlib library. The course will start with a design and information literacy perspective, touching on what makes a good and bad visualization, and what statistical measures translate into in terms of visualizations. The second week will focus on the technology used to make visualizations in python, matplotlib, and introduce users to best practices when creating basic charts and how to realize design decisions in the framework.

Sep 7th 2026
4 Weeks
Improving your statistical inferences (Coursera) Coursera
Eindhoven University of Technology

Improving your statistical inferences (Coursera)

This course aims to help you to draw better statistical inferences from empirical research. First, we will discuss how to correctly interpret p-values, effect sizes, confidence intervals, Bayes Factors, and likelihood ratios, and how these statistics answer different questions you might be interested in. Then, you will learn how to design experiments where the false positive rate is controlled, and how to decide upon the sample size for your study, for example in order to achieve high statistical power.

Sep 7th 2026
5-12 Weeks
Basic Statistics (Coursera) Coursera
University of Amsterdam

Basic Statistics (Coursera)

Understanding statistics is essential to understand research in the social and behavioral sciences. In this course you will learn the basics of statistics; not just how to calculate them, but also how to evaluate them. This course will also prepare you for the next course in the specialization - the course Inferential Statistics. In the first part of the course we will discuss methods of descriptive statistics. You will learn what cases and variables are and how you can compute measures of central tendency (mean, median and mode) and dispersion (standard deviation and variance). Next, we discuss how to assess relationships between variables, and we introduce the concepts correlation and regression.

Aug 31st 2026
5-12 Weeks