Section 4.3 Definition of Probability
Relative frequency gives a way to measure the proportion of "successful" outcomes when doing an experimental approach. From the interactive applications above, it appears that the relative frequency does jump around as the experiment is repeated but that the amount of variation decreases as the number of experiments increases. This is known to be true in general and is known as the "Law of Large Numbers". We would like to formalize what these relative frequencies are approaching and will call this theoretical limit the "probability" of the outcome. In doing so, we will do our best to model our definition so that it follow the behavior of relative frequency. To generate a general definition for probability, we need to know what is is that we measuring. In general, we will be finding the probability of sets of possible outcomes...that is, a subset of the Sample Space S. Toward that end, it is important to briefly look at some properties of sets.Definition 4.3.1. Pairwise Disjoint Sets.
{A1,A2,...,An} are pairwise disjoint provided Ak∩Aj=∅ so long as k≠j. Disjoint sets as also often called mutually exclusive.
xxxxxxxxxx
def f(s, braces=True):
t = ', '.join(sorted(list(s)))
if braces: return '{' + t + '}'
return t
def g(s): return set(str(s).replace(',',' ').split())
​
def _(X='1,2,3', Y='2,a,3,4,apple', Z='a,b,10,apple'):
S = [g(X), g(Y), g(Z)]
X,Y,Z = S
XY = X & Y
XZ = X & Z
YZ = Y & Z
XYZ = XY & Z
​
Txy = " - NOT disjoint "
if Set(XY).is_empty():
Txy = ' - disjoint '
pretty_print(html("$X \\cap Y$ = %s"%f(XY)+"%s"%Txy))
Txz = " - NOT disjoint "
if Set(XZ).is_empty():
Txz = ' - disjoint '
pretty_print(html("$X \\cap Z$ = %s"%f(XZ)+"%s"%Txz))
Tyz = " - NOT disjoint "
if Set(YZ).is_empty():
Tyz = ' - disjoint '
pretty_print(html("$Y \\cap Z$ = %s"%f(YZ)+"%s"%Tyz))
Txyz = " - NOT disjoint "
if Set(XYZ).is_empty():
Txyz = ' - disjoint '
pretty_print(html("$X \\cap Y \\cap Z$ = %s"%f(XYZ)+"%s"%Txyz))
centers = [(cos(n*2*pi/3), sin(n*2*pi/3)) for n in [0,1,2]]
scale = 1.7
clr = ['yellow', 'blue', 'green']
G = Graphics()
for i in range(len(S)):
G += circle(centers[i], scale, rgbcolor=clr[i],
fill=True, alpha=0.3)
for i in range(len(S)):
G += circle(centers[i], scale, rgbcolor='black')
​
# Plot what is in one but neither other
for i in range(len(S)):
Z = set(S[i])
for j in range(1,len(S)):
Z = Z.difference(S[(i+j)%3])
G += text(f(Z,braces=False), (1.5*centers[i][0],1.7*centers[i][1]),
rgbcolor='black')
​
​
# Plot pairs of intersections
for i in range(len(S)):
Z = (set(S[i]) & S[(i+1)%3]) - set(XYZ)
C = (1.3*cos(i*2*pi/3 + pi/3), 1.3*sin(i*2*pi/3 + pi/3))
G += text(f(Z,braces=False), C, rgbcolor='black')
​
# Plot intersection of all three
G += text(f(XYZ,braces=False), (0,0), rgbcolor='black')
​
# Show it
G.show(aspect_ratio=1, axes=False)
- Relative frequency cannot be negative, since cardinality cannot be negative
- Relative frequencies for disjoint events should sum to one
- Relative frequencies for collections of disjoint outcomes should equal the sum of the individual relative frequencies
Definition 4.3.2. Probability.
The probability P(A) of a given outcome A is a set function that satisfies:
- (Nonnegativity) P(A) ≥0
- (Totality) P(S) = 1
- (Subadditivity) If A ∩ B = ∅, then P(A ∪ B) = P(A) + P(B). In general, if {Ak} are pairwise disjoint then P(∪kAk)=∑kP(Ak).
Checkpoint 4.3.3. WeBWorK - Using the definition.
Notice when you are given complete information regarding the entire data set then determining probabilities for events can be relatively easy to compute.
Theorem 4.3.4. Probability of Complements.
For any event A,
Proof.
Let A be any event and note that
But \(A \cup A^c = S\text{.}\) So, by subadditivity
as desired.
Theorem 4.3.5.
Proof.
Note that \(\emptyset^c = S\text{.}\) So, by the theorem above,
Cancelling the 1 on both sides gives \(P(\emptyset) = 0\text{.}\)
Theorem 4.3.6.
For events A and B withProof.
Assume sets A and B satisfy \(A \subset B\text{.}\) Then, notice that
and
Therefore, by subadditivity and nonnegativity
Theorem 4.3.7.
For any event A,Proof.
Notice \(A \subset S\text{.}\) By the theorem above \(P(A) \le P(S) = 1\)
Theorem 4.3.8.
For any sets A and B,Proof.
Notice that we can write \(A \cup B\) as the disjoint union
We can also write disjointly
Hence,
Corollary 4.3.9.
For any sets A, B and C,
Corollary 4.3.10.
For any sets A, B, C and D,
Theorem 4.3.11. Probability of Equally Likely Events.
If outcomes in S are equally likely, then for A⊂S,
Proof.
Enumerate S = {\(x_1, x_2, ..., x_{|S|}\)} and note \(P( \{ x_k \} ) = c\) for some constant c since each item is equally likely. However, using each outcome as a disjoint event and the definition of probability,
and so \(c = \frac{1}{{|S|}}\text{.}\) Therefore, \(P( \{ x_k \} ) = \frac{1}{|S|}\) .
Hence, with A = {\(a_1, a_2, ..., a_{|A|}\)}, breaking up the disjoint probabilities as above gives
as desired.
xxxxxxxxxx
var('A C D H J K Q S')
​
def L(str):
n = len(str)
m = int(n/5)
top = m+1
if m == n/5:
top = m
for k in range(top):
pretty_print(str[5*k:5*k+5])
suits = [S, D, C, H]
values = [2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, A]
​
deck = [(value, suit) for suit in suits for value in values]
full_deck = copy(deck) # to save a copy
​
# L(deck)
shuffle(deck)
# L(deck)
deck1 = copy(full_deck)
shuffle(deck1)
​
def _(auto_update=False):
global deck1
shuffle(deck1)
if (Set(deck1).cardinality() < 5):
print('Deck is too small...getting a new deck')
deck1 = copy(full_deck)
else:
hand = [deck1.pop() for card in range(5)]
pretty_print("The cards dealt:")
L(hand)
pretty_print(" The remaining cards in the deck:")
L(deck1)
pretty_print(html("\n The number of remaining cards in the deck "
+" = %s"%str(Set(deck1).cardinality())))
Checkpoint 4.3.12. WebWork - Equally Likely.
So, by counting actual "equally likely" outcomes these probabilities are easy to compute.
Checkpoint 4.3.13. WebWork - Easy Probabilities.
Notice how the probabilities look similar to relative frequencies. It's just the case that you are counting ALL of the individual simple possibilities that lead to a success.