ArticleslgStudy

mathematics

Bayesian inference

Bayesian inference is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Bayesian inference rather than just read about it. In short: Bayesian inference ( BAY-zee-ən or BAY-zhən) is a method of statistical inference in which Bayes' theorem is used to calculate a probability of a hypothesis, given prior evidence, and update it as more information becomes available. Fundamentally, Bayesian inference uses a prior distribution to estimate posterior probabilities.

Bayesian inference — main illustration
Bayesian inference — illustration

Key takeaways

  • Bayesian inference belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Bayesian inference to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Bayesian inference from memory before moving on to harder problems.

Reference excerpt

Bayesian inference ( BAY-zee-ən or BAY-zhən) is a method of statistical inference in which Bayes' theorem is used to calculate a probability of a hypothesis, given prior evidence, and update it as more information becomes available. Fundamentally, Bayesian inference uses a prior distribution to estimate posterior probabilities. Bayesian inference is an important technique in statistics, and especially in mathematical statistics. Bayesian updating is particularly important in the dynamic analysis of a sequence of data. Bayesian inference has found application in a wide range of activities, including science, engineering, philosophy, medicine, sport, psychology, and law. In the philosophy of decision theory, Bayesian inference is closely related to subjective probability, often called "Bayesian probability".

Introduction to Bayes' rule

Formal explanation

Bayesian inference derives the posterior probability as a consequence of two antecedents: a prior probability and a "likelihood function" derived from a statistical model for the observed data. Bayesian inference computes the posterior probability according to Bayes' theorem: P(H∣E)=P(E∣H)⋅P(H)P(E), where

H stands for any hypothesis whose probability may be affected by data (called evidence below). Often there are competing hypotheses, and the task is to determine which is the most probable. P(H), the prior probability, is the estimate of the probability of the hypothesis H before the data E, the current evidence, is observed. E, the evidence, corresponds to new data that were not used in computing the prior probability. P(H∣E), the posterior probability, is the probability of H given E, i.e., after E is observed. This is what we want to know: the probability of a hypothesis given the observed evidence. P(E∣H) is the probability of observing E given H and is called the likelihood. It indicates the compatibility of the evidence with the given hypothesis. The likelihood function is a function of the hypothesis H, with the new evidence E being fixed. P(E) is sometimes termed the marginal likelihood or "model evidence". This factor is the same for all possible hypotheses being considered (as is evident from the fact that the hypothesis H does not appear anywhere in the symbol, unlike for all the other factors) and hence does not factor into determining the relative probabilities of different hypotheses. P(E)>0, since otherwise the denominator in Bayes' theorem is zero. For different values of H, only the factors P(H) and P(E∣H), both in the numerator, affect the value of P(H∣E) – the posterior probability of a hypothesis is proportional to its prior probability (its inherent likeliness) and the newly acquired likelihood (its compatibility with the new observed evidence). In cases where ¬H ("not H"), the logical negation of H, is a valid likelihood, Bayes' rule can be rewritten as follows: P(H∣E)=P(E∣H)P(H)P(E)=P(E∣H)P(H)P(E∣H)P(H)+P(E∣¬H)P(¬H)=11+(1P(H)−1)P(E∣¬H)P(E∣H) because P(E)=P(E∣H)P(H)+P(E∣¬H)P(¬H) and P(H)+P(¬H)=1. This focuses attention on the term (1P(H)−1)P(E∣¬H)P(E∣H). If that term is approximately 1, then the probability of the hypothesis given the evidence, P(H∣E), is about 12, about 50% likely - equally likely or not likely. If that term is very small, close to zero, then the probability of the hypothesis, given the evidence, P(H∣E) is close to 1 or the conditional hypothesis is quite likely. If that term is very large, much larger than 1, then the hypothesis, given the evidence, is quite unlikely. If the hypothesis (without consideration of evidence) is unlikely, then P(H) is small (but not necessarily astronomically small) and 1P(H) is much larger than 1 and this term can be approximated as P(E∣¬H)P(E∣H)⋅P(H) and relevant probabilities can be compared directly to each other. One quick and easy way to remember the equation would be to use rule of multiplication: P(E∩H)=P(E∣H)P(H)=P(H∣E)P(E).

Alternatives to Bayesian updating Bayesian updating is widely used and computationally convenient. However, it is not the only updating rule that might be considered rational. Ian Hacking noted that traditional "Dutch book" arguments did not specify Bayesian updating: they left open the possibility that non-Bayesian updating rules could avoid Dutch books. Hacking wrote: "And neither the Dutch book argument nor any other in the personalist arsenal of proofs of the probability axioms entails the dynamic assumption. Not one entails Bayesianism. So the personalist requires the dynamic assumption to be Bayesian. It is true that in consistency a personalist could abandon the Bayesian model of learning from experience. Salt could lose its savour." Indeed, there are non-Bayesian updating rules that also avoid Dutch books (as discussed in the literature on "probability kinematics") following the publication of Richard C. Jeffrey's rule, which applies Bayes' rule to the case where the evidence itself is assigned a probability. The additional hypotheses needed to uniquely require Bayesian updating have been deemed to be substantial, complicated, and unsatisfactory.

Inference over exclusive and exhaustive possibilities If evidence is simultaneously used to update belief over a set of exclusive and exhaustive propositions, Bayesian inference may be thought of as acting on this belief distribution as a whole.

General formulation

Suppose a process is generating independent and identically distributed events En, n=1,2,3,…, but the probability distribution is unknown. Let the event space Ω represent the current state of belief for this process. Each model is represented by event Mm. The conditional probabilities P(En∣Mm) are specified to define the models. P(Mm) is the degree of belief in Mm. Before the first inference step, {P(Mm)} is a set of initial prior probabilities. These must sum to 1, but are otherwise arbitrary. Suppose that the process is observed to generate E∈{En}. For each M∈{Mm}, the prior P(M) is updated to the posterior P(M∣E). From Bayes' theorem: P(M∣E)=P(E∣M)∑mP(E∣Mm)P(Mm)⋅P(M). Upon observation of further evidence, this procedure may be repeated.

Multiple observations For a sequence of independent and identically distributed observations 𝐄=(e1,…,en), it can be shown by induction that repeated application of the above is equivalent to P(M∣𝐄)=P(𝐄∣M)∑mP(𝐄∣Mm)P(Mm)⋅P(M), where P(𝐄∣M)=∏kP(ek∣M).

… excerpt ends here. Continue reading the full article.

Illustrations

Bayesian inference: A geometric visualisation of Bayes' theorem. In the table, the values 2, 3, 6 and 9 give the relative weights of each corresponding condition and case. The figures denote the cells of the table involved in each metric, the probability being the fraction of each figure that is shaded. This shows that P(A|B)P(B)=P(B|A)P(A) i.e. P(A|B)=P(B|A)P(A)P(B). Similar reasoning can be used to show that P(¬A|B)=P(B|¬A)P(¬A)P(B) etc.
A geometric visualisation of Bayes' theorem. In the table, the values 2, 3, 6 and 9 give the relative weights of each corresponding condition and case. The figures denote the cells of the table involved in each metric, the probability being the fraction of each figure that is shaded. This shows that P(A|B)P(B)=P(B|A)P(A) i.e. P(A|B)=P(B|A)P(A)P(B). Similar reasoning can be used to show that P(¬A|B)=P(B|¬A)P(¬A)P(B) etc.
Bayesian inference: Diagram illustrating event space Ω in general formulation of Bayesian inference. Although this diagram shows discrete models and events, the continuous case may be visualized similarly using probability densities.
Diagram illustrating event space Ω in general formulation of Bayesian inference. Although this diagram shows discrete models and events, the continuous case may be visualized similarly using probability densities.
Bayesian inference: Example results for archaeology example. This simulation was generated using c=15.2.
Example results for archaeology example. This simulation was generated using c=15.2.
Bayesian inference: Adding up evidence
Adding up evidence

Worked examples

Example 1 — a first encounter with Bayesian inference

Start with the simplest possible case. Write down what Bayesian inference claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Bayesian inference before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Bayesian inference ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Bayesian inference

In research
Bayesian inference appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Bayesian inference in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Bayesian inference is common in secondary-school and first-year university syllabi. It links to neighbouring topics Bayesian inference, Logic and statistics, Probabilistic arguments, so understanding it makes those chapters shorter.
In everyday life
Look for Bayesian inference outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Bayesian inference” →

How to study Bayesian inference in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Bayesian inference means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Bayesian inference out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Bayesian inference in simple terms?

Bayesian inference ( BAY-zee-ən or BAY-zhən) is a method of statistical inference in which Bayes' theorem is used to calculate a probability of a hypothesis, given prior evidence, and update it as more information becomes available. Fundamentally, Bayesian inference uses a prior distribution to est…

Why does Bayesian inference matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Bayesian inference?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Bayesian inference.

Tags

  • Bayesian inference
  • Logic and statistics
  • Probabilistic arguments
  • Statistical forecasting

Keep exploring