
Master Bayesian statistics from basics to Bayes' rule, exploring prior, posterior, and predictive distributions with conjugate families, binomial, Poisson, and normal models, using R, Stan, and Python.
Compare the frequentist and Bayesian views of probability, learn complements and sample space, and update our beliefs with new data using Bayes rule.
Break down an event into disjoint parts using the law of total probability, exemplified by a and b and a and not b with Venn diagrams and numbers.
Learn conditional probability—the core of Bayesian statistics—and update beliefs using A given B, with examples like rain and clouds and intuition from probability notation and Venn diagrams.
Learn the multiplication rule and independence, derive joint probability via conditional probability, as P(B|A)P(A) or P(A|B)P(B), and explain how Bayes rule relies on these forms.
Apply Bayes' rule to turn the probability of A given B into a calculation using P(B|A), P(A), and the multiplication rule, with the law of total probability when needed.
Visualize predictive distributions and flow charts to see how test results update beliefs about disease, using marginal distribution and Bayes' rule to get the posterior probability after a positive test.
Apply Bayes rule to two coins—a fair coin and a mostly heads coin. After observing heads, update from 50/50 to 64.3% for mostly heads coin and 35.7% for fair coin.
Apply Bayes' rule to update beliefs with multiple coin flips, using prior and posterior, and show sequential updates converge for binary outcomes.
Learn how normalizing constants and proportionality streamline Bayes rule by avoiding the denominator, using the sum of numerators, and applying prior and likelihood concepts.
Explore continuous priors in Bayesian statistics using theta and a uniform [0,1] distribution, where probabilities equal area under the density pi and exact values have zero probability.
Explore the likelihood as the data generating process and treat theta as a random variable, linking priors to the parameter and Bernoulli outcomes under independence.
Explore updating beliefs about a parameter after one observation using Bayes' rule with a uniform prior, leading to a posterior density of 2 theta on [0,1].
Compute the posterior probability that theta lies between 0 and 0.5 using the posterior distribution, via triangle area or calculus. Observing heads lowers this probability from 0.5 to 0.25.
Update a continuous posterior from two flips (heads and tails) with a uniform prior, deriving a posterior proportional to theta(1-theta) and normalizing to 6 theta(1-theta), peaked at 0.5.
Explore cumulative distribution functions and their inverses to compute probabilities and credible intervals for posterior distributions, using CDF properties, integration, and built-in software tools.
Calculate central 95% credible intervals using the inverse CDF by finding the 2.5% and 97.5% quantiles of the posterior. Summarize the posterior with a clear interval for theta.
Learn how mean, median, and mode summarize a distribution’s center. See how different loss functions affect which measure you favor and when they coincide in symmetric unimodal distributions.
Compare the mean, median, and mode as single-value summaries of a posterior distribution. Explore map estimation, credible intervals, and loss functions shaping theta hat.
Explore predictive distributions in Bayesian statistics, linking prior, posterior, and likelihood to model data and use the law of total probability to derive the prior predictive distribution.
Explore binomial random variables from independent Bernoulli trials, count the number of successes, compare with Bernoulli data, and see how binomial likelihoods and sufficiency simplify Bayesian inference.
Explore beta distributions as flexible priors for theta in Bernoulli and binomial models, compare uniform and beta priors, and learn about alpha and beta hyperparameters, gamma function, and conjugacy.
Calculate the probability that theta lies between 0.4 and 0.6 using the beta cdf, with alpha=10 and beta=10, via R p beta, Python beta cdf, and Excel beta dist.
Explore how alpha and beta shape the beta prior for theta in Bernoulli models; equal values yield symmetry, while increasing alpha or beta shifts the center and concentrates the distribution.
Conjugate priors with a beta prior for binomial data yield a beta posterior; update alpha post = alpha prior + x, beta post = beta prior + n-x.
Learn how to summarize posterior beliefs about theta with credible intervals from beta distributions. Use inverse cdf quantiles in software like R, Python, or Excel to compute 95% and 99% intervals (e.g., 0.025 and 0.975, 0.005 and 0.995).
Compare Bayes point estimates from a beta posterior distribution, using the mean, the median, and the mode, and note that for alpha=55, beta=59 these estimates are nearly identical.
Explore how beta priors produce a beta-binomial predictive distribution through a hierarchical mixture of beta and binomial components, capturing theta uncertainty in data.
Recap how priors, likelihoods, and posteriors relate across medical testing and coin flips, introduce beta priors for Bernoulli data, and explain predictive distributions.
Visualize a beta prior and binomial likelihood in a hands-on beta-binomial example, using R (and Python) to update to a posterior and assess predictive distribution.
Explore bayesian inference with Stan on a beta-binomial problem, using mcmc to sample the posterior, assess priors, likelihood, and predictive distributions.
Examine the drawbacks of conjugate priors when theta in [0,1] is multi-peaked and not captured by a beta distribution, and explore spike and slab priors with Stan for non-conjugate updates.
Learn how the Poisson distribution models count data with a constant rate lambda, and use its PMF as the likelihood for Bayesian inference on independent count observations.
Learn to use a gamma prior for the Poisson rate lambda, with alpha and beta encoding beliefs, and exploit conjugacy for easy updates; the mean is alpha over beta.
Learn how to derive the posterior for lambda, the hourly customer rate, with a gamma prior and Poisson likelihood, yielding a gamma posterior with alpha 32 and beta 5.
Update the Poisson rate with a gamma prior by incorporating ten days of counts totaling 485, yielding a posterior with updated alpha and beta and a mean near 50.
Derive the gamma posterior from a gamma prior and Poisson likelihood, then summarize with a 95% credible interval via inverse cdf and compute Bayes point estimates (mean, median, mode).
From gamma priors and Poisson likelihoods, the predictive distribution becomes a negative binomial, a gamma-Poisson mixture describing future counts and marginalizing theta.
Examine Bayesian inference for Poisson data with a gamma conjugate prior, updating from ten days of coffee shop counts in R and Stan to obtain the posterior and predictive distribution.
Explore the normal distribution and its bell curve, with mu and sigma as parameters; assume known sigma to update mu via bayesian methods, using the empirical 68-95-99.7 rule.
Learn to use a normal prior as the conjugate prior for the mean of a normal likelihood, with mu zero and sigma zero, updating to posterior with data.
Demonstrates a normal likelihood with a normal prior, yielding a normal posterior for mu. After five observations with mean 400, the posterior mu_n is 395.24 and sigma_n is 21.82.
Summarize the posterior normal distribution for mu with a 95% credible interval around the mean 3.95, using two standard deviations, and note the Bayes estimator equals the posterior mean.
Apply Bayesian updating with a normal likelihood and normal prior to estimate the mean weight of candies; derive the posterior, credible intervals, and predictive distributions using R and Stan.
Predict a spending observation with a normal distribution, using a posterior mean and a variance combining inherent variability and parameter uncertainty. Handle unknown sigma by yielding a t distribution.
Explore simple linear regression with bivariate data and bayesian methods, learning about beta zero and beta one, the error term epsilon, priors and posterior, and using Stan with uninformative priors.
Learn to use Stan (and R) for simple linear regression to estimate intercept, slope, and sigma from simulated data and interpret 95% credible intervals.
This course teaches the foundational material of statistics covered in an introductory college course, with a focus on mastering the basic components of any Bayesian model - the prior distribution and the likelihood, and how to find a posterior distribution, credible intervals, and predictive distributions. Along the way, you'll become more comfortable with probability in general and gain a new perspective on how to analyze data!
We start from scratch - no experience in Bayesian statistics is required. Students should have a strong grasp of basic algebra and arithmetic. R and RStudio, or Python, is required if you would like to run the optional coding sections
The course includes:
5.5 hours of video lectures
Interactive demonstrations using R and Stan (Python code is included too!)
Quizzes to check your understanding
Review assignments with solutions to practice what you have learned
You will learn:
The basic rules of probability
Bayes' rule, including common examples with medical testing and flipping coins
The terminology of different components of a Bayesian model: the prior distribution, posterior, likelihood, and predictive distribution
Conjugate priors
Credible intervals and Bayes estimators
Modeling binary data with the Bernoulli and Binomial Distribution, and the Beta distribution prior
Modeling count data with the Poisson Distribution, and the Gamma distribution prior
Modeling continuous data with the Normal Distribution, and the Normal distribution prior
An introduction to simple linear regression
This course is ideal for many types of students:
Anyone who wants to learn the foundations of Bayesian statistics and understand concepts like priors, posteriors and credible intervals
Data science and data analytics professionals who would like to refresh and expand their statistics knowledge
Academics in the social, biological, and physical sciences
This course is ideal for anyone, from beginners to seasoned professionals. It doesn't matter if you're just starting your journey in data science, looking to upgrade your existing skills, or simply have an interest in Bayesian statistics. My goal is to make Bayesian statistics accessible and understandable for all.