Skip to main content
Advanced statistics
Lesson 41 of 75
Introduction

Bayesian inference

Objective. Update prior distributions with likelihood evidence.

  1. 1. Learn
  2. 2. Worked example
  3. 3. Practice
  4. 4. Feedback
  5. 5. Continue

Learn: the key idea

Bayesian inference updates a prior belief about an unknown parameter into a posterior belief after observing data, using Bayes' theorem: posterior ∝ likelihood × prior. If θ has prior density p(θ) and data x has likelihood p(x|θ), the posterior is p(θ|x) = p(x|θ)p(θ)/p(x), where p(x) is a normalising constant found by integrating the numerator over all θ. Conjugate priors, such as a Beta prior combined with a Binomial likelihood, give a posterior in the same family, simplifying computation. Example: starting with a Beta(1,1) (uniform) prior for a coin's bias and observing 7 heads in 10 tosses gives a Beta(8,4) posterior.

Worked example

Using Bayesian inference with a Beta(1,1) prior and 7 heads in 10 coin tosses, find the posterior distribution's parameters.

1 … 1
Illustrated card showing 1 … 1
  1. 1The Beta(α,β) prior is conjugate to the Binomial likelihood, so the posterior is also Beta.
  2. 2The posterior parameters update as α' = α + (number of heads) and β' = β + (number of tails).
  3. 3With α = 1, β = 1, 7 heads, and 3 tails: α' = 1 + 7 = 8 and β' = 1 + 3 = 4.
  4. 4So the posterior distribution is Beta(8, 4), reflecting both the prior and observed data.

Answer: Posterior is Beta(8, 4)

Concept mastery

Based on your past attempts at this lesson — the question types to practise again come first.

Complete a practice set to see your concept breakdown here.

Practice

Practice happens on its own screen, one question at a time. Answers stay hidden until you submit yours, and you can stop and pick up at the same question later.

Start practising

Common mistake. Students often treat the posterior mean as simply the maximum likelihood estimate from the data alone; the posterior combines prior and likelihood, so with an informative prior the posterior mean differs from the raw sample proportion.

Your progress

Tick each step as you finish it. Your exact reading position is saved automatically, so Continue drops you back on the same line.

0 of 5 steps complete

Your place saves automatically as you read.

My dashboard