Website/src/teaching/cse-562/2019sp/slide/2019-05-06-ProbDBs.erb

63 lines
2.0 KiB
Plaintext

---
template: templates/cse4562_2019_slides.erb
title: Incomplete and Probabilistic Databases
date: May 6, 2019
textbook: "<a href='https://github.com/UBOdin/mimir/wiki/Concepts-CTables'>PDB Concepts and C-Tables</a>"
dependencies:
- lib/slide_utils.rb
---
<%
require "slide_utils.rb"
%>
<section>
<section>
<p><b>Idea: </b> Make $\texttt{bob}$ and $\texttt{carol}$ random variables.</p>
</section>
<section>
<p>$$\texttt{bob} = \begin{cases} 4 & p = 0.8 \\ 9 & p = 0.2\end{cases}$$</p>
<p>$$\texttt{carol} = \begin{cases} 3 & p = 0.4 \\ 8 & p = 0.6\end{cases}$$</p>
</section>
<section>
<p style="font-size: 70%">
$$Q(\mathcal D) = \begin{cases}
1 & \textbf{if } \texttt{bob} = 9 \wedge \texttt{carol} = 8\\
2 & \textbf{if } \texttt{bob} = 4 \wedge \texttt{carol} = 8 \\&\; \vee\; \texttt{bob} = 9 \wedge \texttt{carol} = 3\\
3 & \textbf{if } \texttt{bob} = 4 \wedge \texttt{carol} = 3
\end{cases}$$</p>
<p style="font-size: 90%" class="fragment">
$$ = \begin{cases}
1 & p = 0.2 \times 0.6\\
2 & p = 0.8 \times 0.6 + 0.2 \times 0.4\\
3 & p = 0.8 \times 0.4 \end{cases}$$
</p>
<p class="fragment">
$$ = \begin{cases}
1 & p = 0.12\\
2 & p = 0.56\\
3 & p = 0.32\end{cases}$$
</p>
</section>
<section>
<p>
$$Q(\mathcal D) = \begin{cases}
1 & p = 0.12\\
2 & p = 0.56\\
3 & p = 0.32\end{cases}$$
</p>
<p class="fragment" style="margin-top: 50px;">$E\left[Q(\mathcal D)\right] = 0.12+1.12+0.96 = 2.20$</p>
<p class="fragment" style="margin-top: 50px;">$P\left[Q(\mathcal D) \geq 2\right] = 0.56+0.32 = 0.88$</p>
</section>
<section>
<p>In general, computing probabilities exactly is <code>#P</code></p>
<p style="margin-top: 50px;" class="fragment">... so we approximate</p>
</section>
<section>
<p><b>Idea 1</b>: Sample. Pick 10 random possible worlds and compute results for each.</p>
</section>
</section>