diff --git a/publication/publication.ptx b/publication/publication.ptx index ddd5d97..8c86190 100644 --- a/publication/publication.ptx +++ b/publication/publication.ptx @@ -146,8 +146,13 @@ - - + + diff --git a/source/ch-Expected-Value.ptx b/source/ch-Expected-Value.ptx index 7a869e2..58d8078 100644 --- a/source/ch-Expected-Value.ptx +++ b/source/ch-Expected-Value.ptx @@ -6,7 +6,6 @@

- Testing locally

diff --git a/source/ch-Probability.ptx b/source/ch-Probability.ptx index c05e756..695f2de 100644 --- a/source/ch-Probability.ptx +++ b/source/ch-Probability.ptx @@ -5,13 +5,20 @@

- 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).

Set Theory +

+ 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. +

+

@@ -21,7 +28,7 @@ - +

An experiment consists of rolling a standard 6-sided die. @@ -44,6 +51,7 @@ \amp (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), \amp (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)\} + Note that, for example, (1, 2) is a different outcome from (2, 1).

@@ -58,6 +66,10 @@
+

+ The subset symbol includes the possibility that A and B are equal sets, i.e., that they contain precisely the same elements. +

+

@@ -108,8 +120,38 @@

- It's useful sometimes to draw pictures representing sets... + It's useful sometimes to draw pictures called Venn diagrams representing sets:

+ +
+ Example Venn Diagram + + +

+ Venn diagram showing sets A, B, C with the region representing (A\cup B\cup C) - (A \cap C) shaded. +

+
+ + \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} + + +
@@ -185,11 +227,27 @@

- 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 (4, 2)---rolling a 4 and then a 2.]

+ + +

+ + \Omega = \{\amp (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), + \amp (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), + \amp (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), + \amp (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), + \amp (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), + \amp (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)\} + + Note that \Omega simply lists outcomes with no reference to the probabilities. + So the answer here is the same as in . +

+
@@ -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?

+ + +

+ For two flips: \Omega = \{ HH, HT, TH, TT \}. +

+ +

+ For three flips: \Omega = \{ HHH, HHT, HTH, THH, HTT, THT, TTH, TTT \}. +

+ +

+ For four flips: + + \Omega = \{ \amp HHHH, HHHT, HHTH, HTHH, + \amp THHH, HHTT, HTHT, HTTH, + \amp THHT, THTH, TTHH, HTTT, + \amp THTT, TTHT, TTTH, TTTT \}. + +

+ +

+ Each additional flip doubles the number of outcomes. + So, with ten flips, we'll have |\Omega| = 2^{10} = 1024. +

+
@@ -208,6 +291,13 @@ If we roll a 6-sided die ten times, how many possible results will there be?

+ + +

+ Each additional roll will multiply the number of outcomes by 6. + So, with 10 rolls, we'll have |\Omega| = 6^{10}. +

+
@@ -215,6 +305,10 @@
Definition of Probability +

+ 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. +

+

@@ -316,6 +410,11 @@ +

+ 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. +

+

@@ -323,7 +422,17 @@ What is the probability that they picked 3?

- + + +

+ Without assuming the distribution is fair (i.e., that each value 1, 2, \dotsc, 10) has probability 1/10 of occurring), we don't have enough information to answer this question. +

+ +

+ 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 7/2? What about irrational numbers like \pi? +

+
@@ -389,8 +498,13 @@ -
+ + +

+ \Pr(A) = 0.45, \Pr(B) = 0.4, \Pr(A \cup B) = 0.6, \Pr(A \cap B) = 0.25. +

+
@@ -409,6 +523,12 @@ Write all outcomes in the sample space \Omega.

+ + +

+ \Omega = \{HH, HT, TH, TT\}. +

+
@@ -418,6 +538,39 @@ Make a probability distribution table for \Omega assuming the coin is fair.

+ + + + Probability Distribution for Two Fair Coin Flips + + + + x + \Pr(x) + + + + HH + 0.25 + + + + HT + 0.25 + + + + TH + 0.25 + + + + TT + 0.25 + + +
+
@@ -427,6 +580,39 @@ Make a probability distribution table assuming the coin comes up heads with probability 0.3.

+ + + + Probability Distribution for Two Fair Coin Flips + + + + x + \Pr(x) + + + + HH + 0.09 + + + + HT + 0.21 + + + + TH + 0.21 + + + + TT + 0.49 + + +
+
@@ -445,6 +631,19 @@ Write all outcomes in the sample space \Omega.

+ + +

+ + \Omega = \{\amp (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), + \amp (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), + \amp (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), + \amp (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), + \amp (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), + \amp (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)\} + +

+
@@ -454,6 +653,13 @@ Make a probability distribution table for \Omega assuming the die is fair.

+ + +

+ We'll avoid an overly large table and note that, since the die is fair, every outcome is equally likely. + Therefore, \Pr(x) = \frac{1}{36} for every x\in \Omega. +

+
@@ -461,9 +667,27 @@

Let A be the event that the second roll is higher than the first, and let B be the event that the first roll is even. - Find \Pr(A), \Pr(B), and \Pr(A \mid B). + Find \Pr(A), \Pr(B), and \Pr(A \cap B).

+ + +

+ + A = \{ \amp (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), + \amp (2, 3), (2, 4), (2, 5), (2, 6), + \amp (3, 4), (3, 5), (3, 6), + \amp (4, 5), (4, 6), + \amp (5, 6)\} + B = \{ \amp (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), + \amp (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), + \amp (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)\} + A \cap B = \{ \amp (2, 3), (2, 4), (2, 5), (2, 6), + \amp (4, 5), (4, 6)\} + + Therefore \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}. +

+
@@ -476,6 +700,50 @@ Write a probability distribution table for this die.

+ + + + Probability Distribution for a Linearly Scaled Die + + + + x + \Pr(x) + + + + 1 + 1/21 + + + + 2 + 2/21 + + + + 3 + 3/21 + + + + 4 + 4/21 + + + + 5 + 5/21 + + + + 6 + 6/21 + + + +
+
@@ -486,6 +754,49 @@ Write a probability distribution table for this die.

+ + + Probability Distribution for an Even-biased Die + + + + x + \Pr(x) + + + + 1 + 1/9 + + + + 2 + 2/9 + + + + 3 + 1/9 + + + + 4 + 2/9 + + + + 5 + 1/9 + + + + 6 + 2/9 + + + +
+
@@ -496,16 +807,27 @@ What is the probability of the molecule leaving the cell during the first 3 minutes?

+ + +

+ For short, write \Pr(n) to mean the probability of the toxin molecule leaving during the nth minute. + Then \Pr(n) = (0.7)^{n - 1} (0.3). +

+ +

+ The probability of leaving during the first 3 minutes is \Pr(1) + \Pr(2) + \Pr(3) = 0.657. +

+
- +
diff --git a/source/docinfo.ptx b/source/docinfo.ptx index 1a35ef9..cc63dd0 100644 --- a/source/docinfo.ptx +++ b/source/docinfo.ptx @@ -40,7 +40,12 @@ - \usepackage{tikz, pgfplots} \usetikzlibrary{positioning,matrix,arrows} \usetikzlibrary{shapes,decorations,shadows,fadings,patterns} \usetikzlibrary{decorations.markings} + + \usepackage{tikz, pgfplots} + \usetikzlibrary{positioning,matrix,arrows,calc} + \usetikzlibrary{shapes,decorations,shadows,fadings,patterns} + \usetikzlibrary{decorations.markings,decorations.pathreplacing} +