Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Bayes' Theorem and Conditional Probability | Foundations of Bayesian Thinking
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Bayesian Statistics and Probabilistic Modeling

bookBayes' Theorem and Conditional Probability

Understanding how beliefs are updated in the light of new evidence is a central idea in Bayesian statistics. This process is formalized by Bayes' theorem, which is built upon the concept of conditional probability. To see how Bayes' theorem arises, start with the definition of conditional probability: the probability of event A given event B is written as P(AB)P(A|B) and is defined as the probability of both A and B happening, divided by the probability of B:

P(AB)=P(AB)/P(B)P(A|B) = P(A \cap B) / P(B)

Similarly, the probability of B given A is:

P(BA)=P(AB)/P(A)P(B|A) = P(A \cap B) / P(A)

Both P(AB)×P(B)P(A|B) \times P(B) and P(BA)×P(A)P(B|A) \times P(A) are equal to P(AB)P(A \cap B). Setting these equal gives:

P(AB)×P(B)=P(BA)×P(A)P(A|B) \times P(B) = P(B|A) \times P(A)

Solving for P(AB)P(A|B) yields Bayes' theorem:

P(AB)=[P(BA)×P(A)]/P(B)P(A|B) = [P(B|A) \times P(A)] / P(B)

Each term in Bayes' theorem has a specific interpretation:

  • P(AB)P(A|B) is the posterior probability: your updated belief about A after observing B;
  • P(A)P(A) is the prior probability: your belief about A before seeing B;
  • P(BA)P(B|A) is the likelihood: how probable B is, assuming A is true;
  • P(B)P(B) is the marginal probability: the overall probability of observing B under all possible scenarios.

This formula allows you to update your beliefs (the prior) in light of new evidence (the likelihood) to obtain a revised belief (the posterior).

Medical Testing
expand arrow

Imagine testing for a rare disease. Even if a test is highly accurate, the probability that a person actually has the disease given a positive test result (posterior) depends on the disease's overall rarity (prior) and the test's accuracy (likelihood). Bayes' theorem helps calculate the true chance a patient is sick after a positive result.

Spam Filtering
expand arrow

Email spam filters use Bayes' theorem to estimate the probability that a message is spam, given the presence of certain words. The prior is the base rate of spam, the likelihood is how often the word appears in spam versus non-spam, and the posterior is the updated probability that the email is spam.

Fault Diagnosis in Engineering
expand arrow

When a machine shows an error signal, engineers use Bayes' theorem to update the probability of different faults being the cause, based on prior failure rates and the likelihood of the signal given each fault.

Legal Reasoning
expand arrow

In court, the probability of guilt (posterior) can be updated as new evidence is presented, considering both the prior odds and the likelihood of the evidence under guilt or innocence.

Weather Forecasting
expand arrow

Meteorologists update the probability of rain (posterior) as new data (such as satellite images) arrives, factoring in prior climate data and the likelihood of observing the data if rain is imminent.

1. Which of the following best describes the "likelihood" term in Bayes' theorem?

2. If P(A|B) is the probability of A given B, and P(B|A) is the probability of B given A, which of the following is true in the context of Bayes' theorem?

3. When you observe new evidence B, how does it affect your belief about hypothesis A in Bayesian inference?

question mark

Which of the following best describes the "likelihood" term in Bayes' theorem?

Select the correct answer

question mark

If P(A|B) is the probability of A given B, and P(B|A) is the probability of B given A, which of the following is true in the context of Bayes' theorem?

Select the correct answer

question mark

When you observe new evidence B, how does it affect your belief about hypothesis A in Bayesian inference?

Select the correct answer

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 2

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Suggested prompts:

Can you give an example of how Bayes' theorem is used in practice?

What is the difference between prior and posterior probability?

How do you calculate the marginal probability $$P(B)$$ in Bayes' theorem?

bookBayes' Theorem and Conditional Probability

Glissez pour afficher le menu

Understanding how beliefs are updated in the light of new evidence is a central idea in Bayesian statistics. This process is formalized by Bayes' theorem, which is built upon the concept of conditional probability. To see how Bayes' theorem arises, start with the definition of conditional probability: the probability of event A given event B is written as P(AB)P(A|B) and is defined as the probability of both A and B happening, divided by the probability of B:

P(AB)=P(AB)/P(B)P(A|B) = P(A \cap B) / P(B)

Similarly, the probability of B given A is:

P(BA)=P(AB)/P(A)P(B|A) = P(A \cap B) / P(A)

Both P(AB)×P(B)P(A|B) \times P(B) and P(BA)×P(A)P(B|A) \times P(A) are equal to P(AB)P(A \cap B). Setting these equal gives:

P(AB)×P(B)=P(BA)×P(A)P(A|B) \times P(B) = P(B|A) \times P(A)

Solving for P(AB)P(A|B) yields Bayes' theorem:

P(AB)=[P(BA)×P(A)]/P(B)P(A|B) = [P(B|A) \times P(A)] / P(B)

Each term in Bayes' theorem has a specific interpretation:

  • P(AB)P(A|B) is the posterior probability: your updated belief about A after observing B;
  • P(A)P(A) is the prior probability: your belief about A before seeing B;
  • P(BA)P(B|A) is the likelihood: how probable B is, assuming A is true;
  • P(B)P(B) is the marginal probability: the overall probability of observing B under all possible scenarios.

This formula allows you to update your beliefs (the prior) in light of new evidence (the likelihood) to obtain a revised belief (the posterior).

Medical Testing
expand arrow

Imagine testing for a rare disease. Even if a test is highly accurate, the probability that a person actually has the disease given a positive test result (posterior) depends on the disease's overall rarity (prior) and the test's accuracy (likelihood). Bayes' theorem helps calculate the true chance a patient is sick after a positive result.

Spam Filtering
expand arrow

Email spam filters use Bayes' theorem to estimate the probability that a message is spam, given the presence of certain words. The prior is the base rate of spam, the likelihood is how often the word appears in spam versus non-spam, and the posterior is the updated probability that the email is spam.

Fault Diagnosis in Engineering
expand arrow

When a machine shows an error signal, engineers use Bayes' theorem to update the probability of different faults being the cause, based on prior failure rates and the likelihood of the signal given each fault.

Legal Reasoning
expand arrow

In court, the probability of guilt (posterior) can be updated as new evidence is presented, considering both the prior odds and the likelihood of the evidence under guilt or innocence.

Weather Forecasting
expand arrow

Meteorologists update the probability of rain (posterior) as new data (such as satellite images) arrives, factoring in prior climate data and the likelihood of observing the data if rain is imminent.

1. Which of the following best describes the "likelihood" term in Bayes' theorem?

2. If P(A|B) is the probability of A given B, and P(B|A) is the probability of B given A, which of the following is true in the context of Bayes' theorem?

3. When you observe new evidence B, how does it affect your belief about hypothesis A in Bayesian inference?

question mark

Which of the following best describes the "likelihood" term in Bayes' theorem?

Select the correct answer

question mark

If P(A|B) is the probability of A given B, and P(B|A) is the probability of B given A, which of the following is true in the context of Bayes' theorem?

Select the correct answer

question mark

When you observe new evidence B, how does it affect your belief about hypothesis A in Bayesian inference?

Select the correct answer

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 2
some-alt