The Central Idea
Conditional probabilities generally cannot simply be reversed.
In general,
\[ P(A\mid B)\neq P(B\mid A). \]Bayes' theorem provides the correct relationship:
\[ \boxed{ P(A\mid B) = \frac{P(B\mid A)P(A)}{P(B)} }. \]It turns a probability in one conditional direction into a probability in the reverse direction.
What the Formula Says
In
\[ P(A\mid B) = \frac{P(B\mid A)P(A)}{P(B)}, \]the quantity
\[ P(B\mid A) \]measures how likely the observed event \(B\) is when \(A\) occurs.
The quantity
\[ P(A) \]measures how common \(A\) is before the information \(B\) is imposed.
The denominator
\[ P(B) \]rescales the numerator relative to all ways in which \(B\) can occur.
Bayes' Theorem Comes from the Multiplication Rule
The intersection \(A\cap B\) can be written in two ways:
\[ P(A\cap B)=P(A)P(B\mid A) \]and
\[ P(A\cap B)=P(B)P(A\mid B). \]Since both expressions equal the same joint probability,
\[ P(A)P(B\mid A) = P(B)P(A\mid B). \]Deriving Bayes' Theorem
Starting from
\[ P(A)P(B\mid A) = P(B)P(A\mid B), \]divide by \(P(B)\), assuming \(P(B)>0\):
\[ P(A\mid B) = \frac{P(A)P(B\mid A)}{P(B)}. \]Therefore,
\[ \boxed{ P(A\mid B) = \frac{P(B\mid A)P(A)}{P(B)} }. \]Bayes' Theorem Reverses the Condition
Suppose we know
\[ P(B\mid A). \]Bayes' theorem helps us find
\[ P(A\mid B). \]These are different questions:
- \(P(B\mid A)\): among cases where \(A\) occurs, how often does \(B\) occur?
- \(P(A\mid B)\): among cases where \(B\) occurs, how often does \(A\) occur?
The reversal requires information about the relative frequencies of the events.
A First Numerical Example
Suppose
\[ P(A)=0.30, \] \[ P(B\mid A)=0.80, \]and
\[ P(B)=0.50. \]Then
\[ P(A\mid B) = \frac{0.80(0.30)}{0.50}. \]Therefore,
\[ \boxed{ P(A\mid B)=0.48 }. \]Why the Numerator Is a Joint Probability
The numerator
\[ P(B\mid A)P(A) \]equals
\[ P(A\cap B). \]Therefore Bayes' theorem can also be written
\[ \boxed{ P(A\mid B) = \frac{P(A\cap B)}{P(B)} }. \]This is exactly the definition of conditional probability.
Bayes' theorem is powerful because it computes the joint probability using the reverse conditional direction.
The Denominator Often Requires Total Probability
In many applications, \(P(B)\) is not given directly.
Suppose \(A\) and \(A^c\) form a partition. Then
\[ P(B) = P(A)P(B\mid A) + P(A^c)P(B\mid A^c). \]Substituting this into Bayes' theorem gives
\[ \boxed{ P(A\mid B) = \frac{P(A)P(B\mid A)} {P(A)P(B\mid A)+P(A^c)P(B\mid A^c)} }. \]The Two-Case Bayes Formula
When the sample space is divided into \(A\) and \(A^c\), the most common form is
\[ \boxed{ P(A\mid B) = \frac{P(A)P(B\mid A)} {P(A)P(B\mid A)+P(A^c)P(B\mid A^c)} }. \]The numerator is the \(A\)-and-\(B\) path.
The denominator is the total probability of reaching \(B\) through every possible path.
Bayes' Theorem with a General Partition
Suppose
\[ B_1,B_2,\ldots,B_n \]form a partition of the sample space and \(A\) is observed.
Then, for any \(B_k\),
\[ \boxed{ P(B_k\mid A) = \frac{P(B_k)P(A\mid B_k)} {\sum_{i=1}^{n}P(B_i)P(A\mid B_i)} }. \]The denominator is the law of total probability for \(A\).
Think in Terms of Paths
Bayes' theorem becomes easier to understand when viewed through a probability tree.
First, multiply along each path leading to the observed event.
Then add those path probabilities to find the total probability of the observation.
Finally, divide the path of interest by the total of all paths producing the observation.
The Path Ratio Interpretation
Bayes' theorem can be summarized as
\[ \boxed{ \text{conditional probability after observing }B = \frac{\text{desired path to }B} {\text{all paths to }B} }. \]This interpretation is especially useful in diagnostic testing, classification, manufacturing, and risk problems.
Example: Two Manufacturing Lines
A factory has two production lines.
Line 1 produces \(70\%\) of all units:
\[ P(L_1)=0.70. \]Line 2 produces \(30\%\):
\[ P(L_2)=0.30. \]Their defect rates are
\[ P(D\mid L_1)=0.02 \]and
\[ P(D\mid L_2)=0.06. \]Find the Overall Defect Probability
Use total probability:
\[ P(D) = 0.70(0.02)+0.30(0.06). \]Therefore,
\[ P(D) = 0.014+0.018 = \boxed{0.032}. \]Given a Defect, Which Line Is More Likely?
We want
\[ P(L_2\mid D). \]Bayes' theorem gives
\[ P(L_2\mid D) = \frac{P(L_2)P(D\mid L_2)}{P(D)}. \]Substitute:
\[ P(L_2\mid D) = \frac{0.30(0.06)}{0.032}. \]Thus,
\[ \boxed{ P(L_2\mid D)=0.5625 }. \]Although Line 2 produces only \(30\%\) of all units, it accounts for \(56.25\%\) of defective units under this model.
Why the Smaller Line Can Produce More Defects
Line 1 contributes defective units at rate
\[ 0.70(0.02)=0.014. \]Line 2 contributes defective units at rate
\[ 0.30(0.06)=0.018. \]The second path is larger even though Line 2 itself is smaller.
Bayes' theorem compares these joint contributions after the defect is observed.
Example: Medical Screening
Suppose a condition occurs in \(2\%\) of a population:
\[ P(D)=0.02. \]A test is positive with probability
\[ P(+\mid D)=0.95 \]for people with the condition.
It is also positive with probability
\[ P(+\mid D^c)=0.04 \]for people without the condition.
First Find the Total Positive Probability
Since
\[ P(D^c)=0.98, \]total probability gives
\[ P(+) = 0.02(0.95)+0.98(0.04). \]Therefore,
\[ P(+) = 0.019+0.0392 = \boxed{0.0582}. \]Now Reverse the Condition
We want the probability of the condition given a positive test:
\[ P(D\mid +). \]Bayes' theorem gives
\[ P(D\mid +) = \frac{P(D)P(+\mid D)}{P(+)}. \]Therefore,
\[ P(D\mid +) = \frac{0.02(0.95)}{0.0582} \approx \boxed{0.3265}. \]Under this model, about \(32.65\%\) of positive tests come from people who actually have the condition.
Why \(95\%\) Does Not Become \(95\%\) After Reversal
The statement
\[ P(+\mid D)=0.95 \]says that \(95\%\) of people with the condition test positive.
It does not say that \(95\%\) of people who test positive have the condition.
The second probability is
\[ P(D\mid +), \]and it depends not only on test behavior but also on how common the condition is in the population.
The Base-Rate Effect
When an event is rare, even a relatively small false-positive rate can generate many observations from the much larger complement group.
In the screening example:
\[ P(D\cap +)=0.019 \]while
\[ P(D^c\cap +)=0.0392. \]The false-positive path is larger because the group without the condition is much larger.
Bayes' Theorem Must Include the Base Rate
The factor
\[ P(A) \]in Bayes' theorem matters because it records how common the underlying event is before the new evidence is applied.
Ignoring this factor can produce severe errors when one group is much more common than another.
Example with Natural Frequencies
The screening example can also be understood by imagining \(10{,}000\) people.
If \(2\%\) have the condition, then
\[ 200 \]have it and
\[ 9{,}800 \]do not.
Count the Positive Results
Of the \(200\) people with the condition,
\[ 0.95(200)=190 \]test positive.
Of the \(9{,}800\) people without the condition,
\[ 0.04(9{,}800)=392 \]test positive.
Thus the total number of positive tests is
\[ 190+392=582. \]Calculate the Reversed Conditional Probability from Counts
Among the \(582\) positive tests, \(190\) come from people with the condition.
Therefore,
\[ P(D\mid +) = \frac{190}{582} \approx \boxed{0.3265}. \]This agrees with Bayes' theorem.
Natural Frequencies Can Clarify Bayes Problems
Converting probabilities into expected counts can make the structure easier to see.
A useful approach is:
- choose a convenient hypothetical population size;
- divide it according to the group probabilities;
- apply the conditional probabilities within each group;
- count the outcomes matching the observation;
- form the desired conditional ratio.
Example: Spam Classification
Suppose \(20\%\) of incoming messages are spam:
\[ P(S)=0.20. \]A filter flags \(90\%\) of spam messages:
\[ P(F\mid S)=0.90. \]It also flags \(5\%\) of legitimate messages:
\[ P(F\mid S^c)=0.05. \]Find the Probability a Message Is Flagged
First,
\[ P(S^c)=0.80. \]Then
\[ P(F) = 0.20(0.90)+0.80(0.05). \]Therefore,
\[ P(F) = 0.18+0.04 = \boxed{0.22}. \]Given a Flag, Find the Probability of Spam
Bayes' theorem gives
\[ P(S\mid F) = \frac{P(S)P(F\mid S)}{P(F)}. \]Thus,
\[ P(S\mid F) = \frac{0.20(0.90)}{0.22} = \boxed{\frac{9}{11}} \approx \boxed{0.8182}. \]About \(81.82\%\) of flagged messages are spam under this model.
Example: Loan Risk Classification
Suppose \(10\%\) of borrowers eventually default:
\[ P(D)=0.10. \]A risk model labels \(80\%\) of eventual defaulters as high risk:
\[ P(H\mid D)=0.80. \]It labels \(15\%\) of nondefaulters as high risk:
\[ P(H\mid D^c)=0.15. \]Find the Overall High-Risk Classification Rate
Since
\[ P(D^c)=0.90, \]total probability gives
\[ P(H) = 0.10(0.80)+0.90(0.15). \]Therefore,
\[ P(H) = 0.08+0.135 = \boxed{0.215}. \]Given High Risk, Find the Probability of Default
Apply Bayes' theorem:
\[ P(D\mid H) = \frac{0.10(0.80)}{0.215}. \]Therefore,
\[ \boxed{ P(D\mid H)\approx0.3721 }. \]A high-risk classification raises the default probability from \(10\%\) to about \(37.21\%\), but it does not imply certainty.
Example: Three Possible Sources
A warehouse receives components from three suppliers:
\[ P(S_1)=0.50,\qquad P(S_2)=0.30,\qquad P(S_3)=0.20. \]Their defect probabilities are
\[ P(D\mid S_1)=0.01, \] \[ P(D\mid S_2)=0.03, \] \[ P(D\mid S_3)=0.05. \]Find the Overall Defect Probability
By total probability,
\[ P(D) = 0.50(0.01) + 0.30(0.03) + 0.20(0.05). \]Thus,
\[ P(D) = 0.005+0.009+0.010 = \boxed{0.024}. \]Given a Defect, Find the Supplier Probability
Suppose we want
\[ P(S_3\mid D). \]Then
\[ P(S_3\mid D) = \frac{P(S_3)P(D\mid S_3)}{P(D)}. \]Therefore,
\[ P(S_3\mid D) = \frac{0.20(0.05)}{0.024}. \]Hence,
\[ \boxed{ P(S_3\mid D)=\frac{5}{12}\approx0.4167 }. \]Compare Source Share with Defect Share
Supplier 3 provides only
\[ 20\% \]of all components.
But it provides about
\[ 41.67\% \]of defective components.
Bayes' theorem converts a source's overall share and its within-source defect rate into its share among observed defects.
Bayes' Theorem from a Two-Way Table
Suppose a population of \(1{,}000\) items is summarized as follows:
| Flagged | Not Flagged | Total | |
|---|---|---|---|
| Defective | 90 | 10 | 100 |
| Not Defective | 90 | 810 | 900 |
| Total | 180 | 820 | 1000 |
Read the Forward Conditional Probability
Among defective items, \(90\) of \(100\) are flagged:
\[ P(F\mid D)=\frac{90}{100}=0.90. \]This is the probability of a flag given a defect.
Read the Reverse Conditional Probability
Among all \(180\) flagged items, \(90\) are defective:
\[ P(D\mid F)=\frac{90}{180}=\boxed{0.50}. \]The forward conditional probability is \(90\%\), while the reversed conditional probability is only \(50\%\).
The denominator changed from the defective group to the flagged group.
Verify the Table Using Bayes' Theorem
From the table,
\[ P(D)=\frac{100}{1000}=0.10, \] \[ P(F\mid D)=0.90, \]and
\[ P(F)=\frac{180}{1000}=0.18. \]Therefore,
\[ P(D\mid F) = \frac{0.10(0.90)}{0.18} = \boxed{0.50}. \]Bayes' Theorem and Probability Trees
A tree makes Bayes' theorem procedural.
- Branch first by the underlying groups.
- Branch again by the observed outcome.
- Multiply along each complete path.
- Add all paths producing the observed outcome.
- Divide the desired observed path by that total.
The final division is the conditional probability after observing the evidence.
Forward Probability and Reverse Probability
Many real problems naturally provide a forward relationship such as
\[ P(\text{observation}\mid\text{source}). \]But the practical question often asks for
\[ P(\text{source}\mid\text{observation}). \]Bayes' theorem bridges these two directions.
Example: Quality-Control Alarm
Suppose \(4\%\) of units are defective:
\[ P(D)=0.04. \]An automated system sounds an alarm for \(95\%\) of defective units:
\[ P(A\mid D)=0.95. \]It also sounds an alarm for \(3\%\) of nondefective units:
\[ P(A\mid D^c)=0.03. \]Find the Overall Alarm Probability
First,
\[ P(D^c)=0.96. \]Then
\[ P(A) = 0.04(0.95)+0.96(0.03). \]Therefore,
\[ P(A) = 0.038+0.0288 = \boxed{0.0668}. \]Given an Alarm, Find the Probability of a Defect
Bayes' theorem gives
\[ P(D\mid A) = \frac{0.04(0.95)}{0.0668}. \]Therefore,
\[ \boxed{ P(D\mid A)\approx0.5689 }. \]Under this model, about \(56.89\%\) of alarms correspond to defective units.
An Observation Changes Relative Plausibility
Before the alarm,
\[ P(D)=0.04. \]After the alarm,
\[ P(D\mid A)\approx0.5689. \]The observed alarm dramatically changes the probability assigned to a defect because alarms are much more likely when a defect is present.
Evidence Can Also Lower a Probability
Bayes' theorem does not always increase a probability.
If the observed event is less likely under \(A\) than under competing alternatives, observing it can reduce
\[ P(A\mid B) \]below
\[ P(A). \]The direction of the update depends on how strongly the evidence favors one possibility over another.
Example: Evidence That Lowers Probability
Suppose
\[ P(A)=0.50, \] \[ P(B\mid A)=0.20, \]and
\[ P(B\mid A^c)=0.60. \]Then
\[ P(B) = 0.50(0.20)+0.50(0.60) = 0.40. \]Therefore,
\[ P(A\mid B) = \frac{0.50(0.20)}{0.40} = \boxed{0.25}. \]Observing \(B\) lowers the probability of \(A\) from \(0.50\) to \(0.25\).
Evidence That Is Equally Likely Under Both Cases
Suppose
\[ P(B\mid A)=P(B\mid A^c). \]Then observing \(B\) does not favor \(A\) over \(A^c\).
In that case,
\[ P(A\mid B)=P(A). \]The observation provides no probability-relevant information about whether \(A\) occurred.
Bayes' Theorem and Independence
If \(A\) and \(B\) are independent, then
\[ P(B\mid A)=P(B). \]Bayes' theorem becomes
\[ P(A\mid B) = \frac{P(B)P(A)}{P(B)} = P(A). \]Thus independence means the observation \(B\) produces no update to the probability of \(A\).
Bayes' Theorem Is Not a Causal Rule
Bayes' theorem relates conditional probabilities.
It does not, by itself, establish that one event causes another.
A high value of
\[ P(A\mid B) \]means that \(A\) is common among cases where \(B\) occurs. Causal interpretation requires additional assumptions or evidence.
Bayes' Theorem Is About Consistent Probability Accounting
The theorem is not a separate probability system.
It follows from:
- conditional probability;
- the multiplication rule;
- the law of total probability.
Its power comes from reorganizing known probabilities to answer a reversed conditional question.
Common Error: Reversing the Conditional Probability Directly
A frequent mistake is to assume
\[ P(A\mid B)=P(B\mid A). \]This is generally false.
The correct relationship is
\[ \boxed{ P(A\mid B) = \frac{P(B\mid A)P(A)}{P(B)} }. \]Common Error: Ignoring the Base Probability
Suppose an event is detected accurately \(99\%\) of the time.
That alone does not determine the probability that the event occurred after a positive detection.
We also need to know how common the event is and how often positive detections occur when the event is absent.
Common Error: Using Only the True-Positive Path
In a two-group problem, the denominator must include every path leading to the observed event.
For example,
\[ P(+) = P(D)P(+\mid D) + P(D^c)P(+\mid D^c). \]Using only
\[ P(D)P(+\mid D) \]ignores positive results arising from the complement group.
Common Error: Dividing by the Wrong Total
In
\[ P(A\mid B), \]the denominator must represent all outcomes satisfying \(B\).
The denominator is therefore
\[ P(B), \]not \(P(A)\), not \(P(A\cap B)\), and not automatically \(1\).
Common Error: Forgetting Complement Probabilities
In a two-case problem,
\[ P(A^c)=1-P(A). \]If the observation can occur under both \(A\) and \(A^c\), both paths must appear in the denominator.
Common Error: Confusing Accuracy with a Reversed Conditional
A statement such as
\[ P(+\mid D)=0.95 \]describes performance within the \(D\) group.
It is not automatically the same as
\[ P(D\mid +). \]The latter also depends on the base rates of \(D\) and \(D^c\) and on the behavior of the observation under both groups.
Common Error: Forgetting That the Denominator Is a Weighted Sum
If
\[ B_1,\ldots,B_n \]form a partition, then
\[ P(A) = \sum_i P(B_i)P(A\mid B_i). \]The conditional probabilities cannot simply be added without their group weights.
Common Error: Treating Bayes' Theorem as Automatic Proof
Bayes' theorem calculates probabilities within a specified probability model.
If the input probabilities are inaccurate, poorly estimated, or based on an unsuitable model, the resulting conditional probability inherits those limitations.
A Reliable Procedure for Two Cases
- Identify the event whose probability you want after observing the evidence.
- Write the target in conditional form, such as \(P(A\mid B)\).
- Find the base probability \(P(A)\).
- Find the observation probability under \(A\), namely \(P(B\mid A)\).
- Find the competing path through \(A^c\), namely \(P(A^c)P(B\mid A^c)\).
- Use total probability to calculate \(P(B)\).
- Divide the desired joint path by the total probability of the observation.
- Check that the result lies between \(0\) and \(1\).
- Interpret the result in the correct conditional direction.
A Reliable Procedure for Several Cases
- Identify a partition \(B_1,\ldots,B_n\).
- Identify the observed event \(A\).
- Compute each path \(P(B_i)P(A\mid B_i)\).
- Add all paths to obtain \(P(A)\).
- Select the path corresponding to the desired group \(B_k\).
- Divide that path by the total probability \(P(A)\).
- Interpret \(P(B_k\mid A)\) as the share of observed-\(A\) cases coming from \(B_k\).
Example: Full Two-Case Workflow
Suppose
\[ P(A)=0.25, \] \[ P(B\mid A)=0.80, \]and
\[ P(B\mid A^c)=0.20. \]First,
\[ P(A^c)=0.75. \]Then
\[ P(B) = 0.25(0.80)+0.75(0.20) = 0.20+0.15 = 0.35. \]Therefore,
\[ P(A\mid B) = \frac{0.25(0.80)}{0.35} = \boxed{\frac{4}{7}} \approx \boxed{0.5714}. \]Example: Full Three-Case Workflow
Suppose
\[ P(C_1)=0.50,\qquad P(C_2)=0.30,\qquad P(C_3)=0.20, \]and
\[ P(E\mid C_1)=0.10, \] \[ P(E\mid C_2)=0.20, \] \[ P(E\mid C_3)=0.40. \]First calculate
\[ P(E) = 0.50(0.10)+0.30(0.20)+0.20(0.40) = 0.19. \]Then
\[ P(C_3\mid E) = \frac{0.20(0.40)}{0.19}. \]Therefore,
\[ \boxed{ P(C_3\mid E)=\frac{8}{19}\approx0.4211 }. \]Practice 1: Direct Bayes Formula
Suppose
\[ P(A)=0.40, \] \[ P(B\mid A)=0.75, \]and
\[ P(B)=0.50. \]Find \(P(A\mid B)\).
Practice 2: Two-Case Total Probability
Suppose
\[ P(A)=0.30, \] \[ P(B\mid A)=0.80, \]and
\[ P(B\mid A^c)=0.20. \]Find \(P(B)\).
Practice 3: Reverse the Condition
Using the probabilities from Practice 2, find \(P(A\mid B)\).
Practice 4: Manufacturing
Supplier 1 provides \(60\%\) of parts and has a \(2\%\) defect rate. Supplier 2 provides \(40\%\) and has a \(5\%\) defect rate.
Given that a randomly selected part is defective, find the probability that it came from Supplier 2.
Practice 5: Classification
Suppose \(15\%\) of items belong to class \(C\). A system flags \(90\%\) of class-\(C\) items and \(10\%\) of non-\(C\) items.
Given that an item is flagged, find the probability that it belongs to class \(C\).
Practice 6: Three Sources
Three sources occur with probabilities
\[ 0.50,\qquad0.30,\qquad0.20. \]An event \(E\) occurs with conditional probabilities
\[ 0.10,\qquad0.20,\qquad0.50 \]under the three sources respectively.
Given that \(E\) occurred, find the probability that the source was the third one.
Practice 7: Evidence That Lowers Probability
Suppose
\[ P(A)=0.60, \] \[ P(B\mid A)=0.20, \]and
\[ P(B\mid A^c)=0.50. \]Find \(P(A\mid B)\).
Practice 8: Natural Frequencies
In a population of \(1{,}000\) items, \(100\) are defective. A test flags \(90\) defective items and \(90\) nondefective items.
Given that an item is flagged, find the probability that it is defective.
Practice 9: Compare Forward and Reverse Conditionals
Suppose
\[ P(B\mid A)=0.90, \]but
\[ P(A\mid B)=0.45. \]Is this possible? Explain.
Practice 10: Identify the Error
A condition occurs in \(1\%\) of a population. A test is positive for \(99\%\) of people with the condition.
A student concludes:
\[ P(\text{condition}\mid\text{positive})=0.99. \]Explain why this conclusion is not justified from the given information alone.
Practice Answers
Practice 1
\[ P(A\mid B) = \frac{0.75(0.40)}{0.50} = \boxed{0.60}. \]Practice 2
First,
\[ P(A^c)=0.70. \]Then
\[ P(B) = 0.30(0.80)+0.70(0.20) = 0.24+0.14. \]Therefore,
\[ \boxed{P(B)=0.38}. \]Practice 3
\[ P(A\mid B) = \frac{0.30(0.80)}{0.38} = \frac{0.24}{0.38}. \]Thus,
\[ \boxed{ P(A\mid B)=\frac{12}{19}\approx0.6316 }. \]Practice 4
First find the total defect probability:
\[ P(D) = 0.60(0.02)+0.40(0.05) = 0.012+0.020 = 0.032. \]Then
\[ P(S_2\mid D) = \frac{0.40(0.05)}{0.032} = \boxed{0.625}. \]Practice 5
First,
\[ P(C^c)=0.85. \]The overall flag probability is
\[ P(F) = 0.15(0.90)+0.85(0.10) = 0.135+0.085 = 0.22. \]Therefore,
\[ P(C\mid F) = \frac{0.15(0.90)}{0.22} = \boxed{\frac{27}{44}} \approx \boxed{0.6136}. \]Practice 6
First,
\[ P(E) = 0.50(0.10)+0.30(0.20)+0.20(0.50). \]Thus,
\[ P(E) = 0.05+0.06+0.10 = 0.21. \]Therefore,
\[ P(S_3\mid E) = \frac{0.20(0.50)}{0.21} = \boxed{\frac{10}{21}} \approx \boxed{0.4762}. \]Practice 7
First,
\[ P(A^c)=0.40. \]Then
\[ P(B) = 0.60(0.20)+0.40(0.50) = 0.12+0.20 = 0.32. \]Therefore,
\[ P(A\mid B) = \frac{0.60(0.20)}{0.32} = \boxed{0.375}. \]The observation lowers the probability of \(A\) from \(0.60\) to \(0.375\).
Practice 8
There are
\[ 90+90=180 \]flagged items in total.
Of those, \(90\) are defective:
\[ \boxed{ P(D\mid F)=\frac{90}{180}=0.50 }. \]Practice 9
Yes. Conditional probabilities in opposite directions can be very different because their denominators are different.
There is no requirement that
\[ P(B\mid A)=P(A\mid B). \]Practice 10
The value
\[ 0.99 \]is \(P(\text{positive}\mid\text{condition})\), not
\[ P(\text{condition}\mid\text{positive}). \]To reverse the condition, we also need information about positive results among people without the condition, or equivalently enough information to calculate the total positive-test probability.
What to Remember
Bayes' theorem reverses conditional direction:
\[ \boxed{ P(A\mid B) = \frac{P(B\mid A)P(A)}{P(B)} }. \]When \(A\) and \(A^c\) form the relevant partition,
\[ \boxed{ P(A\mid B) = \frac{P(A)P(B\mid A)} {P(A)P(B\mid A)+P(A^c)P(B\mid A^c)} }. \]- Conditional probabilities cannot usually be reversed directly.
- The numerator is the joint probability of the desired path.
- The denominator is the total probability of the observed event.
- Total probability collects all paths producing the observation.
- Base rates matter.
- Rare underlying events can remain relatively unlikely even after strong evidence.
- Natural frequencies and probability trees can make Bayes calculations easier to interpret.
- Bayes' theorem updates probability within a model; it does not by itself establish causation.
The central habit is: compare the desired path with every path that could have produced the observed evidence.
Where We Go Next
Bayes' theorem shows how an observed event changes the probability assigned to an underlying possibility. The next step is to give the pieces of this update a more systematic vocabulary.
The next lesson, Prior, Likelihood, and Posterior, develops the language used to describe probabilities before evidence, the compatibility of evidence with competing possibilities, and probabilities after the evidence is incorporated.