Robert_V._Hogg,_Joseph_W._McKean,_Allen_T._Craig

(Jacob Rumans) #1
1.3. The Probability Set Function 17

bday = function(n){ bday = 1; nm1 =n-1
for(j in 1:nm1){bday = bday*((365-j)/365)}
bday <- 1 - bday; return(bday)}

Assuming that the filebday.Rcontains this function, here is the R segment com-
putingP(A)forn= 10:



source("bday.R")
bday(10)
[1] 0.1169482



For our last counting rule, as with permutations, we are drawing from a setA
of n elements. Now, suppose order is not important, so instead of counting the
number of permutations we want to count the number of subsets ofkelements
taken fromA.Weusethesymbol

(n
k

)
to denote the total number of these subsets.
Consider a subset ofkelements fromA. By the permutation rule it generates
Pkk=k(k−1)···1=k! permutations. Furthermore, all these permutations are
distinct from the permutations generated by other subsets ofkelements fromA.
Finally, each permutation ofkdistinct elements drawn fromAmust be generated
by one of these subsets. Hence, we have shown thatPkn=


(n
k

)
k!; that is,
(
n
k

)
=

n!
k!(n−k)!

. (1.3.6)


We often use the terminology combinations instead of subsets. So we say that there
are

(n
k

)
combinationsofkthings taken from a set ofnthings. Another common
symbol for


(n
k

)
isCkn.
It is interesting to note that if we expand the binomial series,

(a+b)n=(a+b)(a+b)···(a+b),

we get


(a+b)n=

∑n

k=0

(
n
k

)
akbn−k, (1.3.7)

because we can select thekfactors from which to takeain

(n
k

)
ways. So

(n
k

)
is also
referred to as abinomial coefficient.

Example 1.3.4(Poker Hands).Let a card be drawn at random from an ordinary
deck of 52 playing cards that has been well shuffled. The sample spaceCconsists of
52 elements, each element represents one and only one of the 52 cards. Because the
deck has been well shuffled, it is reasonable to assume that each of these outcomes
has the same probability 521. Accordingly, ifE 1 is the set of outcomes that are
spades,P(E 1 )=^1352 =^14 because there are 13 spades in the deck; that is,^14 is the
probability of drawing a card that is a spade. IfE 2 is the set of outcomes that
are kings,P(E 2 )= 524 = 131 because there are 4 kings in the deck; that is, 131 is
the probability of drawing a card that is a king. These computations are very easy

Free download pdf