Skip to content
Tools / 04

Bayes’ theorem trainer and probability exercises

Start with a belief, see the evidence, update your estimate. Each scenario asks you to guess a posterior probability before showing how the answer follows from the cases that match the evidence.

SelfMadeQuant.com/tools/bayes-rule

Loading practice scenarios…

Guide

How to use it

Read the scenario and estimate the probability first. The tool then shows the population of cases and removes those that could not have produced the evidence. Among the cases left, the share that belong to your group is the posterior.

In multi-step scenarios the first answer becomes your new starting belief, and the next observation updates it again. Your score is the average absolute error across every update, so lower is better.

Prior, likelihood and posterior probability explained

The prior is your probability before the new evidence. The likelihood describes how often that evidence would appear under a hypothesis. The posterior is the updated probability after observing it. Bayes’ theorem combines all three, so a signal that often appears when a hypothesis is true can still be weak evidence if it also appears frequently when the hypothesis is false.

For a two-hypothesis problem, multiply each prior by its likelihood and divide the target result by the sum of both weighted results. That denominator is the total probability of the evidence. The trainer makes this normalisation visible through population counts, helping you distinguish P(A given B) from P(B given A).

Worked Bayesian reasoning for quant interview practice

Suppose 10% of observations come from one process. A flag appears for 80% of that process and for 20% of the others. In 1,000 observations, expect 80 flagged cases from the first group and 180 from the rest. After seeing a flag, the posterior is 80/260, about 30.77%. It rises from the 10% prior but remains well below 80%.

Repeat the count-based calculation before using the formula, then compare your estimate with the worked answer. These Bayes’ rule exercises develop conditional probability and base-rate reasoning. The tool supplies practice scenarios; it is not a general calculator for arbitrary inputs. A free account is needed to reveal the second answer and subsequent answers.

The odds form of Bayes’ rule: a faster mental method

Convert the prior to odds, multiply by the likelihood ratio and convert back. Take a 1% prior, a test that flags 90% of true cases and 5% of the rest. The prior odds are 1 : 99 and the likelihood ratio is 90% ÷ 5% = 18, so the posterior odds are 18 : 99, a probability of 18/117 ≈ 15.4%. The count method gives the same answer.

For a second, independent positive result, multiply by 18 again: odds of 324 : 99, about 76.6%. This is why the odds form suits interviews and trading signals. Each new piece of independent evidence is one multiplication, and the trap is easy to see: multiplying twice by the same piece of evidence, or by two signals that share a cause, overstates your confidence.

What it teaches

Bayes’ rule weighs how likely the evidence is under each hypothesis by how common each hypothesis was to begin with. The most common mistake, base-rate neglect, is ignoring that second part. It shows up in medical-test puzzles, in interview questions and in reading trading signals.

Key formula

P(A | B) = P(B | A)P(A) / [P(B | A)P(A) + P(B | not A)P(not A)]

A numerical check and the model’s limits

A useful numerical check starts with a 1% prior, a 90% true-positive rate and a 5% false-positive rate. Out of 10,000 cases, expect 90 positives from the 100 target cases and 495 positives from the other 9,900. The posterior among positive results is 90/585, about 15.38%. A positive result is much less decisive than the 90% sensitivity alone suggests. Work in counts first, then normalise by every case that could have generated the observation. For repeated evidence, check whether observations are independent conditional on the hypothesis before multiplying likelihoods. Duplicated evidence should not be counted as two fresh measurements.

Frequently asked questions

Why does a strong signal still give a low posterior?

When the target event is rare, false positives from the larger non-target population can dominate. The prior and both likelihoods determine the posterior.

How is my estimate scored?

The trainer reports average absolute error over your updates. Smaller error is better; accuracy here measures these exercises, rather than forecasting skill in financial markets.

How do I calculate a posterior probability using Bayes’ theorem?

Multiply the hypothesis prior by the likelihood of the evidence under that hypothesis. Divide by the total probability of the evidence across all hypotheses. In a two-group example, use the target group’s matching cases divided by all matching cases.

Is this a Bayes’ theorem calculator with custom inputs?

It is a trainer with supplied probability problems, visual explanations and worked answers. You estimate the posterior for each scenario; arbitrary prior and likelihood inputs are not supported.

Learn the ideas behind it

Free reading

More free tools