Skip to content

Commit

Permalink
ci histograms
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderthclark committed Mar 23, 2024
1 parent f67572d commit f5932a0
Show file tree
Hide file tree
Showing 13 changed files with 5,765 additions and 5,915 deletions.
Binary file modified book/_build/.doctrees/confidenceintervals.doctree
Binary file not shown.
Binary file modified book/_build/.doctrees/environment.pickle
Binary file not shown.
802 changes: 401 additions & 401 deletions book/_build/html/_images/bernoulliCLT.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
802 changes: 401 additions & 401 deletions book/_build/html/_images/bernoulliCLT2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,002 changes: 501 additions & 501 deletions book/_build/html/_images/bernoulliCLT2wCI.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7,969 changes: 3,893 additions & 4,076 deletions book/_build/html/_images/bernoulliCLTwCI.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions book/_build/html/_sources/confidenceintervals.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If we repeatedly flip a coin *100* times, we can expect the sample proportion to

```{figure} images/bernoulliCLT.svg
---
width: 50%
width: 35%
name: bernoulliCLT
---
Each miniature histogram reflects $n=100$ coin flips where $p=0.2$. Miniature histograms are arranged into a larger histogram according to their sample average.
Expand All @@ -29,7 +29,7 @@ If we repeatedly flip a coin *400* times, we can expect the sample proportion to

```{figure} images/bernoulliCLT2.svg
---
width: 50%
width: 35%
name: bernoulliCLT2
---
Each miniature histogram reflects $n=400$ coin flips where $p=0.2$. Miniature histograms are arranged into a larger histogram according to their sample average.
Expand Down Expand Up @@ -66,15 +66,15 @@ Let's return to the simulated data with $p=0.2$, in {numref}`bernoulliCLT` and {

```{figure} images/bernoulliCLTwCI.svg
---
width: 50%
width: 33%
name: bernoulliCLTwCI
---
Each miniature histogram reflects $n=100$ coin flips where $p=0.2$. Orange bands reflect a 95% confidence interval. Grayed out histograms are those where the confidence interval misses the true parameter.
Each miniature histogram reflects $n=100$ coin flips where $p=0.2$. Grayed out histograms are those where the confidence interval misses the true parameter.
```

```{figure} images/bernoulliCLT2wCI.svg
---
width: 50%
width: 33%
name: bernoulliCLT2wCI
---
Each miniature histogram reflects $n=400$ coin flips where $p=0.2$. Grayed out histograms are those where the confidence interval misses the true parameter.
Expand Down
10 changes: 5 additions & 5 deletions book/_build/html/confidenceintervals.html
Original file line number Diff line number Diff line change
Expand Up @@ -456,14 +456,14 @@ <h2>The Accuracy of Percentages<a class="headerlink" href="#the-accuracy-of-perc
\[\text{SE for proportion of heads} = \sqrt{\frac{0.2\times 0.8}{n}}\]</div>
<p>If we repeatedly flip a coin <em>100</em> times, we can expect the sample proportion to be in the interval <span class="math notranslate nohighlight">\(0.2\pm 2\times 0.04\)</span> for 95% of the repetitions, where 0.04 is the SE for the proportion.</p>
<figure class="align-default" id="bernoulliclt">
<a class="reference internal image-reference" href="_images/bernoulliCLT.svg"><img alt="_images/bernoulliCLT.svg" src="_images/bernoulliCLT.svg" width="50%" /></a>
<a class="reference internal image-reference" href="_images/bernoulliCLT.svg"><img alt="_images/bernoulliCLT.svg" src="_images/bernoulliCLT.svg" width="35%" /></a>
<figcaption>
<p><span class="caption-number">Fig. 49 </span><span class="caption-text">Each miniature histogram reflects <span class="math notranslate nohighlight">\(n=100\)</span> coin flips where <span class="math notranslate nohighlight">\(p=0.2\)</span>. Miniature histograms are arranged into a larger histogram according to their sample average.</span><a class="headerlink" href="#bernoulliclt" title="Permalink to this image">#</a></p>
</figcaption>
</figure>
<p>If we repeatedly flip a coin <em>400</em> times, we can expect the sample proportion to be in the interval <span class="math notranslate nohighlight">\(0.2\pm 2\times 0.02\)</span> for 95% of the repetitions, where 0.02 is the SE for the proportion.</p>
<figure class="align-default" id="bernoulliclt2">
<a class="reference internal image-reference" href="_images/bernoulliCLT2.svg"><img alt="_images/bernoulliCLT2.svg" src="_images/bernoulliCLT2.svg" width="50%" /></a>
<a class="reference internal image-reference" href="_images/bernoulliCLT2.svg"><img alt="_images/bernoulliCLT2.svg" src="_images/bernoulliCLT2.svg" width="35%" /></a>
<figcaption>
<p><span class="caption-number">Fig. 50 </span><span class="caption-text">Each miniature histogram reflects <span class="math notranslate nohighlight">\(n=400\)</span> coin flips where <span class="math notranslate nohighlight">\(p=0.2\)</span>. Miniature histograms are arranged into a larger histogram according to their sample average.</span><a class="headerlink" href="#bernoulliclt2" title="Permalink to this image">#</a></p>
</figcaption>
Expand All @@ -488,13 +488,13 @@ <h4>Interpretation of a Confidence Interval<a class="headerlink" href="#interpre
<p>The correct interpretation of a confidence interval is often misunderstood. The interpretation is based on our frequency theory of chance. First, there is nothing random about the parameter <span class="math notranslate nohighlight">\(p\)</span>. Our sample is random and thus randomness is manifested in <span class="math notranslate nohighlight">\(\hat{p}\)</span> instead. With <span class="math notranslate nohighlight">\(p\)</span> nonrandom, we <em>can’t</em> make probabilistic statement like <span class="math notranslate nohighlight">\(p\)</span> is in a 95% confidence interval with 95% probability. Relying on probabilities being long-run frequencies instead, we say that if we were to construct many samples and thus many 95% confidence intervals, about 95% of the intervals would contain the true parameter.</p>
<p>Let’s return to the simulated data with <span class="math notranslate nohighlight">\(p=0.2\)</span>, in <a class="reference internal" href="#bernoulliclt"><span class="std std-numref">Fig. 49</span></a> and <a class="reference internal" href="#bernoulliclt2"><span class="std std-numref">Fig. 50</span></a>. Each miniature histogram is a sample and most of the sample means are not equal to 0.2. However, 95% confidence intervals can be found for each. Indeed, for 95 of 100 of the simulated samples, the confidence interval would cover the true parameter.</p>
<figure class="align-default" id="bernoullicltwci">
<a class="reference internal image-reference" href="_images/bernoulliCLTwCI.svg"><img alt="_images/bernoulliCLTwCI.svg" src="_images/bernoulliCLTwCI.svg" width="50%" /></a>
<a class="reference internal image-reference" href="_images/bernoulliCLTwCI.svg"><img alt="_images/bernoulliCLTwCI.svg" src="_images/bernoulliCLTwCI.svg" width="33%" /></a>
<figcaption>
<p><span class="caption-number">Fig. 51 </span><span class="caption-text">Each miniature histogram reflects <span class="math notranslate nohighlight">\(n=100\)</span> coin flips where <span class="math notranslate nohighlight">\(p=0.2\)</span>. Orange bands reflect a 95% confidence interval. Grayed out histograms are those where the confidence interval misses the true parameter.</span><a class="headerlink" href="#bernoullicltwci" title="Permalink to this image">#</a></p>
<p><span class="caption-number">Fig. 51 </span><span class="caption-text">Each miniature histogram reflects <span class="math notranslate nohighlight">\(n=100\)</span> coin flips where <span class="math notranslate nohighlight">\(p=0.2\)</span>. Grayed out histograms are those where the confidence interval misses the true parameter.</span><a class="headerlink" href="#bernoullicltwci" title="Permalink to this image">#</a></p>
</figcaption>
</figure>
<figure class="align-default" id="bernoulliclt2wci">
<a class="reference internal image-reference" href="_images/bernoulliCLT2wCI.svg"><img alt="_images/bernoulliCLT2wCI.svg" src="_images/bernoulliCLT2wCI.svg" width="50%" /></a>
<a class="reference internal image-reference" href="_images/bernoulliCLT2wCI.svg"><img alt="_images/bernoulliCLT2wCI.svg" src="_images/bernoulliCLT2wCI.svg" width="33%" /></a>
<figcaption>
<p><span class="caption-number">Fig. 52 </span><span class="caption-text">Each miniature histogram reflects <span class="math notranslate nohighlight">\(n=400\)</span> coin flips where <span class="math notranslate nohighlight">\(p=0.2\)</span>. Grayed out histograms are those where the confidence interval misses the true parameter.</span><a class="headerlink" href="#bernoulliclt2wci" title="Permalink to this image">#</a></p>
</figcaption>
Expand Down
Binary file modified book/_build/html/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion book/_build/html/searchindex.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions book/confidenceintervals.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If we repeatedly flip a coin *100* times, we can expect the sample proportion to

```{figure} images/bernoulliCLT.svg
---
width: 50%
width: 35%
name: bernoulliCLT
---
Each miniature histogram reflects $n=100$ coin flips where $p=0.2$. Miniature histograms are arranged into a larger histogram according to their sample average.
Expand All @@ -29,7 +29,7 @@ If we repeatedly flip a coin *400* times, we can expect the sample proportion to

```{figure} images/bernoulliCLT2.svg
---
width: 50%
width: 35%
name: bernoulliCLT2
---
Each miniature histogram reflects $n=400$ coin flips where $p=0.2$. Miniature histograms are arranged into a larger histogram according to their sample average.
Expand Down Expand Up @@ -66,15 +66,15 @@ Let's return to the simulated data with $p=0.2$, in {numref}`bernoulliCLT` and {

```{figure} images/bernoulliCLTwCI.svg
---
width: 50%
width: 33%
name: bernoulliCLTwCI
---
Each miniature histogram reflects $n=100$ coin flips where $p=0.2$. Grayed out histograms are those where the confidence interval misses the true parameter.
```

```{figure} images/bernoulliCLT2wCI.svg
---
width: 50%
width: 33%
name: bernoulliCLT2wCI
---
Each miniature histogram reflects $n=400$ coin flips where $p=0.2$. Grayed out histograms are those where the confidence interval misses the true parameter.
Expand Down
Loading

0 comments on commit f5932a0

Please sign in to comment.