Skip to content

Commit

Permalink
trees
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderthclark committed Feb 28, 2024
1 parent a6eb9a0 commit d1b5f39
Show file tree
Hide file tree
Showing 66 changed files with 2,332 additions and 497 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified book/.DS_Store
Binary file not shown.
Binary file modified book/_build/.doctrees/StatwrapRegression.doctree
Binary file not shown.
Binary file added book/_build/.doctrees/bayes.doctree
Binary file not shown.
Binary file modified book/_build/.doctrees/correlation.doctree
Binary file not shown.
Binary file modified book/_build/.doctrees/environment.pickle
Binary file not shown.
Binary file modified book/_build/.doctrees/intro.doctree
Binary file not shown.
Binary file modified book/_build/.doctrees/normal.doctree
Binary file not shown.
Binary file modified book/_build/.doctrees/probability.doctree
Binary file not shown.
Binary file modified book/_build/.doctrees/regression.doctree
Binary file not shown.
Binary file removed book/_build/html/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions book/_build/html/Homework05lab.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
<li class="toctree-l1"><a class="reference internal" href="correlation.html">Correlation</a></li>
<li class="toctree-l1"><a class="reference internal" href="regression.html">Regression</a></li>
<li class="toctree-l1"><a class="reference internal" href="probability.html">Probability</a></li>
<li class="toctree-l1"><a class="reference internal" href="bayes.html">Probability II</a></li>
<li class="toctree-l1"><a class="reference internal" href="bibliography.html">Bibliography</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Google Sheets (optional)</span></p>
Expand Down
18 changes: 10 additions & 8 deletions book/_build/html/Rbasics.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Selected Solutions" href="solutions.html" />
<link rel="prev" title="Regression" href="gregression.html" />
<link rel="prev" title="Regression" href="statwrapregression.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
</head>
Expand Down Expand Up @@ -191,8 +191,16 @@
<li class="toctree-l1"><a class="reference internal" href="normal.html">Normal Distribution</a></li>
<li class="toctree-l1"><a class="reference internal" href="correlation.html">Correlation</a></li>
<li class="toctree-l1"><a class="reference internal" href="regression.html">Regression</a></li>
<li class="toctree-l1"><a class="reference internal" href="probability.html">Probability</a></li>
<li class="toctree-l1"><a class="reference internal" href="bayes.html">Probability II</a></li>
<li class="toctree-l1"><a class="reference internal" href="bibliography.html">Bibliography</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Google Sheets (optional)</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="gsheets.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="ghistogram.html">Histograms</a></li>
<li class="toctree-l1"><a class="reference internal" href="gregression.html">Regression</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Python (optional)</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="python.html">Overview</a></li>
Expand All @@ -202,12 +210,6 @@

<li class="toctree-l1"><a class="reference internal" href="statwrapregression.html">Regression</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Google Sheets (optional)</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="gsheets.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="ghistogram.html">Histograms</a></li>
<li class="toctree-l1"><a class="reference internal" href="gregression.html">Regression</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">R (optional)</span></p>
<ul class="current nav bd-sidenav">
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Overview</a></li>
Expand Down Expand Up @@ -674,7 +676,7 @@ <h1>Comments<a class="headerlink" href="#comments" title="Permalink to this head

<div class="prev-next-area">
<a class="left-prev"
href="gregression.html"
href="statwrapregression.html"
title="previous page">
<i class="fa-solid fa-angle-left"></i>
<div class="prev-next-info">
Expand Down
1 change: 1 addition & 0 deletions book/_build/html/StatwrapRegression.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="correlation.html">Correlation</a></li>
<li class="toctree-l1"><a class="reference internal" href="regression.html">Regression</a></li>
<li class="toctree-l1"><a class="reference internal" href="probability.html">Probability</a></li>
<li class="toctree-l1"><a class="reference internal" href="bayes.html">Probability II</a></li>
<li class="toctree-l1"><a class="reference internal" href="bibliography.html">Bibliography</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Google Sheets (optional)</span></p>
Expand Down
515 changes: 515 additions & 0 deletions book/_build/html/_images/Qwordtree.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
286 changes: 164 additions & 122 deletions book/_build/html/_images/generaltree.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 0 additions & 39 deletions book/_build/html/_images/islandTreasure.svg

This file was deleted.

37 changes: 37 additions & 0 deletions book/_build/html/_sources/bayes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
(bayes)=
# Probability II

```{admonition} Important Readings
:class: seealso
- {cite}`tijms2012understanding`, Chapter 6
- {cite}`strogatz2010chances`
```

In this section, we leave the main textbook to learn Bayes' Theorem. This helps provide a foundation for further coursework in Bayesian statistics or just help you interact with nerdy people who talk about "Bayesian updating" in response to new information. Bayes' Theorem helps solve for a conditional probability $\mathbb{P}(A \mid B)$ given some other information. This involves "updating" because after observing $B$, the probability of $A$ changes from $\mathbb{P}(A)$ to $\mathbb{P}(A \mid B)$. The unconditional is a prior belief and the conditional probability is a posterior belief. Bayesian probabilities and statistics are important in any kind of environment where information is gathered. For example, medical doctors use Bayes' Theorem to assess the chance of a disease ($A$) given a particular test result ($B$).

Nothing in this section will require events to be independent.


## Chance Trees

A probability tree helps organize information regarding conditional probabilities or almost anything that involves the general multiplication rule.


```{figure} images/tikz/generaltree.svg
---
width: 80%
name: generaltree
---
A generic chance tree.
```

And here is something more concrete. For English words of Latin or French origin, the letter Q is always followed by a U. This means if we know that such a word starts with Q, the conditional probability of the second letter being U is <span style="color: #006400;">1</span> (100%). However, if the first letter is not Q, a U isn't very likely. If second letters are drawn randomly for non-Q words, this probability would be <span style="color: #0000CD;">1/26</span>. We'll also assume, for simplicity, that there is a <span style="color: #FFA500;">1/26</span> probability that a word starts with Q.


```{figure} images/tikz/Qwordtree.svg
---
width: 80%
name: Qwordtree
---
Trees are especially helpful when the probability of a second event (like the letter U) depends on the first event (the previous letter being Q or not Q).
```
2 changes: 1 addition & 1 deletion book/_build/html/_sources/probability.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

```{admonition} Important Readings
:class: seealso
- {cite}`freedman2007statistics`, Chapter 13, 14
- {cite}`freedman2007statistics`, Chapters 13, 14, 15
```

## Probabilities
Expand Down
Loading

0 comments on commit d1b5f39

Please sign in to comment.