diff --git a/source/sec-Probability.ptx b/source/sec-Probability.ptx index 15722b3..1374abb 100644 --- a/source/sec-Probability.ptx +++ b/source/sec-Probability.ptx @@ -1,147 +1,165 @@
- Definition of Probability + 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. -

+

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

- - -

- A probability distribution on a sample space \Omega assigns probabilities to every event, satisfying the following conditions: -

    -
  1. -

    - \Pr(\Omega) = 1. -

    -
  2. + + +

    + A probability distribution on a sample space \Omega + assigns probabilities to every event, satisfying the following + conditions: +

      +
    1. +

      + \Pr(\Omega) = 1. +

      +
    2. -
    3. -

      - 0 \leq \Pr(A) \leq 1 for any event A. -

      -
    4. +
    5. +

      + 0 \leq \Pr(A) \leq 1 for any event A. +

      +
    6. -
    7. -

      - If A \cap B = \emptyset, then \Pr(A\cup B) = \Pr(A) + \Pr(B). -

      -
    8. -
    -

    -
    -
    +
  3. +

    + If A \cap B = \emptyset, then + \Pr(A\cup B) = \Pr(A) + \Pr(B). +

    +
  4. +
+

+
+
-

- For small probability spaces (i.e., with finitely many outcomes in the sample space), we'll usually assign probabilities to each individual outcome, and perhaps list them in a table. - Then, to find the probability of any event, simply add together the probabilities of each outcome in that event. -

+

+ For small probability spaces (i.e., with finitely many outcomes in the + sample space), we'll usually assign probabilities to each individual + outcome, and perhaps list them in a table. + Then, to find the probability of any event, simply add together the + probabilities of each outcome in that event. +

- - -

- An experiment consists of rolling a standard 6-sided die. - The sample space is \Omega = \{1, 2, 3, 4, 5, 6\}. - The probability distribution (assuming a fair die) is shown below. -

+ + +

+ An experiment consists of rolling a standard 6-sided die. + The sample space is \Omega = \{1, 2, 3, 4, 5, 6\}. + The probability distribution (assuming a fair die) is shown below. +

- - Distribution for a fair die +
+ Distribution for a fair die - - - x - \Pr(x) - + + + x + \Pr(x) + - - 1 - 1/6 - + + 1 + 1/6 + - - 2 - 1/6 - + + 2 + 1/6 + - - 3 - 1/6 - + + 3 + 1/6 + - - 4 - 1/6 - + + 4 + 1/6 + - - 5 - 1/6 - + + 5 + 1/6 + - - 6 - 1/6 - - -
+ + 6 + 1/6 + + + -

- One possible event is A = \{2, 4, 6\}, i.e., the event that the result of the roll is even. - The probability of A is: - - \Pr(A) = \Pr(2) + \Pr(4) + \Pr(6) = \frac{1}{6} + \frac{1}{6} + \frac{1}{6} = \frac{3}{6} = \frac{1}{2} - -

-
-
+

+ One possible event is A = \{2, 4, 6\}, i.e., the event that the + result of the roll is even. + The probability of A is: + + \Pr(A) = \Pr(2) + \Pr(4) + \Pr(6) = \frac{1}{6} + \frac{1}{6} + \frac{1}{6} = \frac{3}{6} = \frac{1}{2} + +

+
+
- - -

- Let \Omega = \{x_1, x_2, \dotsc, x_n\} be a sample space and A\subset \Omega an event. - We refer to the distribution in which \Pr(x_i) = \frac{1}{n} for all i as the uniform distribution. - In this case, it follows that \Pr(A) = \frac{|A|}{|\Omega|}. -

-
-
+ + +

+ Let \Omega = \{x_1, x_2, \dotsc, x_n\} be a sample space and + A\subset \Omega an event. + We refer to the distribution in which \Pr(x_i) = \frac{1}{n} for + all i as the uniform distribution. + In this case, it follows that \Pr(A) = \frac{|A|}{|\Omega|}. +

+
+
-

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

+

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

- - -

- A person picks a random number from 1 to 10. - What is the probability that they picked 3? -

-
+ + +

+ A person picks a random number from 1 to 10. + 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. -

+ +

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

-
-
- - +

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

+ +
+

- Consider the sample space \Omega = \{1, 2, 3, 4, 5, 6, 7, 8\} with probability distribution below. - Calculate the probabilities of A = \{1, 3, 7, 8\}, B = \{2, 3, 6, 7\}, A\cup B, and A \cap B. + Consider the sample space \Omega = \{1, 2, 3, 4, 5, 6, 7, 8\} + with probability distribution below. + Calculate the probabilities of A = \{1, 3, 7, 8\}, + B = \{2, 3, 6, 7\}, A\cup B, and A \cap B.

- - + <tabular halign="center"> <row bottom="minor"> <cell><m>x</m></cell> @@ -196,11 +214,41 @@ </table> </statement> + <hint> + <p> + Remember that, to calculate the probability of an event, you should + add up the probabilities of each outcome in the event. + </p> + </hint> + <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> + + <solution> + <p> + <md> + <mrow> \Pr(A) \amp = \Pr(1) + \Pr(3) + \Pr(7) + \Pr(8) </mrow> + <mrow> \amp = 0.1 + 0.2 + 0.05 + 0.1 </mrow> + <mrow> \amp = 0.45 </mrow> + <mrow> \Pr(B) \amp = \Pr(2) + \Pr(3) + \Pr(6) + \Pr(7) </mrow> + <mrow> \amp = 0.05 + 0.2 + 0.1 + 0.05 </mrow> + <mrow> \amp = 0.4 </mrow> + </md> + The other events are <m>A\cup B = \{1, 2, 3, 6, 7, 8\}</m> and + <m>A\cap B = \{3, 7\}</m>, so: + <md> + <mrow> \Pr(A \cup B) \amp = \Pr(1) + \Pr(2) + \Pr(3) + \Pr(6) + \Pr(7) + \Pr(8) </mrow> + <mrow> \amp = 0.1 + 0.05 + 0.2 + 0.1 + 0.05 + 0.1 </mrow> + <mrow> \amp = 0.6 </mrow> + <mrow> \Pr(A \cap B) \amp = \Pr(3) + \Pr(7) </mrow> + <mrow> \amp = 0.2 + 0.05 </mrow> + <mrow> \amp = 0.25 </mrow> + </md> + </p> + </solution> </exercise> <exercise> @@ -208,11 +256,11 @@ <p> Suppose we flip a coin two times. Answer the questions below. - What about three flips? What about four flips? + What about three flips? + What about four flips? </p> </introduction> - <task> <statement> <p> @@ -227,11 +275,11 @@ </answer> </task> - <task> <statement> <p> - Make a probability distribution table for <m>\Omega</m> assuming the coin is fair. + Make a probability distribution table for <m>\Omega</m> assuming the + coin is fair. </p> </statement> @@ -269,11 +317,11 @@ </answer> </task> - <task> <statement> <p> - Make a probability distribution table assuming the coin comes up heads with probability 0.3. + Make a probability distribution table assuming the coin comes up + heads with probability 0.3. </p> </statement> @@ -315,12 +363,11 @@ <exercise> <introduction> <p> - Suppose we roll a die two times. + Suppose we roll a fair 6-sided die two times. Answer the questions below. </p> </introduction> - <task> <statement> <p> @@ -342,32 +389,40 @@ </answer> </task> - <task> <statement> <p> - Make a probability distribution table for <m>\Omega</m> assuming the die is fair. + 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>. + 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> - <task> <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. + 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 \cap B)</m>. </p> </statement> <answer> + <p> + <m>\Pr(A) = \frac{5}{12}, \Pr(B) = \frac{1}{2}, \Pr(A \cap B) = \frac{1}{6}</m>. + </p> + </answer> + + <solution> <p> <md> <mrow> A = \{ \amp (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), </mrow> @@ -381,18 +436,23 @@ <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> + 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> + </solution> </task> </exercise> <exercise> <statement> <p> - Suppose a die has the values <m>1, 2, 3, 4, 5, 6</m> on the faces, but the die is not fair. - Instead, the probabilities scale by the same amount as the face values. - For example, a result of 4 is twice as likely as a result of 2, since 4 is twice as large as 2; a result of 6 is six times more likely than a result of 1; and so on. + Suppose a die has the values <m>1, 2, 3, 4, 5, 6</m> on the faces, but + the die is not fair. + Instead, the probabilities scale by the same amount as the face + values. + For example, a result of 4 is twice as likely as a result of 2, since + 4 is twice as large as 2; a result of 6 is six times more likely than + a result of 1; and so on. Write a probability distribution table for this die. </p> </statement> @@ -439,13 +499,74 @@ </tabular> </table> </answer> + + <solution> + <p> + Let <m>\Pr(1) = x</m>. + Then <m>\Pr(2) = 2 \Pr(1) = 2x</m>, and <m>\Pr(3) = 3\Pr(1) = 3x</m>, + and so on. + So the total probability in the space is: + <md> + <mrow> Pr(\Omega) \amp = \Pr(1) + \Pr(2) + \Pr(3) + \Pr(4) + \Pr(5) + \Pr(6) </mrow> + <mrow> \amp = x + 2x + 3x + 4x + 5x + 6x </mrow> + <mrow> \amp = 21x </mrow> + </md> + Since the total probability must add up to 1, we have <m>1 = 21x</m>, + so <m>x = \frac{1}{21}</m>, and we can calculate the rest of the + probabilities from there. + </p> + + <table> + <title>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 + + +
+

- Suppose a die has the values 1, 2, 3, 4, 5, 6 on the faces, but the die is not fair. - Instead, each even value has an equal probability, each odd value has an equal probability, and the even values are each twice as likely as the odd values to appear on a roll. + Suppose a die has the values 1, 2, 3, 4, 5, 6 on the faces, but + the die is not fair. + Instead, each even value has an equal probability, each odd value has + an equal probability, and the even values are each twice as likely as + the odd values to appear on a roll. Write a probability distribution table for this die.

@@ -492,36 +613,112 @@ + + +

+ Let \Pr(1) = x. + Then \Pr(3) = x and \Pr(5) = x, since all odd rolls must + have the same probability. + The even rolls must have twice the probability, so + \Pr(2) = \Pr(4) = \Pr(6) = 2x. + Now: + + Pr(\Omega) \amp = \Pr(1) + \Pr(2) + \Pr(3) + \Pr(4) + \Pr(5) + \Pr(6) + \amp = x + 2x + x + 2x + x + 2x + \amp = 9x + + Since the total probability must add up to 1, we have 1 = 9x, + so x = \frac{1}{9}, and we can calculate the rest of the + probabilities from there. +

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

- A toxin molecule inside a cell has a 0.3 probability of leaving the cell during a 1-minute period. - For each value of n = 1, 2, 3, \dotsc, find the probability of the toxin molecule leaving the cell during the nth minute. - What is the probability of the molecule leaving the cell during the first 3 minutes? + A toxin molecule inside a cell has a 0.3 probability of leaving the + cell during a 1-minute period. + For each value of n = 1, 2, 3, \dotsc, find the probability of + the toxin molecule leaving the cell during the n th minute. + 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). + Write T for the minute that the toxin molecule leaves the cell. + Then \Pr(T = n) = (0.7)^{n - 1} (0.3), and \Pr(T \leq 3) = 0.657. +

+
+ + +

+ Write T for the minute that the toxin molecule leaves the cell. + We're told that the toxin molecule has probability 0.3 of leaving during each minute. + Therefore, the probability of remaining during a particular minute is 1 - 0.3 = 0.7.

- The probability of leaving during the first 3 minutes is \Pr(1) + \Pr(2) + \Pr(3) = 0.657. + For the toxin molecule to leave the cell during minute n, it must remain for minutes 1, 2, \dotsc, n - 1, and then leave during minute n. + The probability to remain each minute is 0.7, so we must multiply n - 1 copies of 0.7. + Then the probability of leaving is 0.3, so we multiply by a factor of 0.3, yielding the formula: + + \Pr(T = n) = (0.7)^{n - 1}(0.3). +

- -
-
-
\ No newline at end of file + + \ No newline at end of file