Re: Card pairing probabilities
- From: "Stephen J. Herschkorn" <sjherschko@xxxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 14:10:17 -0500
Phil Freedenberg wrote:
Suppose a standard deck of 52 cards is randomized.
How would you calculate the probability that no adjacent cards have the same value (e.g., pair of
treys, pair of Kings, etc.)
What is the expected number of such pairs in a deck?
In another post, I addressed the expected value. Here is a recursive approach to the probability of no pairs. As I expected, it is somewhat computationally intensive.
Imagine turning the cards over one by one. We call the card just turned over the *current* card, the cards not yet turned over the *remainder*, and the current card + the remainder the *augmented remainder*.
Let p(x, n1, n2, n3, n4) = the (conditional) probability of no adjacent pairs in the augmented remainder given that, in the remainder, there are x cards with the same rank as the current card and, for i = 1, 2, 3, 4, n_i ranks with exactly i cards. Thus, 0 <= x <= 3, 0 <= n_i <= 13 for all i, n4 <= 12, n_x > 0 if x > 0, sum(i=1..4, n_i) <= 13, and sum(i=1..4, i n_i) <= 51. (This specification of the domain limits our state space.)
We want p(3, 0, 0, 1, 12).
p(0, 0, 0, 0, 0) = 1
p(0, n1, n2, n3, n4) = [n1 p(0, n1 - 1, n2, n3, n4) + 2 n2 p(1, n1 + 1, n2 - 1, n3, n4)
+ 3 n3 p(2, n1, n2 + 1, n3 - 1, n4) + 4 n4 p(3, n1, n2, n3 + 1, n4 - 1)] / sum(i=1..4, i n_i)
p(1, n1, n2, n3, n4) = [(n1 - 1) p(0, n1 - 1, n2, n3, n4) + 2 n2 p(1, n1 + 1, n2 - 1, n3, n4)
+ 3 n3 p(2, n1, n2 + 1, n3 - 1, n4) + 4 n4 p(3, n1, n2, n3 + 1, n4 - 1)] / sum(i=1..4, i n_i)
p(2, n1, n2, n3, n4) = [n1 p(0, n1 - 1, n2, n3, n4) + 2 (n2 - 1) p(1, n1 + 1, n2 - 1, n3, n4)
+ 3 n3 p(2, n1, n2 + 1, n3 - 1, n4) + 4 n4 p(3, n1, n2, n3 + 1, n4 - 1)] / sum(i=1..4, i n_i)
p(3, n1, n2, n3, n4) = [n1 p(0, n1 - 1, n2, n3, n4) + 2 n2 p(1, n1 + 1, n2 - 1, n3, n4)
+ 3 (n3 - 1) p(2, n1, n2 + 1, n3 - 1, n4) + 4 n4 p(3, n1, n2, n3 + 1, n4 - 1)] / sum(i=1..4, i n_i)
I leave it to some one with access to Mathematica (R), Maple, or the like to program this up.
-- Stephen J. Herschkorn sjherschko@xxxxxxxxxxxx Math Tutor on the Internet and in Central New Jersey and Manhattan
.
- References:
- Card pairing probabilities
- From: Phil Freedenberg
- Card pairing probabilities
- Prev by Date: Re: laplace equation
- Next by Date: Re: Why f:domain->codomain instead of f:domain->range?
- Previous by thread: Re: Card pairing probabilities
- Next by thread: Deducted from Wilson
- Index(es):
Relevant Pages
|