~/writing/math-foundations-for-reasoning-models $ ls
Probability for Learning
Conditional Probability
Conditional probability measures the probability of an event given that another event is known.
~/writing/math-foundations-for-reasoning-models $ cat topic.md
Conditional Probability
Definition
Conditional probability measures the probability of one event given that another event is known.
Written as:
P(A | B)
Read as:
probability of A given B
Conditional probability updates the probability of one thing using known information.
Simple Example
Let:
A = it rains
B = sky is cloudy
Then:
P(A | B)
means:
probability it rains, given that the sky is cloudy
This may be higher than the general probability of rain.
Knowing context can change probability.
Conditional vs Unconditional Probability
Unconditional probability:
P(A)
means probability of A without extra information.
Conditional probability:
P(A | B)
means probability of A after knowing B.
Conditional probability is probability under context.
Formula
Conditional probability can be written as:
P(A | B) = P(A and B) / P(B)
This means:
among cases where B happens,
what fraction also have A?
Conditioning restricts attention to the world where
Bis true.
Example With Counts
Suppose:
100 messages total
40 are bug reports
20 are urgent
10 are both bug reports and urgent
Probability a message is urgent given it is a bug report:
P(urgent | bug) = 10 / 40 = 0.25
We divide by bug reports, not by all messages.
The condition changes the reference group.
Why Conditional Probability Matters For Learning
Prediction often asks for conditional probability.
Example:
P(label | input)
Read as:
probability of a label given the input
This is what many classifiers try to estimate.
Prediction is often conditional probability estimation.
Conditional Probability And Context
The same outcome can have different probabilities under different conditions.
Example:
P(rain)
P(rain | cloudy)
P(rain | clear sky)
Each answers a different question.
Probability depends on what information is being conditioned on.
Final Summary
- Conditional probability measures probability given known information.
- It is written as
P(A | B). - It differs from unconditional probability
P(A). - Conditioning changes the reference group.
- Prediction often asks for
P(label | input). - Conditional probability connects probability to context.
~/writing/math-foundations-for-reasoning-models $ open
Continue the series.
Independence