# Thread: Simple probability question. Involves drawing name for gift.

1. ## Simple probability question. Involves drawing name for gift.

We had a dinner with my family where we draw names to give gift this christmas. The only rule was to not pick our name.

We did it a couple of time because we kept picking our name.

Finally we succeded and i started to think about what was the probability of someone picking his own name thus making this fail.

I built an excel simulation program which simulate drawing and got a consistent 50 % failure chance for 2 persons, about 66 % for 3 persons...and so on...but it's like there is a somekind of a maximum of about 68 % as i add people to my simulation.

For 6 persons i get 68 % failure and for 100 persons, it's about the same. I don't understand why that is.

So i started thinking...and the figures that i think it should be is about :

success rate should be 1/number of person, so 1/6 for 6 persons so a failure rate of 5/6....

Can anyone explain me what i should be getting ?

2. Originally Posted by moris7
We had a dinner with my family where we draw names to give gift this christmas. The only rule was to not pick our name
We did it a couple of time because we kept picking our name.
Finally we succeded and i started to think about what was the probability of someone picking his own name thus making this fail.
Just to be clear on the question: “Six people draw names from the hat.
What is the probability that no one draws his/her own name?
If that is the question, there is a well-known answer. These are derangements.
The number of derangements on six objects is $\displaystyle D(6)=265$.
So the probability no one has a match is $\displaystyle \frac{265}{6!}=0.3681$.
Subtracting that number from 1, gives the probability of at least one match.

BTW: If $\displaystyle n\ge 3$ then a very close approximation of $\displaystyle D(n) \approx \frac{{n!}}{e}$.
$\displaystyle \frac{6!}{e}=264.873197643438$

3. Thank you very much for your answer...this seems like the right answer...i will try to see why my simulation does not point exactly toward this number.

4. It's because of excel random function which is clearly not random.

5. ## a descriptive title

I solved it once without derangements... think of this name-drawing as a permutation where each spot represents a person... and then those spots get filled in with their names (ie 1 through 6) in some order.... 123456 143265 654312 etc... being in the correct spot represents drawing your own name.

• Number of permutations where all 6 draw their name: 1

• Number of permutations where exactly five draw their own name: 0 (it's impossible)

• Number of permutations where exactly four draw their own name: 6C4*1 = 15

• Number of permutations where exactly three draw their own name: 6C3*2=40 (6C3 ways to choose which three draw their own names and 2 ways for the remaining people to not draw their names)

• Number of permutations where exactly two draw their own name: 6C2*Q where Q=the number of ways for four people to not draw their own name.

To get Q you have to recursively use the previous steps... think permutations like 1243 1234 etc.

permutations (length 4) where all 4 draw their own name: 1
permutations where exactly 3 draw their own name: 0
permutations where exactly 2 draw their own name: 4C2*1=6
permutations where exactly 1 draws their own name: 4C1*2=8
permutations where none draw their own name: (4x3x2x1)-(1+6+8)=9
therefore Q=9
6C2*Q=6C2*9= 135 and therefore there are 135 permutations (length 6) where exactly 2 people draw their own name.
• number of permutations where exactly 1 person draws their own name: 6C1*L where L is the number of ways for 5 people to not draw their own names

permutations (length 5) where all 5 draw their own name: 1
permutations where exactly 4 draw their own name: 0
permutations where exactly 3 draw their own name: 5C3*1= 10
permutations where exactly 2 draw their own name: 5C2*2= 20
permutations where exactly 1 draws their own name: 5C1*Q=5C1*9= 45
permutations where none draw their own name: (5x4x3x2x1)-(1+10+20+45)=44
therefore L=44
6C1*L=6C1*44= 264 and therefore there are 264 permutations (length 6) where exactly 1 person draws their own name.
Therefore, the probability of no one drawing their own name in a group of six people is:
1-P(1 or 2 or 3 or 4 or 5 or 6 people draw their own name)
=1- (1+15+40+135+264)/(6x5x4x3x2x1)
=0.36805555555