adding bayes
This commit is contained in:
@@ -883,15 +883,61 @@ p(X \cup Y)= p(X)+p(Y)-p(X \cap Y).
|
||||
!eblock
|
||||
|
||||
|
||||
!bblock The product rule is given by
|
||||
!bblock The product rule (aka joint probability) is given by
|
||||
!bt
|
||||
\[
|
||||
p(X \cup Y)= p(X,y)= p(X\vert Y)p(Y)=p(Y\vert X)p(x),
|
||||
p(X \cup Y)= p(X,Y)= p(X\vert Y)p(Y)=p(Y\vert X)p(x),
|
||||
\]
|
||||
!et
|
||||
where we read $p(X\vert Y)$ as the likelihood of obtaining $X$ given $Y$.
|
||||
!eblock
|
||||
|
||||
If we have independent events then $p(X,Y)=p(X)p(Y)$.
|
||||
|
||||
|
||||
!split
|
||||
===== Marginal Probability =====
|
||||
|
||||
The marginal probability is defined in terms of only of the set of variables $X,Y$. For a discrete probability we have
|
||||
!bblock Discrete Probability
|
||||
!bt
|
||||
\[
|
||||
p(X)=\sum_{i=0}^{n-1}p(X,Y=y_i)=\sum_{i=0}^{n-1}p(X\vert Y=y_i)p(Y=y_i)=\sum_{i=0}^{n-1}p(X\vert y_i)p(y_i).
|
||||
\]
|
||||
!et
|
||||
!eblock
|
||||
|
||||
|
||||
!split
|
||||
===== Conditional Probability =====
|
||||
|
||||
The conditional probability, if $p(Y) > 0$, is
|
||||
!bblock
|
||||
!bt
|
||||
\[
|
||||
p(X\vert Y)= \frac{p(X,Y)}{p(Y)}=\frac{p(X,Y)}{\sum_{i=0}^{n-1}p(Y\vert X=x_i)p(x_i)}.
|
||||
\]
|
||||
!et
|
||||
!eblock
|
||||
|
||||
|
||||
!split
|
||||
===== Bayes' Theorem =====
|
||||
|
||||
If we combine the conditional probability with the marginal probability and the standard product rule, we have
|
||||
!bt
|
||||
\[
|
||||
p(X\vert Y)= \frac{p(X,Y)}{p(Y)},
|
||||
\]
|
||||
!et
|
||||
we can rewrite this as
|
||||
|
||||
!bt
|
||||
\[
|
||||
p(X\vert Y)= \frac{p(X,Y)}{\sum_{i=0}^{n-1}p(Y\vert X=x_i)p(x_i)}=\frac{p(Y\vert X)p(X)}{\sum_{i=0}^{n-1}p(Y\vert X=x_i)p(x_i)},
|
||||
\]
|
||||
!et
|
||||
Which is Bayes' theorem. More text to be added here by Friday September 10.
|
||||
|
||||
|
||||
!split
|
||||
|
||||
Reference in New Issue
Block a user