| |
 |
|
|
Recreational Groups Forum Index » Puzzles » No Four Cards Are of the Same Rank?
Page 2 of 2 Goto page Previous 1, 2
|
| Author |
Message |
| qquito |
Posted: Mon Jul 20, 2009 11:08 pm |
|
|
|
Guest
|
On Jul 20, 6:34 pm, "Stephen J. Herschkorn" <sjhersc...@netscape.net>
wrote:
Quote: .........
But is this the answer to the modified problem, i.e., Case 2 of QD,
the one with 2 jokers removed?
Huh? This is the probability that you are dealt at least one
four-of-a-kind and *no* jokers, which is QD's case 2. To get the
probability of being dealt at least one four-of-a-kind (where jokers
count), you must add the probabilities of the cases of exactly one joker
and of two jokers. Then subrtract this sum from 1 to obtain the
probability of no four-of-a-kind. .
--
Stephen J. Herschkorn sjhersc...@netscape.net
That I understand. Thank you for reminding! Additionally, still in
Case 2 only, I assume that the number of possibilities that include
"at least TWO four-of-a-kinds" would be
C(13,2) C(44,10) - C(13,3) C(40,6) + C(13,4) C(36,2)
Is this correct?
--Roland |
|
|
| Back to top |
|
| Mark Tilford |
Posted: Tue Jul 21, 2009 2:12 am |
|
|
|
Guest
|
On 2009-07-20, Mark Brader <msb@vex.net> wrote:
Quote:
D. Gates:
Hey! A number! :-)
.877 is something I can sink my teeth into!
Ever since this thread started, I've been waiting for a number. If
you pull about a third of the cards out of a deck, what are the odds
you'll have a 4-of-a-kind in your hand? Is it greater than 50%? And
I kept reading the replies, waiting for an answer I could understand.
So, is it about 88%? That's a pleasant little surprise, it being
higher than one would expect.
No, it isn't.
If the jokers were dead cards instead of wild cards, and you ignored
the problem of double-counting hands with two or more sets of 4, the
probability of getting a 4-of-kind would just be (13C1*50C14)/54C18,
which is 13 * 18*17*16*15 / (54*53*52*51) = 954720/7590024 or about 1/8.
Since the chance of a second set is small, this is a decent estimate
of the actual probability ignoring the jokers.
Whoops; that calculation treated jokers as dead cards.
(def-auto count-up (choose avail jokers)
(cond ((or (> choose avail) (< avail 0)) 0)
((= choose 0) 1)
(t (loop for i from 0 to 4
sum (if (< (+ i jokers) 4)
(* (c i 4) (count-up (- choose i) (- avail 4) jokers)))
0)))))
(defun count-up-b()
(+ (count-up 18 52 0) (* 2 (count-up 17 52 1)) (count-up 16 52 2)))
(defun count-up-c()
(+ (count-up 18 52 -1) (* 2 (count-up 17 52 -1)) (count-up 16 52 -1)))
Revised answer is 684046854656/1491174593517 or ~ .459
Quote:
Now again using an estimate, we pretend the chance of drawing each
each joker is *independently* 18/54 = 1/3. Again, not accurate but
close. So there's a 1/9 chance that you'll get both jokers, 4/9 that
you get one, and 4/9 that you don't get any. Two jokers guarantees
a set of 4 and one joker increases the probability above 1/8.
So the final answer must be somewhere between (4/9 * 1/  + 4/9 + 1/9,
which is 0.61+, and (4/9 + 4/9) * 1/8 + 1/9, which is 2/9 = 0.22+.
I did this simple experiment:
deck="JOK JOK
01S 01H 01D 01C
02S 02H 02D 02C
03S 03H 03D 03C
04S 04H 04D 04C
05S 05H 05D 05C
06S 06H 06D 06C
07S 07H 07D 07C
08S 08H 08D 08C
09S 09H 09D 09C
10S 10H 10D 10C
11S 11H 11D 11C
12S 12H 12D 12C
13S 13H 13D 13C"
for i in `iota 10000` # 10,000 trials
do
deal=`jum -18 $deck` # 18 cards from the deck
joke=`echo "$deal" | grep -c JOK` # number of jokers
need=`expr 4 - $joke` # number of matching cards to make a set
sets=`echo "$deal" | grep -v JOK | sed 's/.$//' |
sort | uniq -c | awk '$1 >= '"$need" | wc -l`
echo $joke jokers, $sets sets
done | sort | uniq -c
Certainly not very efficient, but simple to write and understand.
("iota" and "jum" are two little scripts of mine: one counts from
1 to N, and the other selects the indicated number of items at random.)
On the first try I got these results:
3780 0 jokers, 0 sets
615 0 jokers, 1 sets
18 0 jokers, 2 sets
834 1 jokers, 0 sets
2060 1 jokers, 1 sets
1342 1 jokers, 2 sets
288 1 jokers, 3 sets
15 1 jokers, 4 sets
6 2 jokers, 2 sets
77 2 jokers, 3 sets
337 2 jokers, 4 sets
427 2 jokers, 5 sets
182 2 jokers, 6 sets
19 2 jokers, 7 sets
So on this run, about 0.54 of the trials had at least one set of 4.
Of course this result is only as good as the random-number function
and is subject to random variation, but it seems about right. |
|
|
| Back to top |
|
| Stephen J. Herschkorn |
Posted: Tue Jul 21, 2009 2:34 am |
|
|
|
Guest
|
qquito wrote:
Quote: On Jul 20, 3:37 am, "Stephen J. Herschkorn" <sjhersc...@netscape.net
wrote:
qquito wrote:
On Jul 19, 9:20 pm, "Stephen J. Herschkorn" <sjhersc...@netscape.net
wrote:
qquito wrote:
On Jul 19, 8:38 pm, "Stephen J. Herschkorn" <sjhersc...@netscape.net
wrote:
.........
QD was indeed imprecise in his/her wording, though s/he did say "at
least one," not "just ONE." AS QD notes, you need to follow this up
with the inclusion-exclusion formula.
The number of ways of getting no jokers and at least one four-of-a-kind is
13C(48,14) - C(13,2) C(44,10) + C(13,3) C(40,6) - C(13,4) C(36,2).
--
Stephen J. Herschkorn sjhersc...@netscape.net
I see. Though it is still a challenge to get a numerical
solution.
Not really. Just plug it all in.
--
Stephen J. Herschkorn sjhersc...@netscape.net
I gave it a try.:
C(52,1  =42671977361650,
C(13,1)C(48,14)-C(13,2)C(44,10)+C(13,3)C(40,6)-C(13,4)C(36,2)
=6077727399666,
42671977361650 / 6077727399666 = 0.14242900787457186017.
That is not the final answer to your problem. The count above was only
one step.
But is this the answer to the modified problem, i.e., Case 2 of QD,
the one with 2 jokers removed?
Huh? This is the probability that you are dealt at least one
four-of-a-kind and *no* jokers, which is QD's case 2. To get the
probability of being dealt at least one four-of-a-kind (where jokers
count), you must add the probabilities of the cases of exactly one joker
and of two jokers. Then subrtract this sum from 1 to obtain the
probability of no four-of-a-kind. .
--
Stephen J. Herschkorn sjherschko@netscape.net
Math Tutor on the Internet and in Central New Jersey |
|
|
| Back to top |
|
| Mark Brader |
Posted: Tue Jul 21, 2009 3:13 am |
|
|
|
Guest
|
Mark Tilford:
Quote: Revised answer is 684046854656/1491174593517 or ~ .459
Ah, rereading the original problem (not to mention the subject line),
I now see that it asked for the probability of *not* having a set of 4.
In that case the result from my experiment
Quote: So on this run, about 0.54 of the trials had at least one set of 4.
should have been expressed the other way: about 0.46 of the trials did
not have one. So the other Mark's computation and my experiment are
in agreement.
--
Mark Brader | "One reason that life is complex is that it has
Toronto | a real part and an imaginary part."
msb@vex.net | --Andrew Koenig
My text in this article is in the public domain. |
|
|
| Back to top |
|
| Stephen J. Herschkorn |
Posted: Tue Jul 21, 2009 5:58 am |
|
|
|
Guest
|
qquito wrote:
Quote: Additionally, still in Case 2 only, I assume that the number of possibilities that include
"at least TWO four-of-a-kinds" would be
C(13,2) C(44,10) - C(13,3) C(40,6) + C(13,4) C(36,2)
Is this correct?
Correct.
--
Stephen J. Herschkorn sjherschko@netscape.net
Math Tutor on teh Internet and in Central New Jersey |
|
|
| Back to top |
|
| RichD |
Posted: Tue Jul 21, 2009 6:17 am |
|
|
|
Guest
|
On Jul 20, 11:02 am, qquito <qqu...@hotmail.com> wrote:
Quote: A complete deck of playing cards consists of 4 suits, each
ranking from 1 through 13, and 2 jokers. The total number of
the cards is thus 54.
Now you RANDOMLY pick 18 cards from among the 54.
Randomly... according to which probability density?
Uniform density. In other words, each and every card gets an equal
chance to be picked. --Roland
bravo
But when people propose a question like this,
and say "completely at random", they mean
uniform, but never explicitly. Which often
creates problems...
--
Rich |
|
|
| Back to top |
|
| James Waldby |
Posted: Tue Jul 21, 2009 8:47 am |
|
|
|
Guest
|
On Mon, 20 Jul 2009 12:33:48 -0500, Mark Brader wrote:
[snip]
Quote: I did this simple experiment:
deck="JOK JOK
01S 01H 01D 01C
02S 02H 02D 02C
03S 03H 03D 03C
04S 04H 04D 04C
05S 05H 05D 05C
06S 06H 06D 06C
07S 07H 07D 07C
08S 08H 08D 08C
09S 09H 09D 09C
10S 10H 10D 10C
11S 11H 11D 11C
12S 12H 12D 12C
13S 13H 13D 13C"
for i in `iota 10000` # 10,000 trials
do
deal=`jum -18 $deck` # 18 cards from the deck
[snip rest of sh shell script]
Certainly not very efficient, but simple to write and understand.
("iota" and "jum" are two little scripts of mine: one counts from 1 to
N, and the other selects the indicated number of items at random.)
On the first try I got these results:
[snip results]
Your "iota" and "jum" scripts might be unnecessary. Linux systems
have 'seq' to generate arithmetic sequences, and BSD systems have
'jot'. `seq 10000` should substitute directly for `iota 10000`.
A substitute for "deal=`jum -18 $deck`" would be
"deal=`echo $deck| tr ' ' '\n' | sort -R | head -18`".
sort -R uses a different random seed for each use.
An inelegant (but perhaps more efficient) alternative to
"for i in `iota 10000`; do ..." is
"i=0; while [ $i -lt 10000 ]; do i=`dc -e "$i 1+p"` ..."
--
jiw |
|
|
| Back to top |
|
| Mark Brader |
Posted: Tue Jul 21, 2009 8:53 am |
|
|
|
Guest
|
James Waldby:
Quote: Your "iota" and "jum" scripts might be unnecessary. Linux systems
have 'seq' to generate arithmetic sequences, and BSD systems have
'jot'. ...
Of course. I use 'em because I'm used to 'em.
--
Mark Brader, Toronto "Logic is logic. That's all I say."
msb@vex.net -- Oliver Wendell Holmes |
|
|
| Back to top |
|
| Sylvia Else |
Posted: Tue Jul 21, 2009 1:28 pm |
|
|
|
Guest
|
RichD wrote:
Quote: On Jul 20, 11:02 am, qquito <qqu...@hotmail.com> wrote:
A complete deck of playing cards consists of 4 suits, each
ranking from 1 through 13, and 2 jokers. The total number of
the cards is thus 54.
Now you RANDOMLY pick 18 cards from among the 54.
Randomly... according to which probability density?
Uniform density. In other words, each and every card gets an equal
chance to be picked. --Roland
bravo
But when people propose a question like this,
and say "completely at random", they mean
uniform, but never explicitly. Which often
creates problems...
--
Rich
Why would they intend anything else in the context of a question like this?
Sylvia. |
|
|
| Back to top |
|
| Old Earl |
Posted: Wed Jul 22, 2009 11:48 pm |
|
|
|
Guest
|
On Jul 19, 5:21 pm, "Stephen J. Herschkorn" <sjhersc...@netscape.net>
wrote:
Quote: qquito wrote:
A complete deck of playing cards consists of 4 suits, each ranking
from 1 through 13, and 2 jokers. The total number of the cards is thus
54.
Now you RANDOMLY pick 18 cards from among the 54. What is the
probability that no four cards of the 18 cards are of the same rank?
(In other words, for each given rank, there are no more than 3 suits.)
QD has submitted a pretty much complete solution elswhere in this
thread. For your amusement, I now pose a related problem:
Determine the expected value and variance of the number of
four-of-a-kinds in your eighten-card hand.
--
Stephen J. Herschkorn sjhersc...@netscape.net
Math Tutor on the Internet and in Central New Jersey
I resorted to a simulation to understand the details, so the
approximate value for the mean and variance, assuming
the jokers are not wild, is .1255 and .1163, respectively.
Earl |
|
|
| Back to top |
|
| Stephen J. Herschkorn |
Posted: Thu Jul 23, 2009 4:28 am |
|
|
|
Guest
|
Old Earl wrote:
Quote: On Jul 19, 5:21 pm, "Stephen J. Herschkorn" <sjhersc...@netscape.net
wrote:
qquito wrote:
A complete deck of playing cards consists of 4 suits, each ranking
from 1 through 13, and 2 jokers. The total number of the cards is thus
54.
Now you RANDOMLY pick 18 cards from among the 54. What is the
probability that no four cards of the 18 cards are of the same rank?
(In other words, for each given rank, there are no more than 3 suits.)
QD has submitted a pretty much complete solution elswhere in this
thread. For your amusement, I now pose a related problem:
Determine the expected value and variance of the number of
four-of-a-kinds in your eighten-card hand.
--
Stephen J. Herschkorn sjhersc...@netscape.net
Math Tutor on the Internet and in Central New Jersey
I resorted to a simulation to understand the details, so the
approximate value for the mean and variance, assuming
the jokers are not wild, is .1255 and .1163, respectively.
Approximation by simulation is unnecessary. Exact values can be computed
efficiently.
--
Stephen J. Herschkorn sjherschko@netscape.net
Math Tutor on the Internet and in Central New Jersey |
|
|
| Back to top |
|
| Old Earl |
Posted: Thu Jul 23, 2009 2:10 pm |
|
|
|
Guest
|
On Jul 22, 7:28 pm, "Stephen J. Herschkorn" <sjhersc...@netscape.net>
wrote:
Quote: Old Earl wrote:
On Jul 19, 5:21 pm, "Stephen J. Herschkorn" <sjhersc...@netscape.net
wrote:
qquito wrote:
A complete deck of playing cards consists of 4 suits, each ranking
from 1 through 13, and 2 jokers. The total number of the cards is thus
54.
Now you RANDOMLY pick 18 cards from among the 54. What is the
probability that no four cards of the 18 cards are of the same rank?
(In other words, for each given rank, there are no more than 3 suits.)
QD has submitted a pretty much complete solution elswhere in this
thread. For your amusement, I now pose a related problem:
Determine the expected value and variance of the number of
four-of-a-kinds in your eighten-card hand.
--
Stephen J. Herschkorn sjhersc...@netscape.net
Math Tutor on the Internet and in Central New Jersey
I resorted to a simulation to understand the details, so the
approximate value for the mean and variance, assuming
the jokers are not wild, is .1255 and .1163, respectively.
Approximation by simulation is unnecessary. Exact values can be computed
efficiently.
--
Stephen J. Herschkorn sjhersc...@netscape.net
Math Tutor on the Internet and in Central New Jersey- Hide quoted text -
- Show quoted text -
True, of course. I do often resort to simulation when I want to
understand
what are very difficult to solve exactly. For example, what are the
probabilities that all three hands in any given deal have no four card
sets? And, what are the odds that two hands will each have one four
card
set?
Earl |
|
|
| Back to top |
|
| Mark Tilford |
Posted: Fri Jul 24, 2009 12:11 am |
|
|
|
Guest
|
On 2009-07-23, Old Earl <earl1108@gmail.com> wrote:
Quote:
Approximation by simulation is unnecessary. Exact values can be computed
efficiently.
--
Stephen J. Herschkorn sjhersc...@netscape.net
Math Tutor on the Internet and in Central New Jersey- Hide quoted text -
- Show quoted text -
True, of course. I do often resort to simulation when I want to
understand
what are very difficult to solve exactly. For example, what are the
probabilities that all three hands in any given deal have no four card
sets? And, what are the odds that two hands will each have one four
card
set?
Earl
Actually, it shouldn't be too difficult to do the first problem with a
dynamic programming method.
mjt |
|
|
| Back to top |
|
| Old Earl |
Posted: Fri Jul 24, 2009 2:42 pm |
|
|
|
Guest
|
On Jul 23, 3:11 pm, Mark Tilford <ralphmerri...@gmail.com> wrote:
Quote: On 2009-07-23, Old Earl <earl1...@gmail.com> wrote:
Approximation by simulation is unnecessary. Exact values can be computed
efficiently.
--
Stephen J. Herschkorn sjhersc...@netscape.net
Math Tutor on the Internet and in Central New Jersey- Hide quoted text -
- Show quoted text -
True, of course. I do often resort to simulation when I want to
understand
what are very difficult to solve exactly. For example, what are the
probabilities that all three hands in any given deal have no four card
sets? And, what are the odds that two hands will each have one four
card
set?
Earl
Actually, it shouldn't be too difficult to do the first problem with a
dynamic programming method.
mjt- Hide quoted text -
- Show quoted text -
Oops! I forgot the add the simulation data showing the simultaneous
events groupings. The list shows the total number of 4 card sets for
all three hands, then for each hand in the group, then the number
of occurances in a 1M trial set. The run took 6.3 sec. on my aging
Dell.
Sorted Data
Sum,I,J,K,N
0,0,0,0,685020
1,0,0,1,86270
1,0,1,0,86321
1,1,0,0,86680
2,0,0,2,2115
2,0,1,1,14260
2,0,2,0,2185
2,1,0,1,14218
2,1,1,0,14368
2,2,0,0,2097
3,0,0,3,8
3,0,1,2,454
3,0,2,1,439
3,0,3,0,4
3,1,0,2,471
3,1,1,1,3185
3,1,2,0,431
3,2,0,1,461
3,2,1,0,477
3,3,0,0,6
4,0,1,3,6
4,0,2,2,17
4,0,3,1,1
4,1,0,3,3
4,1,1,2,163
4,1,2,1,136
4,2,0,2,18
4,2,1,1,138
4,2,2,0,19
4,3,0,1,4
5,1,2,2,6
5,1,3,1,2
5,2,1,2,6
5,2,2,1,11
Hope someone else likes to know, approximately,
some interesting stats.
Earl |
|
|
| Back to top |
|
| Stephen J. Herschkorn |
Posted: Sat Jul 25, 2009 2:46 am |
|
|
|
Guest
|
Stephen J. Herschkorn wrote:
Quote: qquito wrote:
A complete deck of playing cards consists of 4 suits, each ranking
from 1 through 13, and 2 jokers. The total number of the cards is thus
54.
Now you RANDOMLY pick 18 cards from among the 54. What is the
probability that no four cards of the 18 cards are of the same rank?
(In other words, for each given rank, there are no more than 3 suits.)
QD has submitted a pretty much complete solution elswhere in this
thread. For your amusement, I now pose a related problem:
Determine the expected value and variance of the number of
four-of-a-kinds in your eighten-card hand.
To those clamoring for numbers:
I must really be crazy - I have much too much else to get done this
weekend. But here goes.
For the probability of no four-of-akind, I get approximately 0.459.
For the expected number of fours-of a-kind, I get approximately 1.135
For the variance of the number of fours-of a-kind, I get approximately
2.184. (The standard deviation is approximately 1.478.)
Methodology:
The expected value iis the easiest:
Let N denote the number of fours-of-a-kind. Let I_i indicate the
appearance of four cards of rank i, for i = 1, 2,..., 13. Then N =
sum(i=1..13, I_i), so EN = 13 EI1 by the linearity of expectation and
symmetry.
EI1 = P{four aces in hand} Break down the counts into three cases:
no jokers: C(48,14)
1 joker: you need exactly three or exactly four aces, and this case
must be counted tiwce (once for each joker).
2[4 C(48,14) + C(48,13)]
2 jokers: 2, 3, or 4 aces. C(4,2) C(48,14) + 4 C(48, 13) + C(48,12).
Add and divide by C(54,1 .
The variance:
Var(N) = Var(sum(i=1..13, I_i)) = 13 Var(I1) + 13*12 Cov(I1, I2).
Var(I1) = EI1 (1 - EI1)
E[I1 I2] = P{four aces and four deuces appear in the hand}. To get
this, you again need to consider the cases of 0, 1, or 2 jokers. When
jokers are present, you need to consider the cases of 2, 3, or 4 of
each rank:
no jokers: C(40, 10)
1 joker: 2[4^2 C(44,11) + 2*4*C(44,10) + C(44,9)]
etc.
To compute the probability of having at least one four of a kind, we
again break down the counts into three cases:
2 jokers: C(52,16), since any hand of sixteen cards must have two of
the same rank.
0 jokers: By inclusion-exclusion,
13C(48,14) - C(13,2) C(44,10) + C(13,3) C(40,6) - C(13,4) C(36, 2)
1 joker: (We will have to multiply this whole think by two, to accoun
fpor each joker):
Let A_i = {exactly 3 of rank i appear}; let B_ i ={exactly 4 of rank i
appear}, and let C_i = A_i U B_i.
PU{i=1..13, C_i} =
sum(i=1..13, PA_i + PB_i) - [sum(i<j, P(A_i A_j) + P(B_i B_j)) +
sum(i!=j, P(A_i B_j))]
+ [sum(i<j<k, P(A_i A_j A_k) + P(B_i B_j B_k))
+ sum(i < j; k != i,j; P(A_i A_j B_k) + P(A_k B_i B_j))]
-... (it gets tedious to type out)
A_i: 4 C(48,14), gets counted 13 times
B_i: C(48,13), gets counted 13 times
A_i A_j: 4^2 C(44,11), get counted C(13,2) times
A_i B_j: 4 C(44,10), gets counted 13*12 times
B_i B_j: C(44, 9), gets counted C(13,2) times
A_i A_j A_k: 4^3 C(40, , gets counted C(13,3) times
A_i A_j B_k: 4^2 C(40, 7), gets counted 13 C(12,2) times
A_i B_j B_k: 4 C(40, 6), gets counted 13 C(12, 2) times
B_i B_j B_k: C(40,5), gets counted C(13,3) times
etc.
I methodically put this all in spreadsheet and checked my entries, so I
*think* it is right. Of course, I may have still made a typo somewhere.
--
Stephen J. Herschkorn sjherschko@netscape.net
Math Tutor on the Internet and in Central New Jersey |
|
|
| Back to top |
|
| Old Earl |
Posted: Tue Jul 28, 2009 9:42 pm |
|
|
|
Guest
|
On Jul 24, 5:46 pm, "Stephen J. Herschkorn" <sjhersc...@netscape.net>
wrote:
Quote: Stephen J. Herschkorn wrote:
qquito wrote:
A complete deck of playing cards consists of 4 suits, each ranking
from 1 through 13, and 2 jokers. The total number of the cards is thus
54.
Now you RANDOMLY pick 18 cards from among the 54. What is the
probability that no four cards of the 18 cards are of the same rank?
(In other words, for each given rank, there are no more than 3 suits.)
QD has submitted a pretty much complete solution elswhere in this
thread. For your amusement, I now pose a related problem:
Determine the expected value and variance of the number of
four-of-a-kinds in your eighten-card hand.
To those clamoring for numbers:
I must really be crazy - I have much too much else to get done this
weekend. But here goes.
For the probability of no four-of-akind, I get approximately 0.459.
For the expected number of fours-of a-kind, I get approximately 1.135
For the variance of the number of fours-of a-kind, I get approximately
2.184. (The standard deviation is approximately 1.478.)
Methodology:
The expected value iis the easiest:
Let N denote the number of fours-of-a-kind. Let I_i indicate the
appearance of four cards of rank i, for i = 1, 2,..., 13. Then N > sum(i=1..13, I_i), so EN = 13 EI1 by the linearity of expectation and
symmetry.
EI1 = P{four aces in hand} Break down the counts into three cases:
no jokers: C(48,14)
1 joker: you need exactly three or exactly four aces, and this case
must be counted tiwce (once for each joker).
2[4 C(48,14) + C(48,13)]
2 jokers: 2, 3, or 4 aces. C(4,2) C(48,14) + 4 C(48, 13) + C(48,12).
Add and divide by C(54,1  .
The variance:
Var(N) = Var(sum(i=1..13, I_i)) = 13 Var(I1) + 13*12 Cov(I1, I2)..
Var(I1) = EI1 (1 - EI1)
E[I1 I2] = P{four aces and four deuces appear in the hand}. To get
this, you again need to consider the cases of 0, 1, or 2 jokers. When
jokers are present, you need to consider the cases of 2, 3, or 4 of
each rank:
no jokers: C(40, 10)
1 joker: 2[4^2 C(44,11) + 2*4*C(44,10) + C(44,9)]
etc.
To compute the probability of having at least one four of a kind, we
again break down the counts into three cases:
2 jokers: C(52,16), since any hand of sixteen cards must have two of
the same rank.
0 jokers: By inclusion-exclusion,
13C(48,14) - C(13,2) C(44,10) + C(13,3) C(40,6) - C(13,4) C(36, 2)
1 joker: (We will have to multiply this whole think by two, to accoun
fpor each joker):
Let A_i = {exactly 3 of rank i appear}; let B_ i ={exactly 4 of rank i
appear}, and let C_i = A_i U B_i.
PU{i=1..13, C_i} > sum(i=1..13, PA_i + PB_i) - [sum(i<j, P(A_i A_j) + P(B_i B_j)) +
sum(i!=j, P(A_i B_j))]
+ [sum(i<j<k, P(A_i A_j A_k) + P(B_i B_j B_k))
+ sum(i < j; k != i,j; P(A_i A_j B_k) + P(A_k B_i B_j))]
-... (it gets tedious to type out)
A_i: 4 C(48,14), gets counted 13 times
B_i: C(48,13), gets counted 13 times
A_i A_j: 4^2 C(44,11), get counted C(13,2) times
A_i B_j: 4 C(44,10), gets counted 13*12 times
B_i B_j: C(44, 9), gets counted C(13,2) times
A_i A_j A_k: 4^3 C(40,  , gets counted C(13,3) times
A_i A_j B_k: 4^2 C(40, 7), gets counted 13 C(12,2) times
A_i B_j B_k: 4 C(40, 6), gets counted 13 C(12, 2) times
B_i B_j B_k: C(40,5), gets counted C(13,3) times
etc.
I methodically put this all in spreadsheet and checked my entries, so I
*think* it is right. Of course, I may have still made a typo somewhere..
--
Stephen J. Herschkorn sjhersc...@netscape.net
Math Tutor on the Internet and in Central New Jersey- Hide quoted text -
- Show quoted text -
I finally got around to modifying the simulation to add joker logic,
and made a run. The summary data for the jokers wild case
one the first line is the number of trials, then the number of cases
for each third of the deck with no 4 of a kind. The next three lines
show the number of 0, 1,2,3, and 4 occurances of 4 card sets
for each of the three hands. A quick computation shows the mean
and variance of the number of 4 card sets is about .606 and .370,
respectively.
1000000 458942 458694 458575
458942 477651 62451 954 2
458694 477585 62813 908 0
458575 477828 62687 910 0
Seems like there might be a small difference between theory
and simulation. Curious.
Earl |
|
|
| Back to top |
|
| |
Page 2 of 2 Goto page Previous 1, 2
All times are GMT
The time now is Fri Jul 30, 2010 10:26 am
|
|
|