You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -466,6 +466,21 @@ Bayes' theorem can be stated as follows:
466
466
and how likely A is on its own, written P(A)
467
467
and how likely B is on its own, written P(B)
468
468
469
+
#### Bayes Theorem Rule:
470
+
471
+
The rule has a very simple derivation that directly leads from the relationship between joint and conditional probabilities. First, note that P(A,B) = P(A|B)P(B) = P(B,A) = P(B|A)P(A). Next, we can set the two terms involving conditional probabilities equal to each other, so P(A|B)P(B) = P(B|A)P(A), and finally, divide both sides by P(B) to arrive at Bayes rule.
472
+
473
+
In this formula, A is the event we want the probability of, and B is the new evidence that is related to A in some way.
474
+
475
+
P(A|B) is called the **posterior**; this is what we are trying to estimate. In the above example, this would be the "probability of having cancer given that the person is a smoker".
476
+
477
+
P(B|A) is called the **likelihood**; this is the probability of observing the new evidence, given our initial hypothesis. In the above example, this would be the "probability of being a smoker given that the person has cancer".
478
+
479
+
P(A) is called the **prior**; this is the probability of our hypothesis without any additional prior information. In the above example, this would be the "probability of having cancer".
480
+
481
+
P(B) is called the marginal **likelihood**; this is the total probability of observing the evidence. In the above example, this would be the "probability of being a smoker". In many applications of Bayes Rule, this is ignored, as it mainly serves as normalization.
482
+
483
+
##### Example:
469
484
Let us say P(Fire) means how often there is fire, and P(Smoke) means how often we see smoke, then:
470
485
471
486
P(Fire|Smoke) means how often there is fire when we can see smoke
0 commit comments