View the step-by-step solution to:

# 25 4. AN EXPECTATION EXAMPLE Example: Matching Problem. If n people throw their hats in a pile and then randomly pick up a hat from the pile, what is...

Sorry for the long attachment. I have a question only related to the pink highlighted part of the third picture. However, I included other parts of the solution for reference.   Q1. I don't understand "if we sum up \$\$P(E_{(i_1,...,i_n)}) \$\$ over all \$\$n!\$\$" is supposed to mean. Since there are \$n!\$ ways to permutate, wouldn't \$\$P(E_{(i_1,...,i_n)}) = 1\$\$

Q2. I know that \$\$ frac{n!}{r!(n-r)!}\$\$ means \$\$n\$\$ choose \$\$r\$\$. However, I don't understand what is the meaning of dividing the "sum" by \$\$r!(n-r)!\$\$ means in this context?

Thank you. 25 4. AN EXPECTATION EXAMPLE Example: Matching Problem. If n people throw their hats in
a pile and then randomly pick up a hat from the pile, what is the
probability that exactly 1' people retrieve their own hat? Solution: First consider 1' = n, so that everyone retrieves their own
hat. This case is relatively easy. The problem is equivalent to saying
that we take a random permutation ofthe integers 1,. . . , n and asking
what is the probability that we choose one particular permutation (the
one corresponding to all persons retrieving their own hat)_ There are
a total of n! possible permutations and only one corresponding to
all persons retrieving their own hat, so the probability that everyone
retrieves their own hat is l/nl. Secondly, consider r = n — 1. This case is also easy, because it's
logically impossible for exactly an. — 1 persons to retrieve their own hat,
so the probability of this is 0. For 0 g 1' g n — 2 the solution is not as trivial. There is more than
one way to approach the problem, and we'll consider a solution that
uses conditioning later in the week. Here we'll consider a more direct
approach. Let A, be the event that person i retrieves his/ her own hat. Note
that P(A,) = l/n for all 1'. We can see this because asking that the
event A,- occur is logically the same thing as asking for a permutation
of the integers {1, 2, . . . , n} that leaves the integer i in the ith position
(i.e. 1' doesn't move). But we're allowed to perm ute the other 31— 1 in—
tegers any way we want, so we see that there are (n—l)! permutations
that leave integer 2' alone. So if we assume that all permutations are
equally likely we see that P(A,-) = (n — 1)!/n! = 1/30.. In fact, using
exact the same type of argument we can get the probability that any
particular set of persons retrieves their own hat. Let {i1,. . . , is} be a
particular set of .5 persons (e.g. .s = 4 and {2, 4, 5, 7} are the persons). 27 Then leaving positions i1, . . . ,is alone, we can permute the remaining
n — 8 positions any way we want, for a total of (n — s)! permutations
that leave positions i1, . . . ,is alone. Therefore, the probability that
persons 2'1, . . . ,2&quot;, all retrieve their own hats is (n — s)!/'n.!. That is, mm m.— — g—Wl' However these are not quite the probabilities lthat we' re asking about
(though we ’ll want to use them eventually, so remember them), be-
cause if we take .3 = l&quot; and consider the above event that persons
31,. . . ,1&quot;, all retrieved their own hat, this event doesn’t preclude the
possiblity that other persons (or even everyone) also retrieved their
own hat. What we want are the probabilities of events like the following: El (31v- win): Ail n“ n Air ﬂ Air“ 0 n A1“: where (11,... , in) Is some permutation of ( , . . . ,n). Event E(i1,---,in)
says that persons i1, . . . ,i, retrieved their own hat but that persons
3,1,1,“ . ,1}, did not. For a particular (i1, . . . ,z'n), that would be one way for the event of 7' persons retrieving their own hat to occur. These
events Emmm are the right events to be considering, because as we
let (1'1, . . . , in) vary over all possible permutations, we get all the possi-
ble ways for exactly 1&quot; persons to retrieve their own hat. However, here
we need to be careful in our counting, because as we vary (:1, . . . ,in)
over all possible permutations we are doing some multiple counting of
the same event. For example, suppose n = 5 and 7' = 3. Then, if you
go examine the way we’ve defined the event E(,-,,,-21,-33,-41,5) in general,
you’ll see that the event E(1,2,3,4,5) is the same as the event E(3,2,1,4’5)
or the event E(3’251’5’4). In general, if we have a particular permutation (i1, . . . , in) and con- sider the event 152mm,”), we can permute the first '1&quot; positions any way 28
4 . AN EXPECTATION EXAMPLE
we want and also permute the last ~ - &quot; positions any way we want
and we'll still end up with the same event . Since there are r ! ways
to permute the first * positions and for each of these ways there are
( ~ ~ ~) ! ways to permute the last ~ - &quot; positions , in total there are*
r ! ( ~ ~ ~) ! permutations of ( 1 1 . . .. . in ) that lead to the same event
Flix., in ). So that means if we sum up ? ( Elin. in &gt; &gt; over all n ! pos -
sible permutations of all ~ positions , then we should divide that sum
by r ! ( ~ ~ ~) ! and we should end up with the right answer .
The next step is to realize that the events by.in all have the
same probability no matter what the permutation ( 21 . ... . in ) is . This
is so because all permutations are equally likely . This sort of symme-
try reasoning is a very valuable method for simplifying calculations in
problems of this sort and it's important to get a feel for when you can
apply this kind of reasoning by getting practice applying it in problems .
This symmetry immediately simplifies our calculation , because when
we sum P ( Eli .in &gt; ) over all possible permutations , the answer can
be given in terms of any particular permutation , and in particular
[ P ( E`in) ) = n ! P ( }( `) .
( 1 1 , .., in )
So now if we divide this by r ! ( ~ ~ ~ ) ! we should get the right answer :&quot;
n !
P ( exactly r persons retrieve their own hat ) = 1 1/_ ]1 8 ( #` ( 1 . 72 ) .
and now the problem is to figure what is the probability of {` ( 1 .... ) .
which is the event that persons 1 . ... . I retrieve their own hat and
persons r + 1 . .... ~ do not .
Now ( you were probably wondering when we would get to them )
we'll introduce the use of indicator functions . In the interest of a more*
compact notation , let I; denote IA , the indicator of the event that

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents
• ### -

Question & Answers

Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

Ask a Question