Analyst Dojo
Lesson 8 of 8 11–14% of the exam

Bayes' theorem: updating a probability with new information

Bayes' theorem turns a prior into a posterior: P(A | B) = P(B | A) × P(A) ÷ P(B). The denominator, the marginal probability of the information B, adds every route that produces B. The update is large when the information is much likelier under one scenario than another.

6 min cram, 32 min full read. Based on the 2027 CFA® Program Level I curriculum, Quantitative Methods, Learning Module 6. Sitting in November 2026? The 2026 version of this lesson is still available.

Tailor this to you: take the self-assessment

Watch the lesson 21 min

This lesson's video is for Plus members. The written lesson below is free, as always.

See Plus

Before this: Probability trees, conditional expectations and conditional variance, Covariance and correlation from a joint probability table

On the exam

  • Formulate investment problems through Bayesian updating

Formulate an investment problem as a Bayesian update and calculate the posterior probability. Expect the joint probability or the likelihood as wrong answers, three scenarios instead of two, a contingency table of counts, or a question that gives P(B) and asks you to back out a missing likelihood first.

How deeply to learn each part
Know the idea
Understand it in general. It frames other topics, but you will not calculate with it.
Use it
Understand it well enough to solve a question with it. Recognize when it applies.
Memorize
Learn it by heart. The exam will not give it to you.

You know this one. The full lesson is folded away. The takeaways, formulas and checkpoint below are your quick refresher, and the checkpoint is a fair test of whether you still do.

You tested strong here. The full lesson is folded away. The takeaways, formulas and checkpoint below are your quick refresher, and the checkpoint is a fair test of whether you still know it.

Cram mode: the one-screen version of this lesson. Switch to Full for the explanations, worked examples and interactives.

What are the parts of Bayes’ theorem?

News arrives and you want to revise a probability. Call the event A and the new information B. Start with the prior probability , your view of the event before the news; it is also called the a priori or ex ante probability. The likelihood is how probable the news is if the event is true. After the update you hold the posterior probability , the probability of the event given the news, also called the a posteriori or ex post probability.

The four pieces of a Bayes update
Updating a probabilitynews arrives, so revise the view
  • Prior P(A) Memorize your probability before the news
  • Likelihood P(B | A) Memorize how likely the news is if the event is true
  • Marginal probability P(B) Memorize total chance of the news: add every branch that produces it
    • Event branch P(B | A) × P(A)
    • No-event branch P(B | not A) × P(not A)
  • Posterior P(A | B) Memorize event branch ÷ P(B)

Bayes’ theorem (also called Bayes’ rule or Bayes’ formula) connects them. The denominator, P(B), is the marginal probability of the information: its overall chance of showing up.

Bayes' theorem Memorize
P(A∣B)=P(B∣A)P(B) P(A)P(A \mid B) = \dfrac{P(B \mid A)}{P(B)}\,P(A)

P(B) comes from the total probability rule : add up every route that can produce the information.

Marginal probability of the information Memorize
P(B)=P(B∣A) P(A)+P(B∣Ac) P(Ac)P(B) = P(B \mid A)\,P(A) + P(B \mid A^c)\,P(A^c)

The top of Bayes’ theorem, P(B | A) × P(A), is the joint probability of the event and the information. So the posterior is the joint probability divided by the marginal probability of the information: your share of all the ways the news could have happened.

Go deeper Where the formula comes from

The joint probability can be built in either order: P(A | B) × P(B) = P(A and B) = P(B and A) = P(B | A) × P(A). Divide both ends by P(B) and you have Bayes’ theorem. In effect it runs the total probability rule in reverse: that rule builds P(B) from its pieces, and Bayes’ theorem asks which piece produced it.

Rearrange itBayes' theorem: solve for the posterior, the marginal probability P(B) or the prior
The question asks for
An analyst puts a prior probability of 45.00% on an event. The news arrives 65.00% of the time when the event occurs and 25.00% of the time when it does not. After the news, the probability of the event is closest to:

0.65 × 0.45 ÷ (0.65 × 0.45 + 0.25 × 0.55) = 0.680233, so 68.02%

Posterior probability, P(A | B)68.02%

On your calculator
  1. 0.45×0.65=STO1the joint probability
  2. +(0.55×0.25)=the marginal probability P(B)
  3. 1/x×RCL1=the posterior

STO store · 1/x reciprocal · RCL recall a stored number

  1. 0.45ENTER0.65×STO1the joint probability
  2. 0.55ENTER0.25×+the marginal probability P(B)
  3. 1/xRCL1×the posterior

ENTER enter (on the HP, puts the number on the stack) · STO store · 1/x reciprocal · RCL recall a stored number

InteractiveBayes on a tree: keep only the branches that fit the news

Try this 0 of 3

  • Cut the prior to 0.10 with the same news
  • Make the news worthless: set both likelihoods equal
  • Switch the news to 'Does not raise'
Before the news
How often guidance is raised (B)
The news
The company

Before the news a beat (A) is 0.45 likely. Guidance is raised with marginal probability 0.430; 0.292 of that comes from firms that beat, so the posterior P(A | B) is 0.680.

Before thenewsP = 1.00Beatsconsensus (A)prior 0.45Raisesguidance (B)joint 0.292fits thenews: ANo raise (notB)joint 0.158ruled outDoes not beat(not A)prior 0.55Raisesguidance (B)joint 0.138fits thenews: not ANo raise (notB)joint 0.412ruled out
  • Before the news, P = 1.00
    • p = 0.45: Beats consensus (A), prior 0.45
      • p = 0.65: Raises guidance (B), joint 0.292, fits the news: A, (matches), (highlighted)
      • p = 0.35: No raise (not B), joint 0.158, ruled out, (ruled out)
    • p = 0.55: Does not beat (not A), prior 0.55
      • p = 0.25: Raises guidance (B), joint 0.138, fits the news: not A, (highlighted)
      • p = 0.75: No raise (not B), joint 0.412, ruled out, (ruled out)
Likelihood, P(B | A)0.65
Joint, P(A and B)0.292
Marginal probability, P(B)0.430
Posterior, P(A | B)0.680
Show working

A = beats consensus, B = raises guidance. Prior P(A) = 0.45; likelihoods P(B | A) = 0.65, P(B | not A) = 0.25.

Marginal probability P(B) = P(B | A) × P(A) + P(B | not A) × P(not A) = 0.65 × 0.45 + 0.25 × 0.55 = 0.2925 + 0.1375 = 0.4300

Bayes' theorem: P(A | B) = P(B | A) × P(A) ÷ P(B) = 0.2925 ÷ 0.4300 = 0.6802

The news moves the probability of a beat from 45% to 68.0%. Not 0.65 (the likelihood) and not 0.292 (the joint probability).

Posterior on your calculator
  1. 0.65×0.45=STO1joint 0.2925
  2. 0.25×0.55=+RCL1=STO2P(B) = 0.4300
  3. RCL1÷RCL2=posterior 0.6802

STO store · RCL recall a stored number

  1. 0.65ENTER0.45×STO1joint 0.2925
  2. 0.25ENTER0.55×+P(B) = 0.4300
  3. RCL1x≷y÷posterior 0.6802

ENTER enter (on the HP, puts the number on the stack) · STO store · RCL recall a stored number · x≷y swap the last two numbers

Display: 0.6802

The posterior is your share of all the ways the news could have happened.

Slide the prior down and the two likelihoods together. The posterior moves much less when the prior is low, and much more when the two likelihoods are far apart. The Counts tab shows the same update from a table of whole numbers.

A table method that never fails

Lay out every joint probability in a grid and read the posterior from a column. For the example above:

Raises guidanceDoes not raiseRow total
Beats consensus0.29250.15750.45
Does not beat0.13750.41250.55
Column total0.430.571.00

Each cell is a prior times a likelihood. The posterior is the cell divided by its column total once you know which news you saw: given a raise, 0.2925 ÷ 0.43 = 0.680. Had the company not raised, it would be 0.1575 ÷ 0.57 = 0.276.

The same method works with more than two scenarios. Add a row for each.

Bayes' theorem with several scenarios Use it
P(Ai∣B)=P(B∣Ai) P(Ai)∑jP(B∣Aj) P(Aj)P(A_i \mid B) = \dfrac{P(B \mid A_i)\,P(A_i)}{\sum_{j} P(B \mid A_j)\,P(A_j)}

How do you update from a table of counts?

Counts make a posterior a cell divided by a column total. Here are 400 funds screened at the start of a year. 128 were flagged as likely outperformers. 140 funds outperformed, 91 of them flagged, and 37 of the 260 that did not outperform were flagged too.

FlaggedNot flaggedTotal
Outperformed9149140
Did not outperform37223260
Total128272400

What if P(B) is given and a likelihood is missing?

Use the total probability rule backwards. When the question gives the marginal probability P(B), one likelihood and the prior, solve for the likelihood you do not have, then run Bayes’ theorem.

Missing likelihood from the marginal probability Use it
P(B∣Ac)=P(B)−P(B∣A) P(A)P(Ac)P(B \mid A^c) = \dfrac{P(B) - P(B \mid A)\,P(A)}{P(A^c)}

What is a diffuse prior?

Diffuse prior is the name for equal priors: you have no basis to favor any scenario, so each gets the same probability. Then the priors cancel from the top and bottom of the formula, and the posterior follows the likelihoods alone. Each posterior is then its likelihood divided by the sum of the likelihoods. With two scenarios and likelihoods of 0.65 and 0.25, equal priors of 0.5 give posteriors of 0.65 ÷ 0.90 = 0.722 and 0.25 ÷ 0.90 = 0.278.

Exam tip When the question gives you P(B | A) but you need P(A | B), write the table first. If the column total is missing, the question wants the total probability rule.

Go deeper Base-rate neglect: why a rare event stays unlikely

Suppose 1% of firms will default in a year, a screen flags 95% of firms that will default and also flags 7% of firms that will not. A flagged firm looks alarming, yet P(flag) = 0.95 × 0.01 + 0.07 × 0.99 = 0.0788, so the posterior is 0.0095 ÷ 0.0788 = 12.1%. The low prior limits the update. Ignoring the prior and treating the 95% likelihood as the answer is a classic behavioral error.

Go deeper Sequential updating

Yesterday’s posterior becomes today’s prior. After the guidance raise the probability of a beat is 0.680. If a second signal, an analyst upgrade, then arrives, appearing for 85% of beaters and 35% of non-beaters, and the two signals are independent given the outcome, then P(upgrade) = 0.85 × 0.680 + 0.35 × 0.320 = 0.690 and the new posterior is 0.578 ÷ 0.690 = 0.838.

Memorize this

MemorizeBayes' update

PieceSymbolMeaning
PriorP(A)before the news
LikelihoodP(B | A)news if the event is true
JointP(B | A) × P(A)news and event
Marginal probabilityP(B)sum of every joint for the news
PosteriorP(A | B)joint ÷ P(B)

Memory hook The posterior is your share of all the ways the news could have happened: the event branch over every branch with the news.

Know it cold Posterior = likelihood × prior ÷ P(B). Posteriors over all scenarios add to 1.

MemorizeDiffuse prior

Memory hook No reason to favor any scenario, so give each the same prior. The priors then cancel and the likelihoods alone set the posterior.

Know it cold Equal priors: posterior = likelihood ÷ sum of the likelihoods.

The four pieces of a Bayes update
Updating a probabilitynews arrives, so revise the view
  • Prior P(A) Memorize your probability before the news
  • Likelihood P(B | A) Memorize how likely the news is if the event is true
  • Marginal probability P(B) Memorize total chance of the news: add every branch that produces it
    • Event branch P(B | A) × P(A)
    • No-event branch P(B | not A) × P(not A)
  • Posterior P(A | B) Memorize event branch ÷ P(B)
Bayes' theorem Memorize
P(A∣B)=P(B∣A)P(B) P(A)P(A \mid B) = \dfrac{P(B \mid A)}{P(B)}\,P(A)
Quick example

P(A) = 0.35, P(B | A) = 0.85, P(B) = 0.50. P(A | B) = 0.85 × 0.35 ÷ 0.50 = 0.595.

On your calculator
  1. 0.85×0.35=÷0.5= 0.595
  1. 0.85ENTER0.35×0.5÷ 0.595

ENTER enter (on the HP, puts the number on the stack)

Marginal probability of the information Memorize
P(B)=P(B∣A) P(A)+P(B∣Ac) P(Ac)P(B) = P(B \mid A)\,P(A) + P(B \mid A^c)\,P(A^c)
Quick example

P(A) = 0.55, P(B | A) = 0.75, P(B | not A) = 0.35. P(B) = 0.4125 + 0.1575 = 0.57.

On your calculator
  1. 0.55×0.75+(0.45×0.35)= 0.57
  1. 0.55ENTER0.75×0.45ENTER0.35×+ 0.57

ENTER enter (on the HP, puts the number on the stack)

Missing likelihood from the marginal probability Use it
P(B∣Ac)=P(B)−P(B∣A) P(A)P(Ac)P(B \mid A^c) = \dfrac{P(B) - P(B \mid A)\,P(A)}{P(A^c)}
Quick example

P(B) = 0.34, P(B | A) = 0.55, P(A) = 0.25. P(B | not A) = (0.34 − 0.1375) ÷ 0.75 = 0.27.

On your calculator
  1. 0.34−(0.55×0.25)=÷0.75= 0.27
  1. 0.34ENTER0.55ENTER0.25×−0.75÷ 0.27

ENTER enter (on the HP, puts the number on the stack)

Bayes' theorem with several scenarios Use it
P(Ai∣B)=P(B∣Ai) P(Ai)∑jP(B∣Aj) P(Aj)P(A_i \mid B) = \dfrac{P(B \mid A_i)\,P(A_i)}{\sum_{j} P(B \mid A_j)\,P(A_j)}
Quick example

Priors 0.55, 0.35, 0.10 and likelihoods 0.25, 0.45, 0.75. P(B) = 0.1375 + 0.1575 + 0.075 = 0.37. Posterior of the first: 0.1375 ÷ 0.37 = 0.372.

On your calculator
  1. 0.55×0.25=STO1
  2. +(0.35×0.45)+(0.1×0.75)= 0.37
  3. 1/x×RCL1= 0.3716

STO store · 1/x reciprocal · RCL recall a stored number

  1. 0.55ENTER0.25×STO1
  2. 0.35ENTER0.45×+0.1ENTER0.75×+ 0.37
  3. 1/xRCL1× 0.3716

ENTER enter (on the HP, puts the number on the stack) · STO store · 1/x reciprocal · RCL recall a stored number

How it is asked

  1. Two-state posterior

    Prior 0.28; news 85% likely if the event is true, 25% likely otherwise. Posterior?

    P(B) = 0.238 + 0.18 = 0.418; 0.238 ÷ 0.418 = 0.57. Traps: 0.238 (joint), 0.85 (likelihood).

  2. Find the marginal probability P(B)

    Same facts. Marginal probability of the news?

    Add both branches: 0.85 × 0.28 + 0.25 × 0.72 = 0.418. Trap: 0.238 (event branch only).

  3. Three scenarios

    Priors 0.55, 0.35, 0.10; likelihoods 0.25, 0.45, 0.75. Posterior of the third?

    P(B) = 0.1375 + 0.1575 + 0.075 = 0.37; 0.075 ÷ 0.37 = 0.203.

  4. P(B) given, likelihood missing

    P(A) 0.25, P(B) 0.31, P(B | A) 0.85. P(B | not A)?

    (0.31 − 0.2125) ÷ 0.75 = 0.13; posterior P(A | B) = 0.2125 ÷ 0.31 = 0.685.

  5. Diffuse prior

    Equal priors; likelihoods 0.65 and 0.25. Posterior of the first?

    0.65 ÷ (0.65 + 0.25) = 0.65 ÷ 0.90 = 0.722.

Exam traps

  • Reporting the likelihood P(B | A) as if it were the posterior.
  • Reporting the joint probability P(A and B) without dividing by P(B).
  • Computing P(B) from the event branch only. Add every scenario that can produce the information.
  • Leaving out the prior: a strong signal about a rare event does not make it likely.

Checkpoint

7 exam-style questions. About 90 seconds each.

  1. 1An analyst puts a 10% prior probability on a bond being downgraded. Bonds that are later downgraded are placed on credit watch 80% of the time, and other bonds 10% of the time. The bond is placed on credit watch. The updated probability of a downgrade is closest to:

  2. 2In the same setting, the marginal probability that a bond is put on credit watch is closest to:

  3. 3In Bayes' theorem, the probability of the new information given that the event is true is called the:

  4. 4A lender sorts its borrowers into prime (prior probability 0.6), standard (0.3) and subprime (0.1). An early-warning flag is raised for prime borrowers 20% of the time, standard borrowers 50% of the time and subprime borrowers 90% of the time. A borrower is flagged. The probability that the borrower is subprime is closest to:

  5. 5An analyst has no basis to favor either of two scenarios and assigns each a prior of 0.5. A signal appears 60% of the time in the first scenario and 20% of the time in the second. The signal appears. The probability of the first scenario is closest to:

  6. 6Of 250 funds screened at the start of a year, 80 were flagged. Sixty funds outperformed during the year, and 42 of those had been flagged. The probability that a flagged fund outperformed is closest to:

  7. 7A lender expects 5% of its borrowers to default. A warning model flags 20% of all borrowers and 80% of the borrowers that later default. The probability that a flagged borrower defaults is closest to:

Key takeaways

  • Posterior = likelihood × prior ÷ P(B), where P(B) is the marginal probability of the information.
  • P(B) adds up every branch that produces it, by the total probability rule.
  • Strong news moves a probability a lot; a low prior limits how far.
  • With a diffuse (equal) prior, the likelihoods alone decide the posterior.
Bayes' theorem Memorize
P(A∣B)=P(B∣A)P(B) P(A)P(A \mid B) = \dfrac{P(B \mid A)}{P(B)}\,P(A)
Quick example

P(A) = 0.35, P(B | A) = 0.85, P(B) = 0.50. P(A | B) = 0.85 × 0.35 ÷ 0.50 = 0.595.

On your calculator
  1. 0.85×0.35=÷0.5= 0.595
  1. 0.85ENTER0.35×0.5÷ 0.595

ENTER enter (on the HP, puts the number on the stack)

Marginal probability of the information Memorize
P(B)=P(B∣A) P(A)+P(B∣Ac) P(Ac)P(B) = P(B \mid A)\,P(A) + P(B \mid A^c)\,P(A^c)
Quick example

P(A) = 0.55, P(B | A) = 0.75, P(B | not A) = 0.35. P(B) = 0.4125 + 0.1575 = 0.57.

On your calculator
  1. 0.55×0.75+(0.45×0.35)= 0.57
  1. 0.55ENTER0.75×0.45ENTER0.35×+ 0.57

ENTER enter (on the HP, puts the number on the stack)

Missing likelihood from the marginal probability Use it
P(B∣Ac)=P(B)−P(B∣A) P(A)P(Ac)P(B \mid A^c) = \dfrac{P(B) - P(B \mid A)\,P(A)}{P(A^c)}
Quick example

P(B) = 0.34, P(B | A) = 0.55, P(A) = 0.25. P(B | not A) = (0.34 − 0.1375) ÷ 0.75 = 0.27.

On your calculator
  1. 0.34−(0.55×0.25)=÷0.75= 0.27
  1. 0.34ENTER0.55ENTER0.25×−0.75÷ 0.27

ENTER enter (on the HP, puts the number on the stack)

Bayes' theorem with several scenarios Use it
P(Ai∣B)=P(B∣Ai) P(Ai)∑jP(B∣Aj) P(Aj)P(A_i \mid B) = \dfrac{P(B \mid A_i)\,P(A_i)}{\sum_{j} P(B \mid A_j)\,P(A_j)}
Quick example

Priors 0.55, 0.35, 0.10 and likelihoods 0.25, 0.45, 0.75. P(B) = 0.1375 + 0.1575 + 0.075 = 0.37. Posterior of the first: 0.1375 ÷ 0.37 = 0.372.

On your calculator
  1. 0.55×0.25=STO1
  2. +(0.35×0.45)+(0.1×0.75)= 0.37
  3. 1/x×RCL1= 0.3716

STO store · 1/x reciprocal · RCL recall a stored number

  1. 0.55ENTER0.25×STO1
  2. 0.35ENTER0.45×+0.1ENTER0.75×+ 0.37
  3. 1/xRCL1× 0.3716

ENTER enter (on the HP, puts the number on the stack) · STO store · 1/x reciprocal · RCL recall a stored number

All Quantitative Methods formulas, every lesson

Practice exam-style questions on Statistical Distributions

Questions about this lesson?

Where this comes back

Questions candidates ask

How do you use Bayes' theorem in CFA Level 1?

Find the prior and the likelihood of the information under each scenario. Multiply each prior by its likelihood to get the joint probabilities, add them to get the marginal probability of the information, P(B), then divide your scenario's joint probability by P(B). That ratio is the posterior.

What is the difference between prior and posterior probability?

The prior is your probability for an event before new information arrives. The posterior is the revised probability after you have taken the information into account. Today's posterior can become tomorrow's prior when the next piece of news arrives.

What is a diffuse prior?

A diffuse prior gives every scenario the same probability because you have no reason to favor one. The priors then cancel in Bayes' theorem, so the updated probabilities depend on the likelihoods alone.

What is the marginal probability in Bayes' theorem?

It is P(B), the overall chance of seeing the information, added up over every scenario that can produce it: P(B) = P(B | A)P(A) + P(B | not A)P(not A). It is the denominator that turns a joint probability into a posterior.

Spotted an error? Tell us and we will fix it.

  1. Random variables and distribution functions
  2. Unconditional expected value, variance and standard deviation
  3. Discrete distributions: uniform, binomial and Poisson
  4. Continuous distributions: uniform, normal and logistic
  5. Why asset prices are log-normal
  6. Probability trees, conditional expectations and conditional variance
  7. Covariance and correlation from a joint probability table
  8. Bayes' theorem: updating a probability with new information

Ask Sensei Listen instead

Questions on Bayes' theorem: updating a probability with new information

Learn with Sensei, out loud The voice tutor, in early access

Sensei teaches the lesson aloud and stops when you interrupt: "wait, why is the geometric mean lower?" It answers with the lesson's own example, then quizzes you by voice. Every account can try Sensei on one module, with one voice question.

USD 149 a month founding price (regular USD 199), kept for as long as you stay subscribed. Everything in Plus included.

In active development and improving every day. Send feedback · Plans and pricing

Analyst Dojo Plus

Your free review list holds 10 items.

Plus keeps everything you save, for USD 19 a month. To make room on the free plan, remove something from your review list.

See Plus

Lessons, checkpoints and the lesson questions in practice stay free. Compare plans