Solved

# Wildcards and Statistics

Posted on 2006-05-17
279 Views
I have a stack of numbered and colored cards.
Colors are red, blue, green. Numbers are 1, 2, 3.
There are four copies of each number in each color (a total of 36 numbered cards).

A winning hand contains:
- Four 1's and four 3's, all of the same color (that's 8 red cards OR 8 blue cards OR 8 green cards)
- Three pairs of 2's, one in each color (that's 2 red cards AND 2 blue cards AND 2 green cards)

There are 8 jokers/wildcards, which may be used in place of any of the numbered cards.

If I draw 14 cards at random, how do I find the probability of drawing a winning hand?

If there were no jokers, then the number of ways to draw a winning hand is (8c8 * 3c1) * ((4c2)^3 * 3c3) = 648, and the number of ways to draw any hand is 36c14 = 3 796 297 200, yielding a probability of 1.78E-71.

But I don't know how to add in the jokers.
0
Question by:snoyes_jw

LVL 26

Expert Comment

The jokers give you more cards from which to draw but they also increase the number of winning hands
for example a winning type 2 hand would be, in addition to the hands you have used, 1 red + 1j or 2j (repeat for the other color combination needed)
0

LVL 33

Author Comment

Obviously.

But since there are 14 cards in the hand, and I have only 8 jokers, I can't just add a joker for each one. If all the 1's and 3's are replaced with jokers, there are none left for the 2's.  So the sets of 2's are no longer independent from the sets of 1's and 3's.
0

LVL 26

Expert Comment

You do the calcultion exactly the same as you did befor except that now you draw from 44 cards and there are more winning hands.
True you only have 8 jokers but you have only 4 green 1s.
0

LVL 33

Author Comment

That doesn't really answer the question.
0

LVL 84

Expert Comment

I count 648 winning hands with 0 jokers
6480 winning hands with 1 jokers
29700 winning hands with 2 jokers
82704 winning hands with 3 jokers
156390 winning hands with 4 jokers
212628 winning hands with 5 jokers
214659 winning hands with 6 jokers
163800 winning hands with 7 jokers
94752 winning hands with 8 jokers
for a total of
961761 out of 44C14
0

LVL 33

Author Comment

And how do you arrive at those numbers, ozo?
0

LVL 84

Expert Comment

Tediously.
for 0 jokers
8c0 * (4c4 * 4c4)*3 * 4c2 * 4c2 * 4c2
for 1 joker
8c1 * (4c3 * 4c4)*3 * 4c2 * 4c2 * 4c2
+
8c1 * (4c4 * 4c3)*3 * 4c2 * 4c2 * 4c2
+
8c0 * (4c4 * 4c4)*3 * 4c1 * 4c2 * 4c2
+
8c0 * (4c4 * 4c4)*3 * 4c2 * 4c1 * 4c2
+
8c0 * (4c4 * 4c4)*3 * 4c2 * 4c2 * 4c1
...
0

LVL 84

Accepted Solution

for 1 joker
8c1 * (4c3 * 4c4)*3 * 4c2 * 4c2 * 4c2
+
8c1 * (4c4 * 4c3)*3 * 4c2 * 4c2 * 4c2
+
8c1 * (4c4 * 4c4)*3 * 4c1 * 4c2 * 4c2
+
8c1 * (4c4 * 4c4)*3 * 4c2 * 4c1 * 4c2
+
8c1 * (4c4 * 4c4)*3 * 4c2 * 4c2 * 4c1
0

LVL 33

Author Comment

Ok, I follow that.  If you'll kindly check how to do it with 2 jokers, I think I can follow the pattern for the rest.  I used the following, and it came to 831600:

8c2 * (4c2 * 4c4)*3 * 4c2 * 4c2 * 4c2
+
8c2 * (4c4 * 4c2)*3 * 4c2 * 4c2 * 4c2
+
8c2 * (4c3 * 4c3)*3 * 4c2 * 4c2 * 4c2
+
8c2 * (4c4 * 4c4)*3 * 4c0 * 4c2 * 4c2
+
8c2 * (4c3 * 4c4)*3 * 4c1 * 4c2 * 4c2
+
8c2 * (4c4 * 4c3)*3 * 4c1 * 4c2 * 4c2
+
8c2 * (4c4 * 4c4)*3 * 4c2 * 4c0 * 4c2
+
8c2 * (4c3 * 4c4)*3 * 4c2 * 4c1 * 4c2
+
8c2 * (4c4 * 4c3)*3 * 4c2 * 4c1 * 4c2
+
8c2 * (4c4 * 4c4)*3 * 4c1 * 4c1 * 4c2
+
8c2 * (4c4 * 4c4)*3 * 4c2 * 4c2 * 4c0
+
8c2 * (4c3 * 4c4)*3 * 4c2 * 4c2 * 4c1
+
8c2 * (4c4 * 4c3)*3 * 4c2 * 4c2 * 4c1
+
8c2 * (4c4 * 4c4)*3 * 4c1 * 4c2 * 4c1
+
8c2 * (4c4 * 4c4)*3 * 4c2 * 4c1 * 4c1
0

LVL 33

Author Comment

And I calculate the results for 1 joker as 51840, using the expression you posted.
0

LVL 84

Expert Comment

You're right, I miscounted the first time, forgeting to multiply by 8c2
Also watch out for
8c8 * (4c0 * 4c0)*1 * 4c2 * 4c2 * 4c2
not
8c8 * (4c0 * 4c0)*3 * 4c2 * 4c2 * 4c2

0

LVL 33

Author Comment

Groovy.
0

## Featured Post

### Suggested Solutions

Introduction This article discusses the Chain of Responsibility pattern, explaining What it is;Why it is; andHow it is At the end of this article, I hope you will be able to describe the use and benefits of Chain of Responsibility.  Backgrou…
Dependencies in Software Design In software development, the idea of dependencies (http://en.wikipedia.org/wiki/Coupling_%28computer_programming%29) is an issue of some importance. This article seeks to explain what dependencies are and where they …
Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…