3
$\begingroup$

I wish to caluclate the probability that two out of three cards drawn from an ordinary 52 card deck are in sequence (for example a two and a three, or a ten and a jack, and so on). This excludes any situation with three cards in sequence but not situations that include a pair (so four - five - six would not count as a two-card sequence but four - four - five would). Ace is only high, so it can be used in the sequence king - ace but not in the sequence ace - two.

The way I reason is: There are 12 different possible positions for the two-card straight. For each position there are 4 * 4 = 16 different combinations of the two cards. For the two "end positions" there are 46 potential third cards (any card except the two in sequence, including those same cards in different suits, and the four adjacent ones). For the ten other positions there are 42 potential third cards (same but excluding eight adjacent ones). Thus, the probability should be:

$${2 \times 4^2 \times 46 + 10 \times 4^2 \times 42 \over {52\choose 3}} = 0.371$$

The problem is, when I ran a simulation I got a probability of .345, which leads me to believe that the above calculation is wrong. Is it? If so, what would be the correct way of doing it?

$\endgroup$
  • $\begingroup$ This seems to go in the wrong direction, but: If my first two cards are $\{K\spadesuit, A\heartsuit\}$ then why are any cards excluded? If I draw a $Q$ I'll just say the ace was low, if I draw a $2$ I'll say it was high (or low...this case doesn't matter). Or did you intend to say that the value of the ace is fixed from the start? $\endgroup$ – lulu Aug 19 at 11:27
  • $\begingroup$ Ah sorry, I wasn't clear. The idea is that the ace can only be used as high (or low) and not either or. I will update the question accordingly. $\endgroup$ – Joakim Sundh Aug 19 at 11:30
  • $\begingroup$ So...you just mean that the ace is always high? (or always low, doesn't matter). that makes sense, but I'd just declare the value at the beginning. Anyway, assuming that, I get the same value you did. $\endgroup$ – lulu Aug 19 at 11:32
  • $\begingroup$ Just to confirm: A hand like $\{6\clubsuit, 6\diamondsuit, 7\heartsuit\}$ is a winner, yes? You don't count the two sequences separately as both of them require the $7$. $\endgroup$ – lulu Aug 19 at 11:33
  • $\begingroup$ Yes, that's right. The hand {6♣,6♢,7♡} would count as one sequence just the same as {4♣,6♢,7♡}. $\endgroup$ – Joakim Sundh Aug 19 at 11:36
2
$\begingroup$

Consider two consecutive numbers on the lower $(1, 2)$ and higher end $(K, A)$. In this case, combinations with one specific third value must be discarded ($3$ and $Q$, respectively). Assuming three different values, there are ${4 \choose 1}{4 \choose 1}{40 \choose 1} = 640$ valid combinations. Assuming two different values, there are ${2 \choose 1}{4 \choose 2}{4 \choose 1} = 48$ valid combinations.

Consider two consecutive numbers $(2, 3)$ up to $(Q, K)$. In this case, combinations with two values must be discarded (e.g., $1$ and $4$). Assuming three different values, there are ${4 \choose 1}{4 \choose 1}{36 \choose 1} = 576$ valid combinations. Assuming two different values, there are again ${2 \choose 1}{4 \choose 2}{4 \choose 1} = 48$ valid combinations.

Combining both together, we find:

$$\frac{2(640 + 48) + 10(576 + 48)}{52 \choose 3} = \frac{7616}{22100} \approx 0.3446$$

This is confirmed by the following Python code:

import itertools

v = list(range(1, 14)) * 4
v.sort()
j = 0
for c in itertools.combinations(v, 3):
  if c[0] == c[1] - 1 and c[1] != c[2] - 1:
    j += 1
  if c[0] != c[1] - 1 and c[1] == c[2] - 1:
    j += 1
print(j, j / 22100)
$\endgroup$
  • $\begingroup$ That looks exactly right to me, thanks! $\endgroup$ – Joakim Sundh Aug 19 at 14:47
  • $\begingroup$ @JoakimSundh You're very welcome. If this or any other answer was of help to you, please consider upvoting and/or accepting by clicking the check mark on the left! $\endgroup$ – jvdhooft Aug 19 at 16:14
  • $\begingroup$ Certainly, I did first thing. Unfortunately, this being my first question, I don't have enough reputation yet for my votes to be publicly displayed. $\endgroup$ – Joakim Sundh Aug 20 at 9:23
0
$\begingroup$

It can be done as $$ $$CASE 1 Selection of two in sequence and third any other denomination other than two drawn= 12*16*44=8448 $$ $$ CASE 2 IS ALL THREE ARE IN SEQUENCE = 11 * 64 = 704 $$ $$ Hence Required probability will be = (8448-704)/22100=7744/22100=0.35

$\endgroup$
0
$\begingroup$

(The answer was changed, since the initial OP text was not clear for me. I will restate, to show which two problems are solved.)

Let us count exactly among all sets $S=\{x,y,z\}$ of three different cards among $52$, showing "numbers" $|x|$, $|y|$, $|z|$ in $\{1,2,\dots,13\}$, how many are favorable for the following properties $(A)$ (as in the OP now) and $(B)$ (as it may have been digested in a former version):

  • Property $(A)$: There exist at least two consecutive numbers among $|x|$, $|y|$, $|z|$, but all three numbers are not consecutive (after reordering them).

  • Property $(B)$: There exists exactly one pair among the pairs $(x,y)$, $(x,z)$, $(y,z)$, so that restricting to numbers we obtain two consecutive numbers (after reordering them).


Note: The first solution here was addressing $(B)$. Since there are already solutions to $(A)$, i will go an other way, this way is using $(B)$ to get the final result. For this reason, $(B)$ will be considered first.


The total number of cases is $$\binom {52}3=\frac 16\cdot 52\cdot 51\cdot 50=22100\ .$$

Solution for $(B)$:

While counting the favorable cases, the "good cases", we may and will assume that $x$ and $y$ are consecutive in this order, $|x|+1=|y|$ and that $|z|$ avoids $|x|-1$, and $|x|=|y-1|$, and $|x|+1=|y|$, and $|x|+2=|y|+1$.

So we need to consider a special counting, depending on the choice of $x$.

  • If $|x|=1$, $|y|=2$, then $|z|$ avoids $1,2,3$, so there are $4\cdot 4\cdot 4(13-3)$ (good) cases.
  • If $|x|=2$, $|y|=3$, then $|z|$ avoids $1,2,3,4$, so there are $4\cdot 4\cdot 4(13-4)$ cases.
  • If $|x|=3$, $|y|=4$, then $|z|$ avoids $2,3,4,5$, so there are $4\cdot 4\cdot 4(13-4)$ cases.
  • This is so for all values of $|x|$ till $|x|=11$, $|y|=12$, in each case we have $4\cdot 4\cdot 4(13-4)$ cases.
  • The final case is similar to the first one, $|x|=12$, $|y|=13$, then $|z|$ avoids $11,12,13$, so there are $4\cdot 4\cdot 4(13-3)$ (good) cases.

Putting all together, there are $$ 2\cdot 4\cdot4\cdot4(13-3) + (12-2)\cdot 4\cdot4\cdot4(13-4) =4\cdot4\cdot 4(2\cdot 10 + 10\cdot 9) =7040 $$ good cases.

The probability is thus $$ \frac{7040}{22100} =\frac {352}{1105} \approx 0.318552036199095\dots\ . $$


Solution for $(A)$:

We have already counted $7040$ $(B)$-favorable cases. To get the $(A)$-favorable cases, we will count and add the cases with (reordered) $|x|,|y|,|z|$ of the shape $n,n,n\pm 1$.

(We do not need to count and eliminate the consecutive shape $n,n+1,n+2$, since no such constellation was considered.)

We add thus twice the number of all $S=\{x,y,z\}$ matching the shape $n,n,n+1$, so we add totally $$ 2\cdot 12\cdot\binom 42\cdot \binom 41=576\ . $$ The result is $7040+576= 7616$, so the probability is $$ \frac{7616}{22100} \approx 0.344615384615385\dots \ . $$


Alternative solution for $(A)$ following the counting idea from the OP.

Consider an $(A)$-favorable situation $\{x,y,z\}$, where $x,y$ are making $|x|, |y|$ fit the pattern $n,n+1$. We count the corresponding possibilities to make a choice of $(\ \{x,y\}\ , z)$ first, separating the cases $n=1$, $n+1=13$, and $1<n<12$ (so $n$ has $10$ possible values) $$ \begin{aligned} & 10\cdot 4\cdot 4\cdot(52-1-1-8) \\ + & 1\cdot 4\cdot 4\cdot(52-1-1-4) \\ + & 1\cdot 4\cdot 4\cdot(52-1-1-4) \\ =& 8192 \end{aligned} $$ In this generation and count of all $(\{x,y\}, z)$, during the passage to
$\{x,y,z\}$ some resulted events are hit and finally counted twice. Namely those of the shape $\{x,y,x'\}$ and/or $\{x,y,y'\}$ with the same number in $x,x'$, respectively in $y,y'$.

There are $2\cdot 12\cdot 4\cdot 5=576$ such events, already counted above. So the good count delivers $8192-576=7616$.


Computer check in sage:

X = cartesian_product( [[1..13], [1..4]] )
C = Combinations(X, 3).list()

A = [ (x,y,z) for (x,y,z) in C
      if 1 in [abs(x[0]-y[0]), abs(y[0]-z[0]), abs(z[0]-x[0])]
      and {1,2} != {abs(x[0]-y[0]), abs(y[0]-z[0]), abs(z[0]-x[0])} ]

B = [ (x,y,z) for (x,y,z) in C
      if 1 == [abs(x[0]-y[0]), abs(y[0]-z[0]), abs(z[0]-x[0])].count(1)]

N = ZZ( len(C) )
pa = len(A) / N
pb = len(B) / N

print "P(A) = %s ~ %s" % (pa, pa.n())
print "P(B) = %s ~ %s" % (pb, pb.n())

This gives:

P(A) = 112/325 ~ 0.344615384615385
P(B) = 352/1105 ~ 0.318552036199095
$\endgroup$
  • $\begingroup$ It may be that i digested in a different way the wording of the problem. $\endgroup$ – dan_fulea Aug 19 at 12:43
  • $\begingroup$ I get this value when I assume that hands like $\{6\heartsuit, 6\spadesuit, 7\clubsuit\}$ are losers, but the OP has indicated that these are winners. $\endgroup$ – lulu Aug 19 at 12:49
  • 1
    $\begingroup$ @lulu: Now i also see the comments, well this is a main issue, but the OP is still counting... two (and only two) out of three cards drawn from an ordinary 52 card deck are in sequence, which does not really happen in the situation $(6, 6*, 7)$... Thanks for the hint, i will maybe change the solution or mention what has to be done to get the answer to the "other" problem. $\endgroup$ – dan_fulea Aug 19 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.