Skip to content

Commit

Permalink
ci exercises
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderthclark committed Mar 24, 2024
1 parent 9bd5027 commit 49619f3
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 2 deletions.
Binary file modified book/.DS_Store
Binary file not shown.
Binary file modified book/_build/.doctrees/confidenceintervals.doctree
Binary file not shown.
Binary file modified book/_build/.doctrees/environment.pickle
Binary file not shown.
30 changes: 30 additions & 0 deletions book/_build/html/_sources/confidenceintervals.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,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.
```

## The Accuracy of Averages

Proportions are a special kind of average. The sample average $\bar{x}$ estimates the population average $\mu$. For general averages, there is no formula analogous to SD=$\sqrt{p(1-p)}$. The standard deviation must be estimated from the data. With a large simple random sample, the SD of the sample is a good estimate of the SD of the box. Then, the SE for the average can be calculated

$$\text{SE for average} = \frac{\text{SD}}{\sqrt{n}}.$$

Once the SE is found, a confidence interval is constructed like in the case of proportions. For example, a 95% confidence interval is $\bar{x} \pm 2\text{SE}$.

## Exercises

```{exercise-start}
:label: CIicecream
```
In a survey of 96 randomly selected Americans, $\hat{p} = 0.60$ said they think ice cream should be banned. Find the 95% confidence interval for the proportion.
```{exercise-end}
```

```{exercise-start}
:label: CInarrow
```
You are interested in the 95% confidence interval of a sample mean. Which of the following makes this interval more narrow?

1. More observations.
2. Fewer observations.
3. Higher value of the average.
4. Lower value of the average.
5. Both 1 and 4
```{exercise-end}
```

35 changes: 35 additions & 0 deletions book/_build/html/confidenceintervals.html
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@ <h2> Contents </h2>
</li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#the-accuracy-of-averages">The Accuracy of Averages</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#exercises">Exercises</a></li>
</ul>
</nav>
</div>
Expand Down Expand Up @@ -502,6 +504,37 @@ <h4>Interpretation of a Confidence Interval<a class="headerlink" href="#interpre
</section>
</section>
</section>
<section id="the-accuracy-of-averages">
<h2>The Accuracy of Averages<a class="headerlink" href="#the-accuracy-of-averages" title="Permalink to this heading">#</a></h2>
<p>Proportions are a special kind of average. The sample average <span class="math notranslate nohighlight">\(\bar{x}\)</span> estimates the population average <span class="math notranslate nohighlight">\(\mu\)</span>. For general averages, there is no formula analogous to SD=<span class="math notranslate nohighlight">\(\sqrt{p(1-p)}\)</span>. The standard deviation must be estimated from the data. With a large simple random sample, the SD of the sample is a good estimate of the SD of the box. Then, the SE for the average can be calculated</p>
<div class="math notranslate nohighlight">
\[\text{SE for average} = \frac{\text{SD}}{\sqrt{n}}.\]</div>
<p>Once the SE is found, a confidence interval is constructed like in the case of proportions. For example, a 95% confidence interval is <span class="math notranslate nohighlight">\(\bar{x} \pm 2\text{SE}\)</span>.</p>
</section>
<section id="exercises">
<h2>Exercises<a class="headerlink" href="#exercises" title="Permalink to this heading">#</a></h2>
<div class="exercise admonition" id="CIicecream">

<p class="admonition-title"><span class="caption-number">Exercise 40 </span></p>
<section id="exercise-content">
<p>In a survey of 96 randomly selected Americans, <span class="math notranslate nohighlight">\(\hat{p} = 0.60\)</span> said they think ice cream should be banned. Find the 95% confidence interval for the proportion.</p>
</section>
</div>
<div class="exercise admonition" id="CInarrow">

<p class="admonition-title"><span class="caption-number">Exercise 41 </span></p>
<section id="exercise-content">
<p>You are interested in the 95% confidence interval of a sample mean. Which of the following makes this interval more narrow?</p>
<ol class="arabic simple">
<li><p>More observations.</p></li>
<li><p>Fewer observations.</p></li>
<li><p>Higher value of the average.</p></li>
<li><p>Lower value of the average.</p></li>
<li><p>Both 1 and 4</p></li>
</ol>
</section>
</div>
</section>
</section>

<script type="text/x-thebe-config">
Expand Down Expand Up @@ -574,6 +607,8 @@ <h4>Interpretation of a Confidence Interval<a class="headerlink" href="#interpre
</li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#the-accuracy-of-averages">The Accuracy of Averages</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#exercises">Exercises</a></li>
</ul>
</nav></div>

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.

28 changes: 27 additions & 1 deletion book/confidenceintervals.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,30 @@ Once the SE is found, a confidence interval is constructed like in the case of p

## Exercises

TK
```{exercise-start}
:label: CIicecream
```
In a survey of 96 randomly selected Americans, $\hat{p} = 0.60$ said they think ice cream should be banned. Find the 95% confidence interval for the proportion.
```{exercise-end}
```

```{exercise-start}
:label: CInarrow
```
You are interested in the 95% confidence interval of a sample mean. Which of the following makes this interval more narrow?

1. More observations.
2. Fewer observations.
3. Higher value of the average.
4. Lower value of the average.
5. Both 1 and 4
```{exercise-end}
```

```{exercise-start}
:label: CImc
```
Consider a multiple choice exam with choices A, B, C, D, and E for each question. Assume that the probability that a particular question has the answer $C$ is $p = 0.2$ and that all letter answers are determined independently. Find a 90% confidence interval for the proportion of questions that will have a correct answer of C on a 1600-question exam.
```{exercise-end}
```

0 comments on commit 49619f3

Please sign in to comment.