527 lines
15 KiB
Plaintext
527 lines
15 KiB
Plaintext
<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>
|
|
A <term>probability distribution</term> on a sample space <m>\Omega</m> assigns probabilities to every event, satisfying the following conditions:
|
|
<ol>
|
|
<li>
|
|
<p>
|
|
<m>\Pr(\Omega) = 1</m>.
|
|
</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>
|
|
<m>0 \leq \Pr(A) \leq 1</m> for any event <m>A</m>.
|
|
</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>
|
|
If <m>A \cap B = \emptyset</m>, then <m>\Pr(A\cup B) = \Pr(A) + \Pr(B)</m>.
|
|
</p>
|
|
</li>
|
|
</ol>
|
|
</p>
|
|
</statement>
|
|
</definition>
|
|
|
|
<p>
|
|
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.
|
|
</p>
|
|
|
|
<example>
|
|
<statement>
|
|
<p>
|
|
An experiment consists of rolling a standard 6-sided die.
|
|
The sample space is <m>\Omega = \{1, 2, 3, 4, 5, 6\}</m>.
|
|
The probability distribution (assuming a fair die) is shown below.
|
|
</p>
|
|
|
|
<table>
|
|
<title>Distribution for a fair 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/6</m></cell>
|
|
</row>
|
|
|
|
<row>
|
|
<cell>2</cell>
|
|
<cell><m>1/6</m></cell>
|
|
</row>
|
|
|
|
<row>
|
|
<cell>3</cell>
|
|
<cell><m>1/6</m></cell>
|
|
</row>
|
|
|
|
<row>
|
|
<cell>4</cell>
|
|
<cell><m>1/6</m></cell>
|
|
</row>
|
|
|
|
<row>
|
|
<cell>5</cell>
|
|
<cell><m>1/6</m></cell>
|
|
</row>
|
|
|
|
<row>
|
|
<cell>6</cell>
|
|
<cell><m>1/6</m></cell>
|
|
</row>
|
|
</tabular>
|
|
</table>
|
|
|
|
<p>
|
|
One possible event is <m>A = \{2, 4, 6\}</m>, i.e., the event that the result of the roll is even.
|
|
The probability of <m>A</m> is:
|
|
<md>
|
|
<mrow> \Pr(A) = \Pr(2) + \Pr(4) + \Pr(6) = \frac{1}{6} + \frac{1}{6} + \frac{1}{6} = \frac{3}{6} = \frac{1}{2} </mrow>
|
|
</md>
|
|
</p>
|
|
</statement>
|
|
</example>
|
|
|
|
<definition xml:id="def-discrete-uniform-distribution">
|
|
<statement>
|
|
<p>
|
|
Let <m>\Omega = \{x_1, x_2, \dotsc, x_n\}</m> be a sample space and <m>A\subset \Omega</m> an event.
|
|
We refer to the distribution in which <m>\Pr(x_i) = \frac{1}{n}</m> for all <m>i</m> as the <term>uniform distribution</term>.
|
|
In this case, it follows that <m>\Pr(A) = \frac{|A|}{|\Omega|}</m>.
|
|
</p>
|
|
</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>
|
|
A person picks a random number from 1 to 10.
|
|
What is the probability that they picked 3?
|
|
</p>
|
|
</statement>
|
|
|
|
<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">
|
|
<exercise>
|
|
<statement>
|
|
<p>
|
|
Consider the sample space <m>\Omega = \{1, 2, 3, 4, 5, 6, 7, 8\}</m> with probability distribution below.
|
|
Calculate the probabilities of <m>A = \{1, 3, 7, 8\}</m>, <m>B = \{2, 3, 6, 7\}</m>, <m>A\cup B</m>, and <m>A \cap B</m>.
|
|
</p>
|
|
|
|
<table>
|
|
<title></title>
|
|
|
|
<tabular halign="center">
|
|
<row bottom="minor">
|
|
<cell><m>x</m></cell>
|
|
<cell><m>\Pr(x)</m></cell>
|
|
</row>
|
|
|
|
<row>
|
|
<cell>1</cell>
|
|
<cell>0.1</cell>
|
|
</row>
|
|
|
|
<row>
|
|
<cell>2</cell>
|
|
<cell>0.05</cell>
|
|
</row>
|
|
|
|
<row>
|
|
<cell>3</cell>
|
|
<cell>0.2</cell>
|
|
</row>
|
|
|
|
<row>
|
|
<cell>4</cell>
|
|
<cell>0.15</cell>
|
|
</row>
|
|
|
|
<row>
|
|
<cell>5</cell>
|
|
<cell>0.15</cell>
|
|
</row>
|
|
|
|
<row>
|
|
<cell>6</cell>
|
|
<cell>0.1</cell>
|
|
</row>
|
|
|
|
<row>
|
|
<cell>7</cell>
|
|
<cell>0.05</cell>
|
|
</row>
|
|
|
|
<row>
|
|
<cell>8</cell>
|
|
<cell>0.1</cell>
|
|
</row>
|
|
|
|
<row>
|
|
<cell>9</cell>
|
|
<cell>0.1</cell>
|
|
</row>
|
|
</tabular>
|
|
</table>
|
|
</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>
|
|
<introduction>
|
|
<p>
|
|
Suppose we flip a coin two times.
|
|
Answer the questions below.
|
|
What about three flips? What about four flips?
|
|
</p>
|
|
</introduction>
|
|
|
|
|
|
<task>
|
|
<statement>
|
|
<p>
|
|
Write all outcomes in the sample space <m>\Omega</m>.
|
|
</p>
|
|
</statement>
|
|
|
|
<answer>
|
|
<p>
|
|
<m>\Omega = \{HH, HT, TH, TT\}.</m>
|
|
</p>
|
|
</answer>
|
|
</task>
|
|
|
|
|
|
<task>
|
|
<statement>
|
|
<p>
|
|
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>
|
|
|
|
|
|
<task>
|
|
<statement>
|
|
<p>
|
|
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>
|
|
|
|
<exercise>
|
|
<introduction>
|
|
<p>
|
|
Suppose we roll a die two times.
|
|
Answer the questions below.
|
|
</p>
|
|
</introduction>
|
|
|
|
|
|
<task>
|
|
<statement>
|
|
<p>
|
|
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>
|
|
|
|
|
|
<task>
|
|
<statement>
|
|
<p>
|
|
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>
|
|
|
|
|
|
<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.
|
|
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>
|
|
|
|
<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.
|
|
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>
|
|
<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, 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.
|
|
</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>
|
|
<statement>
|
|
<p>
|
|
A toxin molecule 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>, find the probability of the toxin molecule leaving the cell during the <m>n</m>th minute.
|
|
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>
|
|
<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>
|
|
needs binomial coefficients --> </exercises>
|
|
</section> |