more notes

This commit is contained in:
2022-09-05 01:29:44 -07:00
parent cac5ac9243
commit 721d1d83d0
3 changed files with 524 additions and 47 deletions

View File

@@ -243,12 +243,12 @@ Probability and Likelihood
<span id="cb7-9"><a href="#cb7-9" aria-hidden="true" tabindex="-1"></a> gt<span class="sc">::</span><span class="fu">cols_width</span>(<span class="fu">everything</span>() <span class="sc">~</span> <span class="fu">px</span>(<span class="dv">100</span>))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output-display">
<div id="bwyculjrlm" style="overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
<div id="veslrdaavz" style="overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
<style>html {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;
}
#bwyculjrlm .gt_table {
#veslrdaavz .gt_table {
display: table;
border-collapse: collapse;
margin-left: auto;
@@ -273,7 +273,7 @@ Probability and Likelihood
border-left-color: #D3D3D3;
}
#bwyculjrlm .gt_heading {
#veslrdaavz .gt_heading {
background-color: #FFFFFF;
text-align: center;
border-bottom-color: #FFFFFF;
@@ -285,7 +285,7 @@ Probability and Likelihood
border-right-color: #D3D3D3;
}
#bwyculjrlm .gt_title {
#veslrdaavz .gt_title {
color: #333333;
font-size: 125%;
font-weight: initial;
@@ -297,7 +297,7 @@ Probability and Likelihood
border-bottom-width: 0;
}
#bwyculjrlm .gt_subtitle {
#veslrdaavz .gt_subtitle {
color: #333333;
font-size: 85%;
font-weight: initial;
@@ -309,13 +309,13 @@ Probability and Likelihood
border-top-width: 0;
}
#bwyculjrlm .gt_bottom_border {
#veslrdaavz .gt_bottom_border {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#bwyculjrlm .gt_col_headings {
#veslrdaavz .gt_col_headings {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
@@ -330,7 +330,7 @@ Probability and Likelihood
border-right-color: #D3D3D3;
}
#bwyculjrlm .gt_col_heading {
#veslrdaavz .gt_col_heading {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
@@ -350,7 +350,7 @@ Probability and Likelihood
overflow-x: hidden;
}
#bwyculjrlm .gt_column_spanner_outer {
#veslrdaavz .gt_column_spanner_outer {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
@@ -362,15 +362,15 @@ Probability and Likelihood
padding-right: 4px;
}
#bwyculjrlm .gt_column_spanner_outer:first-child {
#veslrdaavz .gt_column_spanner_outer:first-child {
padding-left: 0;
}
#bwyculjrlm .gt_column_spanner_outer:last-child {
#veslrdaavz .gt_column_spanner_outer:last-child {
padding-right: 0;
}
#bwyculjrlm .gt_column_spanner {
#veslrdaavz .gt_column_spanner {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
@@ -382,7 +382,7 @@ Probability and Likelihood
width: 100%;
}
#bwyculjrlm .gt_group_heading {
#veslrdaavz .gt_group_heading {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
@@ -407,7 +407,7 @@ Probability and Likelihood
vertical-align: middle;
}
#bwyculjrlm .gt_empty_group_heading {
#veslrdaavz .gt_empty_group_heading {
padding: 0.5px;
color: #333333;
background-color: #FFFFFF;
@@ -422,15 +422,15 @@ Probability and Likelihood
vertical-align: middle;
}
#bwyculjrlm .gt_from_md > :first-child {
#veslrdaavz .gt_from_md > :first-child {
margin-top: 0;
}
#bwyculjrlm .gt_from_md > :last-child {
#veslrdaavz .gt_from_md > :last-child {
margin-bottom: 0;
}
#bwyculjrlm .gt_row {
#veslrdaavz .gt_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
@@ -449,7 +449,7 @@ Probability and Likelihood
overflow-x: hidden;
}
#bwyculjrlm .gt_stub {
#veslrdaavz .gt_stub {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
@@ -462,7 +462,7 @@ Probability and Likelihood
padding-right: 5px;
}
#bwyculjrlm .gt_stub_row_group {
#veslrdaavz .gt_stub_row_group {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
@@ -476,11 +476,11 @@ Probability and Likelihood
vertical-align: top;
}
#bwyculjrlm .gt_row_group_first td {
#veslrdaavz .gt_row_group_first td {
border-top-width: 2px;
}
#bwyculjrlm .gt_summary_row {
#veslrdaavz .gt_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
@@ -490,16 +490,16 @@ Probability and Likelihood
padding-right: 5px;
}
#bwyculjrlm .gt_first_summary_row {
#veslrdaavz .gt_first_summary_row {
border-top-style: solid;
border-top-color: #D3D3D3;
}
#bwyculjrlm .gt_first_summary_row.thick {
#veslrdaavz .gt_first_summary_row.thick {
border-top-width: 2px;
}
#bwyculjrlm .gt_last_summary_row {
#veslrdaavz .gt_last_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
@@ -509,7 +509,7 @@ Probability and Likelihood
border-bottom-color: #D3D3D3;
}
#bwyculjrlm .gt_grand_summary_row {
#veslrdaavz .gt_grand_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
@@ -519,7 +519,7 @@ Probability and Likelihood
padding-right: 5px;
}
#bwyculjrlm .gt_first_grand_summary_row {
#veslrdaavz .gt_first_grand_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
@@ -529,11 +529,11 @@ Probability and Likelihood
border-top-color: #D3D3D3;
}
#bwyculjrlm .gt_striped {
#veslrdaavz .gt_striped {
background-color: rgba(128, 128, 128, 0.05);
}
#bwyculjrlm .gt_table_body {
#veslrdaavz .gt_table_body {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
@@ -542,7 +542,7 @@ Probability and Likelihood
border-bottom-color: #D3D3D3;
}
#bwyculjrlm .gt_footnotes {
#veslrdaavz .gt_footnotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
@@ -556,7 +556,7 @@ Probability and Likelihood
border-right-color: #D3D3D3;
}
#bwyculjrlm .gt_footnote {
#veslrdaavz .gt_footnote {
margin: 0px;
font-size: 90%;
padding-left: 4px;
@@ -565,7 +565,7 @@ Probability and Likelihood
padding-right: 5px;
}
#bwyculjrlm .gt_sourcenotes {
#veslrdaavz .gt_sourcenotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
@@ -579,7 +579,7 @@ Probability and Likelihood
border-right-color: #D3D3D3;
}
#bwyculjrlm .gt_sourcenote {
#veslrdaavz .gt_sourcenote {
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
@@ -587,64 +587,64 @@ Probability and Likelihood
padding-right: 5px;
}
#bwyculjrlm .gt_left {
#veslrdaavz .gt_left {
text-align: left;
}
#bwyculjrlm .gt_center {
#veslrdaavz .gt_center {
text-align: center;
}
#bwyculjrlm .gt_right {
#veslrdaavz .gt_right {
text-align: right;
font-variant-numeric: tabular-nums;
}
#bwyculjrlm .gt_font_normal {
#veslrdaavz .gt_font_normal {
font-weight: normal;
}
#bwyculjrlm .gt_font_bold {
#veslrdaavz .gt_font_bold {
font-weight: bold;
}
#bwyculjrlm .gt_font_italic {
#veslrdaavz .gt_font_italic {
font-style: italic;
}
#bwyculjrlm .gt_super {
#veslrdaavz .gt_super {
font-size: 65%;
}
#bwyculjrlm .gt_footnote_marks {
#veslrdaavz .gt_footnote_marks {
font-style: italic;
font-weight: normal;
font-size: 75%;
vertical-align: 0.4em;
}
#bwyculjrlm .gt_asterisk {
#veslrdaavz .gt_asterisk {
font-size: 100%;
vertical-align: 0;
}
#bwyculjrlm .gt_indent_1 {
#veslrdaavz .gt_indent_1 {
text-indent: 5px;
}
#bwyculjrlm .gt_indent_2 {
#veslrdaavz .gt_indent_2 {
text-indent: 10px;
}
#bwyculjrlm .gt_indent_3 {
#veslrdaavz .gt_indent_3 {
text-indent: 15px;
}
#bwyculjrlm .gt_indent_4 {
#veslrdaavz .gt_indent_4 {
text-indent: 20px;
}
#bwyculjrlm .gt_indent_5 {
#veslrdaavz .gt_indent_5 {
text-indent: 25px;
}
</style>
@@ -676,6 +676,68 @@ Probability and Likelihood
</div>
</div>
</div>
<p>The table above also shows the likelihoods for the case when an article does not contain exclamation point in the title as well. Its really important to note that these are likelihoods, and its not the case that <span class="math inline">\(L(B|A) + L(B^c|A) = 1\)</span> as a matter of fact this value evaluates to a number less than one. However, since we have that <span class="math inline">\(L(B|A) = .267\)</span> and <span class="math inline">\(L(B^c|A) = .022\)</span> then we have gained additional knowledge in knowing the use of “!” in a title is more compatible with a fake news article than a real one.</p>
<p>Up to this point we can summarize our framework as follows</p>
<table class="table">
<thead>
<tr class="header">
<th>event</th>
<th><span class="math inline">\(B\)</span></th>
<th><span class="math inline">\(B^c\)</span></th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>prior</td>
<td>.4</td>
<td>.6</td>
<td>1</td>
</tr>
<tr class="even">
<td>likelihood</td>
<td>.267</td>
<td>.022</td>
<td>.289</td>
</tr>
</tbody>
</table>
<p>Our next goal is come up with normalizing factors in order to build our probability table:</p>
<table class="table">
<thead>
<tr class="header">
<th></th>
<th><span class="math inline">\(B\)</span></th>
<th><span class="math inline">\(B^c\)</span></th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><span class="math inline">\(A\)</span></td>
<td>(1)</td>
<td>(2)</td>
<td></td>
</tr>
<tr class="even">
<td><span class="math inline">\(A^c\)</span></td>
<td>(3)</td>
<td>(4)</td>
<td></td>
</tr>
<tr class="odd">
<td>Total</td>
<td>.4</td>
<td>.6</td>
<td>1</td>
</tr>
</tbody>
</table>
<p>A couple things to note about our table (1) + (2) = .4 and (2) + (4) = .6. (1) + (2) + (3) + (4) = 1.</p>
<ol type="1">
<li><p><span class="math inline">\(P(A \cap B) = P(A|B)P(B)\)</span> we know the likelihood of <span class="math inline">\(L(B|A) = P(A|B)\)</span> and we also know the prior so we insert these to get <span class="math display">\[ P(A \cap B) = P(A|B)P(B) = .267 \times .4 = .1068\]</span></p></li>
<li><p><span class="math inline">\(P(A^c \cap B) = P(A^c|B)P(B)\)</span> in this case we do know the prior <span class="math inline">\(P(B) = .4\)</span>, but we dont directly know the value of <span class="math inline">\(P(A^c|B)\)</span>, however, we note that <span class="math inline">\(P(A|B) + P(A^c|B) = 1\)</span>, therefore we compute <span class="math inline">\(P(A^c|B) = 1 - P(A|B) = 1 - .267 = .733\)</span> <span class="math display">\[ P(A^c \cap B) = P(A^c|B)P(B) = .733 \times .4 = .2932\]</span></p></li>
</ol>
</section>
</main>