# Math Help - Newbie help please

1. ## Newbie help please

I have used some basic inferential statistics at work but have not really done much on probability before. (School was a long time ago!) I was wondering if someone could help me with the following:

I have 2 normal decks of cards. I pull out 6 cards at random from the first deck and then pull out 6 cards at random from the second deck.

I wanted to know two things.

1) What the probability is of one of the six cards drawn from deck B being a match with one of the six cards drawn from deck A.

2) What the probability is of two of the six cards drawn from deck B being a match with two of the cards drawn from deck A

I calculated the first problem by working out the probability of not having a match and then subtracting it from 1. i.e for the first card drawn from deck B there is 46 in 52 chance that the card wont match, for the second card drawn there will be a 45 in 51 chance (as there is now one less card in the deck.) and so on.

Eg 46/52 x 45/51 x 44/50 x 43/49 x 42/48 x 41/47 = .46 therefore 1-.46 = .54. Hence the probability of having one card match is 54%

Although I think this is correct, I can’t quite figure out how to go about working out the second problem.

Can anyone give me a point in the right direction please.
Cheers

2. Originally Posted by emersong
1) What the probability is of one of the six cards drawn from deck B being a match with one of the six cards drawn from deck A.
I understand this question as:

Given 6 cards, what is probability there is at least one pair.

He have the following cases,
Code:
MMXXXX
MXMXXX
...
Where "M" stands for match and "X" stands for any. There are 14 cases if you write out the list. In each of these cases the probability is:
(52/52) ---> The first card being any card.
(3/51) ---> The next card got to match.
(50/50) ---> The next can be anything.
(49/49) ---> The next can be anything.
(48/48) ---> The next can be anything.
(47/47) ---> The next can be anything.
Multiply then out to get,
3/51 = 1/17
Now multiply this by 12 because that is the number of disjoint cases:
(12/17)

3. Originally Posted by galactus
Oops, I see PH got something different.
It does not mean you are wrong. Perhaps we understand the problem differently, or perhaps I did it wrong.

My understanding is this.

6 cards are dealt. What is the probability that 2 of those cards match (have same number).

4. There are C(52,6) possible 6-card hands from deck A. Pick any one of those.
There are C(46,6) possible 6-card hands from deck B that have no card in common with the hand we picked from deck A.
Therefore the probability of at least one match is: $1 - \frac{C(46,6)}{C(52,6)} = 0.5399$

That agrees with emersong.

5. Originally Posted by Plato
Therefore the probability of at least one match is: $1 - \frac{C(46,6)}{C(52,6)} = 0.5399$

That agrees with emersong.
I think that is why my answer does not agree with yours. If you follow what I did, I am sure it was perfectly right. I partitioned the cases into disjoint sets and summed each one up. But still that does not do the "at least" part.

6. Hi guys and thanks for the help. Unfortunately I am still confused.

Sorry for not explaining it too well.

The reason for two decks is that I was treating each card as unique, not just looking to see if it was the same number. So...

(Where H = Hearts, C = Clubs, S = Spades, D = Diamonds)

Deck 1... 1H,2D,3S,4C,5S,6D
Deck 2... 8H,9S,1S,3S,7S,4H

In the above example the 3 of spades (3S) repeats.

I also wanted to know the probability of getting 2 cards to repeat.

Deck 1... 1H,2D,8H,4C,5S,9S
Deck 2... 7H,9S,1S,8H,7S,4H

In the above example the 8 of hearts and the 9 of spades both repeat.

I did a little program in excel and ran 10,000 trials, For the first problem I got a probability of .545. This is very near to the probability of .54 that I calculated.

Although I am not sure how to work out the second case, I did the simulation and the probability came out as .142.

So I know the answer to the question, I just would like to understand how I got there!

Thanks again for your help.

7. Hello, emersong!

We need some clarification . . .

I have two normal decks of cards.
I pull out 6 cards at random from the first deck
and then pull out 6 cards at random from the second deck.

1) What is the probability that one of the cards drawn from deck B
matches one of the cards from deck A?

2) What is the probability that two of the cards drawn from deck B
matches two of the cards from deck A?
In part (1), if you mean exactly one match, that's a different game entirely.

Six cards are drawn from deck A.
. . They can be any six cards.
There are: . $C(52,6) = 20,358,520$ possible six-card hands.

1) Among the six cards from deck B, there must be exactly one match
. . . (and five non-matches).

There are: . $C(6,1)$ ways to get one match.
There are: . $C(46,5)$ ways to get five non-matches.

Hence, there are: . $C(6,1)\cdot C(46,5) \:=\:(6)(1,370,754) \:=\:8,224,425$ ways.

Therefore: . $P(\text{exactly 1 match}) \;=\;\frac{8,224,524}{20,358,520} \:=\:0.403984376 \:\approx\:40.4\%$

2) Among the six cards from deck B, there must be exactly two matches
. . . (and four non-matches).

There are: . $C(6,2)$ ways to have two matches.
There are: . $C(46,4)$ ways to have four non-matches.

Hence, there are: . $C(6,2)\cdot C(46,4) \:=\:(15)(163,185) \:=\:2,447,775$ ways.

Therefore: . $P(\text{exactly 2 matches}) \:=\:\frac{2,447,775}{20.358,520} \:=\:0.120233445 \:\approx\:12.0\%$

8. Do you understand what we said about “at least one” matching pair?
The 54% accounts for anywhere from one to six matching pairs.
In you first example there is exactly one matching pair. The probability of that happening is $\frac {6C(46,5)} {C(52,6)} \approx 40.3\%$

For exactly two matching pairs, the probability of that happening is $\frac {C(6,2)C(46,4)} {C(52,6)} \approx 12\%$

9. Firstly, thanks to everyone for their help.

I think I get it, just to recap...

For exactly 3 matches it would be:

C(6,3)xC(46,3)= 20 x 15,180 = 30,360 ways

Hence:

P(exactly 3 matches) = 30,360 / 20,358,520 = 0.0149

And P(one or more matches) = 0.54

Just out of interest, what would;

P(two or more matches) be?

10. The probability of two or more matches is $\sum\limits_{k = 2}^6 {\frac{{C(6,k)C(46,6 - k)}}{{C(52,6)}}}.$

The probability of N or more matches is $\sum\limits_{k = N}^6 {\frac{{C(6,k)C(46,6 - k)}}{{C(52,6)}}}.$

11. Originally Posted by Plato
The probability of two or more matches is $\sum\limits_{k = 2}^6 {\frac{{C(6,k)C(46,6 - k)}}{{C(52,6)}}}.$

The probability of N or more matches is $\sum\limits_{k = N}^6 {\frac{{C(6,k)C(46,6 - k)}}{{C(52,6)}}}.$

It's sunk in now. (Doh!) Well it's been a long day!

Thanks
EmersonG

12. Originally Posted by emersong
The probability of two or more matches is .262 right?
No, I get 0.136.

$\frac{{C(6,k)C(46,6 - k)}}{{C(52,6)}} = \frac{{\left( {\frac{{6!}}{{k!\left( {6 - k} \right)!}}} \right)\left( {\frac{{46!}}{{\left[ {\left( {6 - k} \right)!} \right]\left[ {\left( {k + 40} \right)!} \right]}}} \right)}}{{\frac{{52!}}{{6!(46!)}}}}$