Skip to content

Commit

Permalink
deploy: 81162d6
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderthclark committed Mar 9, 2024
1 parent 8d423dc commit c59ee2c
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 21 deletions.
3 changes: 2 additions & 1 deletion _sources/bayes.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,12 @@ A box contains two tickets, labeled $H$ or $T$. There is a 25% chance the box co

3. Suppose you draw an $H$. What is the chance that the box contained two $H$s?

4. After replacing the $H$, what is the chance of selecting another $H$?
4. You draw and replace an $H$, what is the chance of selecting another $H$?

```{exercise-end}
```


```{exercise-start}
:label: bayesraredisease
```
Expand Down
12 changes: 12 additions & 0 deletions _sources/solutions.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,18 @@ Let A have an average of 1000 with an SD of 1. Let school B have an average of 1

## [Correlation](correlation)

```{solution-start} corrPairing
:class: dropdown
```
The correlation coefficient is $r=0.5$ for the first two tables. The correlation increases to $r=0.866$ for the last table.

This is a question about the structure of data. There is an ordered pair $(x,y)$ for each day of the week where $x$ first represents Matt Damon and $y$ represents Wahlberg. In the second table, all $x$ and $y$ values are swapped. In a scatter plot, this would be like changing the $x$ and $y$ axis labels, so the correlation does not change.

In the third table, there is a more substantive change. The list of values for our $x$ and $y$ variables beyond just relabeling. $(x,y)$ points are ordered pairs and the Wednesday pair is reordered without reordering the Monday and Tuesday points. This creates a visible change in the scatter plot and in the correlation coefficient.

```{solution-end}
```

```{solution-start} corrMental
:class: dropdown
```
Expand Down
2 changes: 1 addition & 1 deletion bayes.html
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ <h2>Exercises<a class="headerlink" href="#exercises" title="Permalink to this he
<li><p>What is the chance of drawing an <span class="math notranslate nohighlight">\(H\)</span>?</p></li>
<li><p>Suppose you draw an <span class="math notranslate nohighlight">\(H\)</span>. What is the chance that the box contained two <span class="math notranslate nohighlight">\(T\)</span>s?</p></li>
<li><p>Suppose you draw an <span class="math notranslate nohighlight">\(H\)</span>. What is the chance that the box contained two <span class="math notranslate nohighlight">\(H\)</span>s?</p></li>
<li><p>After replacing the <span class="math notranslate nohighlight">\(H\)</span>, what is the chance of selecting another <span class="math notranslate nohighlight">\(H\)</span>?</p></li>
<li><p>You draw and replace an <span class="math notranslate nohighlight">\(H\)</span>, what is the chance of selecting another <span class="math notranslate nohighlight">\(H\)</span>?</p></li>
</ol>
</section>
</div>
Expand Down
12 changes: 6 additions & 6 deletions correlation.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions normal.html

Large diffs are not rendered by default.

Binary file modified objects.inv
Binary file not shown.
12 changes: 6 additions & 6 deletions regression.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions solutions.html
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,15 @@ <h2><a class="reference internal" href="normal0.html#normal"><span class="std st
<h2><a class="reference internal" href="regression.html#correlation"><span class="std std-ref">Correlation</span></a><a class="headerlink" href="#correlation" title="Permalink to this heading">#</a></h2>
<div class="solution dropdown admonition" id="solutions-solution-8">

<p class="admonition-title">Solution to<a class="reference internal" href="correlation.html#corrPairing"> Exercise 21</a></p>
<section id="solution-content">
<p>The correlation coefficient is <span class="math notranslate nohighlight">\(r=0.5\)</span> for the first two tables. The correlation increases to <span class="math notranslate nohighlight">\(r=0.866\)</span> for the last table.</p>
<p>This is a question about the structure of data. There is an ordered pair <span class="math notranslate nohighlight">\((x,y)\)</span> for each day of the week where <span class="math notranslate nohighlight">\(x\)</span> first represents Matt Damon and <span class="math notranslate nohighlight">\(y\)</span> represents Wahlberg. In the second table, all <span class="math notranslate nohighlight">\(x\)</span> and <span class="math notranslate nohighlight">\(y\)</span> values are swapped. In a scatter plot, this would be like changing the <span class="math notranslate nohighlight">\(x\)</span> and <span class="math notranslate nohighlight">\(y\)</span> axis labels, so the correlation does not change.</p>
<p>In the third table, there is a more substantive change. The list of values for our <span class="math notranslate nohighlight">\(x\)</span> and <span class="math notranslate nohighlight">\(y\)</span> variables beyond just relabeling. <span class="math notranslate nohighlight">\((x,y)\)</span> points are ordered pairs and the Wednesday pair is reordered without reordering the Monday and Tuesday points. This creates a visible change in the scatter plot and in the correlation coefficient.</p>
</section>
</div>
<div class="solution dropdown admonition" id="solutions-solution-9">

<p class="admonition-title">Solution to<a class="reference internal" href="correlation.html#corrMental"> Exercise 22</a></p>
<section id="solution-content">
<p>No, the award is not merited because the lack of correlation does not demonstrate that there can be no causal effect. This is a chicken and egg problem like in the case of police funding and crime.</p>
Expand All @@ -566,7 +575,7 @@ <h2><a class="reference internal" href="regression.html#correlation"><span class
</section>
<section id="regression">
<h2><a class="reference internal" href="regression.html"><span class="doc std std-doc">Regression</span></a><a class="headerlink" href="#regression" title="Permalink to this heading">#</a></h2>
<div class="solution dropdown admonition" id="solutions-solution-9">
<div class="solution dropdown admonition" id="solutions-solution-10">

<p class="admonition-title">Solution to<a class="reference internal" href="regression.html#assortMating"> Exercise 23</a></p>
<section id="solution-content">
Expand All @@ -577,14 +586,14 @@ <h2><a class="reference internal" href="regression.html"><span class="doc std st
</section>
<section id="probability">
<h2><a class="reference internal" href="probability.html#probability"><span class="std std-ref">Probability</span></a><a class="headerlink" href="#probability" title="Permalink to this heading">#</a></h2>
<div class="solution dropdown admonition" id="solutions-solution-10">
<div class="solution dropdown admonition" id="solutions-solution-11">

<p class="admonition-title">Solution to<a class="reference internal" href="probability.html#conditional"> Exercise 28</a></p>
<section id="solution-content">
<p><span class="math notranslate nohighlight">\(\mathbb{P}(A \mid B) + \mathbb{P}(\text{not }A \mid B)=1\)</span> for any <span class="math notranslate nohighlight">\(A,B\)</span>.</p>
</section>
</div>
<div class="solution dropdown admonition" id="solutions-solution-11">
<div class="solution dropdown admonition" id="solutions-solution-12">

<p class="admonition-title">Solution to<a class="reference internal" href="probability.html#glee"> Exercise 31</a></p>
<section id="solution-content">
Expand Down

0 comments on commit c59ee2c

Please sign in to comment.