Skip to content

Commit

Permalink
auto commit
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispiech committed Nov 18, 2023
1 parent 507af18 commit d1332bb
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 8 deletions.
12 changes: 9 additions & 3 deletions chapters/part3/marginalization/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

<h3>Marginalization From Two Random Variables</h3>

<p>To start, consider two random variables $X$ and $Y$. If you are given the joint how can you compute $\p(X=x)$? Recall that if you have the joint you have a way to know the probability $\p(X=x,Y=y)$ for any value $x$ and $y$ . We already have a technique for computing $\p(X=x)$ from the joint. We can use the <a href="{{pathToLang}}part1/law_total">Law of Total Probability</a> (LOTP)! In this case $Y$ taking on each of its possible values make up the "background events". Since $Y$ must take on some value:
<p>To start, consider two random variables $X$ and $Y$. If you are given the joint how can you compute $\p(X=x)$? Recall that if you have the joint you have a way to know the probability $\p(X=x,Y=y)$ for any value $x$ and $y$ . We already have a technique for computing $\p(X=x)$ from the joint. We can use the <a href="{{pathToLang}}part1/law_total">Law of Total Probability</a> (LOTP)! In this case the events $Y = y$ make up the "background events":

\begin{align*}
P(X=x) &= \sum_y \p(X=x, Y=y) \\
\end{align*}

Note that to apply the LOTP it must be the case that the events $Y=i$ and $Y=j$ (where $i\neq j$) must be mutually exclusvie and it must be the case that $\sum_y \p(Y=y) = 1$. Both are true.</p>
Note that to apply the LOTP it must be the case that the different events $Y=i$ must be mutually exclusvie and it must be the case that $\sum_y \p(Y=y) = 1$. Both are true.</p>

<p>If we wanted $\p(Y=y)$ we could again use the Law of Total Probability, this time with $X$ taking on each of its possible values as the background events:

Expand Down Expand Up @@ -85,5 +85,11 @@ <h3>Example: Favorite Number</h3>

<h3>Marginalization with More Variables</h3>

<p>Stub: Section coming soon!</p>
<p>The idea of marginalization can be extended to joint distributions with more than two random variables. Consider having three random variables $X$, $Y$, and $Z$, we could marginalize out any of the variables:

\begin{align*}
P(X=x) &= \sum_{y,z} \p(X=x, Y=y, Z=z) \\
P(Y=y) &= \sum_{x,z} \p(X=x, Y=y, Z=z) \\
P(Z=z) &= \sum_{x,y} \p(X=x, Y=y, Z=z) \\
</p>

Binary file modified en/ProbabilityForComputerScientists.pdf
Binary file not shown.
12 changes: 9 additions & 3 deletions en/part3/marginalization/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,13 @@

<h3>Marginalization From Two Random Variables</h3>

<p>To start, consider two random variables $X$ and $Y$. If you are given the joint how can you compute $\p(X=x)$? Recall that if you have the joint you have a way to know the probability $\p(X=x,Y=y)$ for any value $x$ and $y$ . We already have a technique for computing $\p(X=x)$ from the joint. We can use the <a href="../../part1/law_total">Law of Total Probability</a> (LOTP)! In this case $Y$ taking on each of its possible values make up the "background events". Since $Y$ must take on some value:
<p>To start, consider two random variables $X$ and $Y$. If you are given the joint how can you compute $\p(X=x)$? Recall that if you have the joint you have a way to know the probability $\p(X=x,Y=y)$ for any value $x$ and $y$ . We already have a technique for computing $\p(X=x)$ from the joint. We can use the <a href="../../part1/law_total">Law of Total Probability</a> (LOTP)! In this case the events $Y = y$ make up the "background events":

\begin{align*}
P(X=x) &= \sum_y \p(X=x, Y=y) \\
\end{align*}

Note that to apply the LOTP it must be the case that the events $Y=i$ and $Y=j$ (where $i\neq j$) must be mutually exclusvie and it must be the case that $\sum_y \p(Y=y) = 1$. Both are true.</p>
Note that to apply the LOTP it must be the case that the different events $Y=i$ must be mutually exclusvie and it must be the case that $\sum_y \p(Y=y) = 1$. Both are true.</p>

<p>If we wanted $\p(Y=y)$ we could again use the Law of Total Probability, this time with $X$ taking on each of its possible values as the background events:

Expand Down Expand Up @@ -457,7 +457,13 @@ <h3>Example: Favorite Number</h3>

<h3>Marginalization with More Variables</h3>

<p>Stub: Section coming soon!</p>
<p>The idea of marginalization can be extended to joint distributions with more than two random variables. Consider having three random variables $X$, $Y$, and $Z$, we could marginalize out any of the variables:

\begin{align*}
P(X=x) &= \sum_{y,z} \p(X=x, Y=y, Z=z) \\
P(Y=y) &= \sum_{x,z} \p(X=x, Y=y, Z=z) \\
P(Z=z) &= \sum_{x,y} \p(X=x, Y=y, Z=z) \\
</p>



Expand Down
2 changes: 1 addition & 1 deletion print/hash_values.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"../en/examples/mle_pareto/index.html": "1456ee37e433b2996496a0370c7f9380",
"../en/examples/mixture_models/index.html": "dee0c5dfca1250ce1820aea33b02397e",
"../en/part2/geometric/index.html": "c0fba1c8af6bfea7717ffecd3428a3f4",
"../en/part3/marginalization/index.html": "2c30e95538f2b7fe217c3d0991e392b5",
"../en/part3/marginalization/index.html": "3a196f57d0a5e6e93eb9449696187d05",
"../en/part2/more_discrete/index.html": "bca8c30051815138af7aaa63327a9507",
"../en/part2/categorical/index.html": "1a1ccbcbbef54d12377ff1e789a4268f"
}
Binary file modified print/pdfs/marginalization.pdf
Binary file not shown.
Binary file modified print/pdfs/separator_intro.pdf
Binary file not shown.
Binary file modified print/pdfs/separator_part1.pdf
Binary file not shown.
Binary file modified print/pdfs/separator_part2.pdf
Binary file not shown.
Binary file modified print/pdfs/separator_part3.pdf
Binary file not shown.
Binary file modified print/pdfs/separator_part4.pdf
Binary file not shown.
Binary file modified print/pdfs/separator_part5.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion searchIndex.json

Large diffs are not rendered by default.

0 comments on commit d1332bb

Please sign in to comment.