bayes_theorem
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| bayes_theorem [2025/09/21 16:38] – hkimscil | bayes_theorem [2025/09/21 22:35] (current) – hkimscil | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Bayes' Theorem ====== | ====== Bayes' Theorem ====== | ||
| - | \begin{align} | + | <WRAP left> |
| - | & & P(A \mid B) = \dfrac{P(A \cap B)}{P(B)} \nonumber \\ | + | \begin{eqnarray*} |
| - | & & P(B \mid A) = \dfrac{P(B \cap A)}{P(A)} \nonumber \\ | + | |
| - | & & \text{heance } \nonumber \\ | + | |
| - | \end{align} | + | |
| - | + | ||
| - | + | ||
| - | \begin{eqnarray} | + | |
| P(A \mid B) & = & \dfrac{P(A \cap B)}{P(B)} | P(A \mid B) & = & \dfrac{P(A \cap B)}{P(B)} | ||
| P(B \mid A) & = & \dfrac{P(B \cap A)}{P(A)} | P(B \mid A) & = & \dfrac{P(B \cap A)}{P(A)} | ||
| - | \text{heance } & & | + | \text{heance } |
| P(A \cap B) & = & P(A \mid B) * P(B) \;\; \text{ and | P(A \cap B) & = & P(A \mid B) * P(B) \;\; \text{ and | ||
| - | P(B \cap A) & = & P(B \mid A) * P(A) \\ | + | P(B \cap A) & = & P(B \mid A) * P(A) \qquad\qquad\qquad\qquad\qquad\qquad\qquad (1) \\ |
| | | ||
| | | ||
| P(B) & = & P(A \cap B) + P(\neg A \cap B) \nonumber \\ | P(B) & = & P(A \cap B) + P(\neg A \cap B) \nonumber \\ | ||
| & = & P(B \cap A) + P(B \cap \neg A) \nonumber \\ | & = & P(B \cap A) + P(B \cap \neg A) \nonumber \\ | ||
| - | & = & P(B \mid A) * P(A) + P(B \mid \neg A) * P(\neg A) \\ | + | & = & P(B \mid A) * P(A) + P(B \mid \neg A) * P(\neg A) \qquad\qquad (2) \\ |
| - | | + | \\ |
| - | \nonumber | + | \\ |
| - | \text{suppose that we not know } P(B) \nonumber | + | |
| P(A \mid B) & = & \dfrac{P(A \cap B)}{P(B)} \nonumber | P(A \mid B) & = & \dfrac{P(A \cap B)}{P(B)} \nonumber | ||
| & = & \dfrac{P(B \cap A)}{P(B)} \;\;\; \text{ from (1) and (2) } \nonumber | & = & \dfrac{P(B \cap A)}{P(B)} \;\;\; \text{ from (1) and (2) } \nonumber | ||
| & = & \dfrac {(1)} {(2)} \nonumber \\ | & = & \dfrac {(1)} {(2)} \nonumber \\ | ||
| - | & = & \dfrac {P(B \mid A) * P(A)} {P(B \mid A) * P(A) + P(B \mid \neg A) * P(\neg A)} \\ | + | & = & \dfrac {P(B \mid A) * P(A)} {P(B \mid A) * P(A) + P(B \mid \neg A) * P(\neg A)} \qquad\qquad (3) \\ |
| + | |||
| + | |||
| + | \end{eqnarray*} | ||
| + | </ | ||
| + | <WRAP clear /> | ||
| + | |||
| + | |||
| + | |||
| + | <WRAP box left> | ||
| + | \begin{eqnarray} | ||
| + | & & P(A \mid B) = \dfrac{P(A \cap B)}{P(B)} | ||
| + | & & P(B \mid A) = \dfrac{P(B \cap A)}{P(A)} | ||
| + | & & \text{heance } | ||
| + | & & P(A \cap B) = P(A \mid B) * P(B) \;\; \text{ and | ||
| + | & & P(B \cap A) = P(B \mid A) * P(A) \\ | ||
| + | | ||
| + | | ||
| + | & & P(B) = P(A \cap B) + P(\neg A \cap B) \nonumber \\ | ||
| + | & & = P(B \cap A) + P(B \cap \neg A) \nonumber \\ | ||
| + | & & = P(B \mid A) * P(A) + P(B \mid \neg A) * P(\neg A) \\ | ||
| + | | ||
| + | | ||
| + | & & \text{suppose that we not know } P(B) \nonumber \\ | ||
| + | & & P(A \mid B) = \dfrac{P(A \cap B)}{P(B)} \nonumber | ||
| + | & & = \dfrac{P(B \cap A)}{P(B)} \;\;\; \text{ from (1) and (2) } \nonumber | ||
| + | & & = \dfrac {(1)} {(2)} \nonumber \\ | ||
| + | & & = \dfrac {P(B \mid A) * P(A)} {P(B \mid A) * P(A) + P(B \mid \neg A) * P(\neg A)} \\ | ||
| \end{eqnarray} | \end{eqnarray} | ||
| + | </ | ||
| + | <WRAP clear /> | ||
| {{youtube> | {{youtube> | ||
bayes_theorem.1758440294.txt.gz · Last modified: by hkimscil
