More text and answers in Sec 1.1 and 1.2.

This commit is contained in:
2026-01-11 12:24:57 -05:00
parent 7e872687ef
commit 2b901c90a6
4 changed files with 344 additions and 13 deletions
+7 -2
View File
@@ -146,8 +146,13 @@
<!-- override defaults. Ex:<css theme="denver"/> -->
<!-- See also -->
<!-- https://pretextbook.org/doc/guide/html/publication-file-online.html#online-style-options -->
<css theme="boulder"/>
<!-- <css theme="salem"/> -->
<css
theme="boulder"
primary-color="#386F94"
primary-color-dark="#5192BD"
provide-dark-mode="yes"
/>
<!-- <css theme="salem"/> -->
<!-- Search can be default or none, or you can use a Google-cx number to use google's search
feature (but then variant should be set to none to avoid conflict) -->
-1
View File
@@ -6,7 +6,6 @@
<introduction>
<p>
Testing locally
</p>
</introduction>
+331 -9
View File
@@ -5,13 +5,20 @@
<introduction>
<p>
Text before the first section.
This chapter establishes the basic terminology of sample spaces, events, probability, conditi8onal probability, and independence.
This language lets us model and talk about situations that involve randomness (or lack of knowledge which can sometimes be mathematically modeled in the same way).
</p>
</introduction>
<section xml:id="sec-Set-Theory" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Set Theory</title>
<p>
When we perform an experiment, there are many results that we might see.
We want to be able to quantify the likelihood of seeing certain results.
For this, we need to develop some mathematical terminology.
</p>
<definition xml:id="def-sample-space">
<statement>
<p>
@@ -21,7 +28,7 @@
</statement>
</definition>
<example>
<example xml:id="example-sample-space">
<statement>
<p>
An experiment consists of rolling a standard 6-sided die.
@@ -44,6 +51,7 @@
<mrow> \amp (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), </mrow>
<mrow> \amp (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)\} </mrow>
</md>
Note that, for example, <m>(1, 2)</m> is a different outcome from <m>(2, 1)</m>.
</p>
</answer>
</example>
@@ -58,6 +66,10 @@
</statement>
</definition>
<p>
The subset symbol includes the possibility that <m>A</m> and <m>B</m> are equal sets, i.e., that they contain precisely the same elements.
</p>
<definition xml:id="def-set-operations">
<statement>
<p>
@@ -108,8 +120,38 @@
</definition>
<p>
It's useful sometimes to draw pictures representing sets...
It's useful sometimes to draw pictures called <term>Venn diagrams</term> representing sets:
</p>
<figure xml:id="fig-Venn-diagram">
<caption>Example Venn Diagram</caption>
<image width="50%">
<description>
<p>
Venn diagram showing sets <m>A, B, C</m> with the region representing <m>(A\cup B\cup C) - (A \cap C)</m> shaded.
</p>
</description>
<latex-image>
\begin{tikzpicture}
\def\firstcircle{(90:1.75cm) circle (2.5cm)}
\def\secondcircle{(210:1.75cm) circle (2.5cm)}
\def\thirdcircle{(330:1.75cm) circle (2.5cm)}
\fill[gray!30] \firstcircle;
\fill[gray!30] \secondcircle;
\fill[gray!30] \thirdcircle;
\begin{scope}
\clip \firstcircle;
\clip \thirdcircle;
\fill[white] \firstcircle;
\end{scope}
\draw \firstcircle node[text=black,above] {$A$};
\draw \secondcircle node [text=black,below left] {$B$};
\draw \thirdcircle node [text=black,below right] {$C$};
\node at (0, -4.5) {$(A\cup B\cup C) - (A \cap C)$};
\end{tikzpicture}
</latex-image>
</image>
</figure>
<!-- TODO learn figures -->
<definition xml:id="def-disjoint">
<statement>
@@ -185,11 +227,27 @@
<exercise>
<statement>
<p>
Suppose we roll a 6-sided die two times.
Suppose we have a 6-sided die that's weighted to roll a 6 half of the time.
We roll the die two times.
List the set of all possible results.
[Note: the result (2, 4)---rolling a 2 and then a 4---is different from the result <m>(4, 2)</m>---rolling a 4 and then a 2.]
</p>
</statement>
<answer>
<p>
<md>
<mrow> \Omega = \{\amp (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), </mrow>
<mrow> \amp (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), </mrow>
<mrow> \amp (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), </mrow>
<mrow> \amp (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), </mrow>
<mrow> \amp (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), </mrow>
<mrow> \amp (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)\} </mrow>
</md>
Note that <m>\Omega</m> simply lists outcomes with no reference to the probabilities.
So the answer here is the same as in <xref ref="example-sample-space"/>.
</p>
</answer>
</exercise>
<exercise>
@@ -200,6 +258,31 @@
What about flipping three times? Four times? If we flip the coin 10 times, how many possible results will there be?
</p>
</statement>
<answer>
<p>
For two flips: <m>\Omega = \{ HH, HT, TH, TT \}</m>.
</p>
<p>
For three flips: <m>\Omega = \{ HHH, HHT, HTH, THH, HTT, THT, TTH, TTT \}</m>.
</p>
<p>
For four flips:
<md>
<mrow> \Omega = \{ \amp HHHH, HHHT, HHTH, HTHH, </mrow>
<mrow> \amp THHH, HHTT, HTHT, HTTH, </mrow>
<mrow> \amp THHT, THTH, TTHH, HTTT, </mrow>
<mrow> \amp THTT, TTHT, TTTH, TTTT \}. </mrow>
</md>
</p>
<p>
Each additional flip doubles the number of outcomes.
So, with ten flips, we'll have <m>|\Omega| = 2^{10} = 1024</m>.
</p>
</answer>
</exercise>
<exercise>
@@ -208,6 +291,13 @@
If we roll a 6-sided die ten times, how many possible results will there be?
</p>
</statement>
<answer>
<p>
Each additional roll will multiply the number of outcomes by 6.
So, with 10 rolls, we'll have <m>|\Omega| = 6^{10}.</m>
</p>
</answer>
</exercise>
</exercises>
</section>
@@ -215,6 +305,10 @@
<section xml:id="sec-Probability" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Definition of Probability</title>
<p>
Now that we have the language to refer to outcomes and events of an experiment, we want to start quantifying how likely those outcomes/events are to occur.
</p>
<definition xml:id="def-probability-distribution">
<statement>
<p>
@@ -316,6 +410,11 @@
</statement>
</definition>
<p>
When we talk about a fair coin flip or a fair die roll, the word "fair" is indicating a uniform distribution.
However, don't make the mistake of assuming that all distributions are uniform by default.
</p>
<example>
<statement>
<p>
@@ -323,7 +422,17 @@
What is the probability that they picked 3?
</p>
</statement>
<!-- ehhhh? -->
<answer>
<p>
Without assuming the distribution is fair (i.e., that each value <m>1, 2, \dotsc, 10</m>) has probability <m>1/10</m> of occurring), we don't have enough information to answer this question.
</p>
<p>
In fact, the situation is even more vague than that: the sample space itself is unclear.
Are we only allowed to pick integer values? What about fractions like <m>7/2</m>? What about irrational numbers like <m>\pi</m>?
</p>
</answer>
</example>
<exercises xml:id="exercises-Probability">
@@ -389,8 +498,13 @@
</row>
</tabular>
</table>
<!--</div attr= class="center">-->
</statement>
<answer>
<p>
<m>\Pr(A) = 0.45, \Pr(B) = 0.4, \Pr(A \cup B) = 0.6, \Pr(A \cap B) = 0.25.</m>
</p>
</answer>
</exercise>
<exercise>
@@ -409,6 +523,12 @@
Write all outcomes in the sample space <m>\Omega</m>.
</p>
</statement>
<answer>
<p>
<m>\Omega = \{HH, HT, TH, TT\}.</m>
</p>
</answer>
</task>
@@ -418,6 +538,39 @@
Make a probability distribution table for <m>\Omega</m> assuming the coin is fair.
</p>
</statement>
<answer>
<table>
<title>Probability Distribution for Two Fair Coin Flips</title>
<tabular halign="center">
<row bottom="minor">
<cell><m>x</m></cell>
<cell><m>\Pr(x)</m></cell>
</row>
<row>
<cell><m>HH</m></cell>
<cell>0.25</cell>
</row>
<row>
<cell><m>HT</m></cell>
<cell>0.25</cell>
</row>
<row>
<cell><m>TH</m></cell>
<cell>0.25</cell>
</row>
<row>
<cell><m>TT</m></cell>
<cell>0.25</cell>
</row>
</tabular>
</table>
</answer>
</task>
@@ -427,6 +580,39 @@
Make a probability distribution table assuming the coin comes up heads with probability 0.3.
</p>
</statement>
<answer>
<table>
<title>Probability Distribution for Two Fair Coin Flips</title>
<tabular halign="center">
<row bottom="minor">
<cell><m>x</m></cell>
<cell><m>\Pr(x)</m></cell>
</row>
<row>
<cell><m>HH</m></cell>
<cell>0.09</cell>
</row>
<row>
<cell><m>HT</m></cell>
<cell>0.21</cell>
</row>
<row>
<cell><m>TH</m></cell>
<cell>0.21</cell>
</row>
<row>
<cell><m>TT</m></cell>
<cell>0.49</cell>
</row>
</tabular>
</table>
</answer>
</task>
</exercise>
@@ -445,6 +631,19 @@
Write all outcomes in the sample space <m>\Omega</m>.
</p>
</statement>
<answer>
<p>
<md>
<mrow> \Omega = \{\amp (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), </mrow>
<mrow> \amp (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), </mrow>
<mrow> \amp (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), </mrow>
<mrow> \amp (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), </mrow>
<mrow> \amp (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), </mrow>
<mrow> \amp (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)\} </mrow>
</md>
</p>
</answer>
</task>
@@ -454,6 +653,13 @@
Make a probability distribution table for <m>\Omega</m> assuming the die is fair.
</p>
</statement>
<answer>
<p>
We'll avoid an overly large table and note that, since the die is fair, every outcome is equally likely.
Therefore, <m>\Pr(x) = \frac{1}{36}</m> for every <m>x\in \Omega</m>.
</p>
</answer>
</task>
@@ -461,9 +667,27 @@
<statement>
<p>
Let <m>A</m> be the event that the second roll is higher than the first, and let <m>B</m> be the event that the first roll is even.
Find <m>\Pr(A), \Pr(B)</m>, and <m>\Pr(A \mid B)</m>.
Find <m>\Pr(A), \Pr(B)</m>, and <m>\Pr(A \cap B)</m>.
</p>
</statement>
<answer>
<p>
<md>
<mrow> A = \{ \amp (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), </mrow>
<mrow> \amp (2, 3), (2, 4), (2, 5), (2, 6), </mrow>
<mrow> \amp (3, 4), (3, 5), (3, 6), </mrow>
<mrow> \amp (4, 5), (4, 6), </mrow>
<mrow> \amp (5, 6)\} </mrow>
<mrow> B = \{ \amp (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), </mrow>
<mrow> \amp (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), </mrow>
<mrow> \amp (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)\} </mrow>
<mrow> A \cap B = \{ \amp (2, 3), (2, 4), (2, 5), (2, 6), </mrow>
<mrow> \amp (4, 5), (4, 6)\} </mrow>
</md>
Therefore <m>\Pr(A) = \frac{15}{36} = \frac{5}{12}, \Pr(B) = \frac{18}{36} = \frac{1}{2}, \Pr(A \cap B) = \frac{6}{36} = \frac{1}{6}.</m>
</p>
</answer>
</task>
</exercise>
@@ -476,6 +700,50 @@
Write a probability distribution table for this die.
</p>
</statement>
<answer>
<table>
<title>Probability Distribution for a Linearly Scaled Die</title>
<tabular halign="center">
<row bottom="minor">
<cell><m>x</m></cell>
<cell><m>\Pr(x)</m></cell>
</row>
<row>
<cell>1</cell>
<cell><m>1/21</m></cell>
</row>
<row>
<cell>2</cell>
<cell><m>2/21</m></cell>
</row>
<row>
<cell>3</cell>
<cell><m>3/21</m></cell>
</row>
<row>
<cell>4</cell>
<cell><m>4/21</m></cell>
</row>
<row>
<cell>5</cell>
<cell><m>5/21</m></cell>
</row>
<row>
<cell>6</cell>
<cell><m>6/21</m></cell>
</row>
</tabular>
</table>
</answer>
</exercise>
<exercise>
@@ -486,6 +754,49 @@
Write a probability distribution table for this die.
</p>
</statement>
<answer>
<table>
<title>Probability Distribution for an Even-biased Die</title>
<tabular halign="center">
<row bottom="minor">
<cell><m>x</m></cell>
<cell><m>\Pr(x)</m></cell>
</row>
<row>
<cell>1</cell>
<cell><m>1/9</m></cell>
</row>
<row>
<cell>2</cell>
<cell><m>2/9</m></cell>
</row>
<row>
<cell>3</cell>
<cell><m>1/9</m></cell>
</row>
<row>
<cell>4</cell>
<cell><m>2/9</m></cell>
</row>
<row>
<cell>5</cell>
<cell><m>1/9</m></cell>
</row>
<row>
<cell>6</cell>
<cell><m>2/9</m></cell>
</row>
</tabular>
</table>
</answer>
</exercise>
<exercise>
@@ -496,16 +807,27 @@
What is the probability of the molecule leaving the cell during the first 3 minutes?
</p>
</statement>
<answer>
<p>
For short, write <m>\Pr(n)</m> to mean the probability of the toxin molecule leaving during the <m>n</m>th minute.
Then <m>\Pr(n) = (0.7)^{n - 1} (0.3).</m>
</p>
<p>
The probability of leaving during the first 3 minutes is <m>\Pr(1) + \Pr(2) + \Pr(3) = 0.657.</m>
</p>
</answer>
</exercise>
<exercise>
<!-- <exercise>
<statement>
<p>
Each of 10 toxin molecules inside a cell has a 0.3 probability of leaving the cell during a 1-minute period.
For each value of <m>n = 1, 2, 3, \dotsc</m>, and for each value of <m>0\leq k \leq n</m>, find the probability that exactly <m>k</m> toxin molecules remain in the cell after the <m>n</m>th minute.
</p>
</statement>
</exercise>
</exercise> needs binomial coefficients -->
</exercises>
</section>
+6 -1
View File
@@ -40,7 +40,12 @@
<!-- If you put any latex-image elements you can include preambles -->
<!-- for those in the next element. -->
<latex-image-preamble> \usepackage{tikz, pgfplots} \usetikzlibrary{positioning,matrix,arrows} \usetikzlibrary{shapes,decorations,shadows,fadings,patterns} \usetikzlibrary{decorations.markings} </latex-image-preamble>
<latex-image-preamble>
\usepackage{tikz, pgfplots}
\usetikzlibrary{positioning,matrix,arrows,calc}
\usetikzlibrary{shapes,decorations,shadows,fadings,patterns}
\usetikzlibrary{decorations.markings,decorations.pathreplacing}
</latex-image-preamble>
<!-- It is possible to rename elements: -->
<!-- <rename element="assemblage" xml:lang="en-US">Summary</rename> -->