Repository navigation
2.2 Bayesian Statistics
Bayes' Theorem is a fundamental concept in probability theory and statistics, and it offers a powerful way to update our belief or certainty about a hypothesis when we are presented with new evidence or information. It's particularly useful in situations where we need to revise our assumptions based on new data, which is often referred to as "knowledge actualization."
The formula is usually stated as:
Here’s what each term represents:
-
$( P(A|B) )$ is the probability of event$A$ occurring given that$B$ is true. This is known as the posterior probability. -
$( P(B|A) )$ is the probability of event$B$ occurring given that$A$ is true. This is known as the likelihood. -
$( P(A) )$ is the probability of event$A$ . This is known as the prior probability. -
$( P(B) )$ is the probability of event$B$ . This is known as the marginal likelihood.
In the context of knowledge actualization and certainty:
-
Prior Probability (
$( P(A) )$ ): This represents our initial belief about the probability of an event (or the truth of a hypothesis) before we have any additional information. -
Likelihood (
$( P(B|A) )$ ): This is the probability of observing the evidence$(B)$ given that our hypothesis$(A)$ is true. It reflects how we update our beliefs in light of new data. -
Marginal Likelihood (
$( P(B) )$ ): This term normalizes the probability, ensuring that the probabilities sum up to$1$ . It's essentially the probability of observing the evidence under all possible hypotheses. -
Posterior Probability (
$( P(A|B) )$ ): This is what we are often trying to find out. It represents the updated belief about our hypothesis after taking into account the new evidence.
For example, in a medical context, Bayes' Theorem can be used to update the probability of a patient having a certain disease
In summary, Bayes' Theorem allows us to adjust our certainty or belief in a hypothesis (or the occurrence of an event) based on new evidence, making it a powerful tool for knowledge actualization in various fields.
The proof of Bayes' Theorem is rooted in the concepts of conditional probability and the definition of independence in probability theory. Let's go through it step by step.
-
Conditional Probability: The probability of an event A given that event B has occurred is denoted as (
$P(A|B)$ ) and is given by the formula: $$ P(A|B) = \frac{P(A \cap B)}{P(B)} $$ where ( P(A \cap B) ) is the probability that both A and B occur. -
Multiplication Rule: The probability of both A and B occurring (the joint probability) is given by: $$ P(A \cap B) = P(A|B) \times P(B) $$ This can also be expressed as: $$ P(A \cap B) = P(B|A) \times P(A) $$ since the event of A and B occurring together doesn't depend on which event is considered first.
Now, using these concepts, we can derive Bayes' Theorem. We know from the multiplication rule that:
Since (
We are interested in finding (
And that's Bayes' Theorem! It shows how the probability of event A given B is related to the probability of event
This theorem is a powerful tool in statistics and probability, as it allows for the updating of probabilities with new information, which is a cornerstone of inferential statistics and many applications in data science and machine learning.
Legend:
- 🔰 Start here
- 🏵️ Important Insight
- ⚙️ Technical and applications
- 💻 Some Code
- ⚜️ Advanced Topics
- 00.1 What Is Data?
-
00.2 Three Models of Reality (planned)
- 00.2.1 The Linguistic
- 00.2.2 The Symbolic
- 00.3.3 The Mathematical
- 00.3 Maps and Reality
- 00.4 Aside: Hossack, data as structure
- 00.5 Aside: Chomsky, data as evidence
- 01.1 🔰 Sets and Logic (planned)
- 01.2 Sample Space
- 01.3 Randomness and Pattern
- 01.4 Outcomes and Events
- 01.5 Finite and Infinite Sample Spaces
- 02.1 🔰 Functions (planned)
- 02.2 Types Are Alphabets
- 02.3 Random Variables: X : Ω → 𝒳 (planned)
- 02.4 Measurement Scales
- 02.5 Numerics
- 03.1 🔰 Fractions and Proportions (planned)
- 03.2 Randomness vs Uncertainty
- 03.3 Probability: Events, Conditioning, Bayes
- 03.4 Bayes' Theorem, Step by Step
- 03.5 Expected Value and Variance (planned)
- 03.6 Bernoulli (ES)
- 03.7 Discrete Uniform (ES)
- 03.8 🧗 Kolmogorov: Ω, 𝒜, ℙ
- 04.1 🔰 Powers and Logarithms (planned)
- 04.2 Rarity
- 04.3 Information Theory (Shannon)
- 04.4 Entropy: Three Views
- 05.1 🔰 Sums and Averages (planned)
- 05.2 Data, Measured
- 05.3 Sampling (ES)
- 05.4 Population and Sample (ES)
- 05.5 Types of Sampling (ES)
- 05.6 Choosing Summaries & Visuals
- 05.7 Visualization
- 05.8 Plots
- 06.1 What Is Statistics?
- 06.2 🔰 Curves and Area (planned)
- 06.3 Statistical Thinking
- 06.4 Variation
- 06.5 Uncertainty
- 06.6 Parameters vs Estimators (ES)
- 06.7 Distributions
- 06.8 Statistical Modeling
- 06.9 Statistical Methods
- 07.1 Data Storage: Databases (stub)
- 07.2 ER Diagrams
- 07.3 Chen Diagrams
- 07.4 SQL (planned)
- 07.5 Formal Languages and Regular Expressions (planned)
- 07.6 Reproducibility (planned)
08 · μ(x) — Fuzzy - When data is flexible
- 08.1 Fuzzy Logic (planned)
- 08.2 Fuzzy Numbers (planned)
- 08.3 Possibility vs Probability (planned)
09 · x(t) — Signals and systems - Where patterns live
- 09.1 Signals (stub)
- 09.2 Sampling and Aliasing (planned)
- 09.3 Convolution (planned)
- 09.4 Frequency (planned)
- 10.1 🔰 Vectors and Matrices (planned)
- 10.2 Mathematical Modelling (planned)
- 11.1 🔰 Derivatives (planned)
- 11.2 Convex Optimisation (planned)
- 12.1 Supervised Learning (planned)
- 12.2 Data in Language Models
- 13.1 Cause and Effect (planned)
- 13.2 Capstone Guide (planned)