0
$\begingroup$

Say you have a game that asks you whether you think the next card will be higher. In this game ace is 1. If the next card is equal to the first one then another random card is taken until the next card is either higher or lower. Suits are disregarded in this game. One deck is used and cards are recycled.

What is the probability of the next card being higher than the previous one. I have thought up this equation but not sure if it is correct:

$$probability = \frac{13 - Rank}{12} * 100% $$

Where Rank is the rank of the current card (from 1 to 13)

Therefore if Rank = Ace, probability = 100% Is this equation correct? Thanks!

$\endgroup$
  • $\begingroup$ I think that this should be correct. if you want to be sure I suggest you to run some simulation to estimate the probability $\endgroup$ – Donbeo May 4 '14 at 20:40
  • $\begingroup$ This is a conditional probability (given the rank of the previous card, you can work out the probability), but your question originally sounds like it's after the unconditional probability (you don't know the rank yet, you're trying to work out the probability the second card is larger than the first without seeing either). Is that the case? $\endgroup$ – Glen_b May 4 '14 at 20:42
  • $\begingroup$ Is this a standard deck of 52 cards? Do you return a card to the deck after you have taken it? If so, where in the deck do you put it? $\endgroup$ – Joel Reyes Noche May 5 '14 at 7:18
  • $\begingroup$ @JoelReyesNoche Yes it's 52 cards, the card goes to the bottom of the pile. I've edited the post $\endgroup$ – Cobbles May 5 '14 at 8:17
  • 1
    $\begingroup$ If after each card is taken it is put on the bottom of the pile, and if you remember which cards have already been taken, then the probabilities change each time you take a card. To avoid this, you might want to put back the cards in random locations in the deck each time. $\endgroup$ – Joel Reyes Noche May 5 '14 at 13:14
0
$\begingroup$

This program simulate you game

sim=1000000
prob=matrix(data=0,nrow=13,ncol=1)
for(x in 1:13)
{
  print(x)
  for(iter in 1:sim)
  {

    #print(paste(iter/sim,x,sep="   "))
    cards=1:13
    cards=c(cards,cards,cards,cards,cards,cards,cards,cards,cards,cards,cards)# suppose to use more than one deck
    cards=cards[-x]
    y=-1
    while(T)
    {
      y=sample(x=cards,size=1)
      if(y!=x)
        break

      cards=cards[-which(cards==y)[1]]
    }
    if(x<y)
      prob[x]=prob[x]+1
  }
}

prob=prob/sim

rank=1:13

formula=(13-rank)/12 # your formula
#prob=vector(prob)


formula-prob #error between the estimated probability and your formula

 formula-prob
               [,1]
 [1,]  0.000000e+00
 [2,]  1.516667e-04
 [3,]  8.533333e-05
 [4,]  3.830000e-04
 [5,]  7.036667e-04
 [6,]  8.143333e-04
 [7,]  1.070000e-04
 [8,] -1.005333e-03
 [9,]  7.083333e-04
[10,] -5.590000e-04
[11,]  3.986667e-04
[12,]  3.003333e-04
[13,]  0.000000e+00
> 

The error is small so your formula it's probably right

| cite | improve this answer | |
$\endgroup$

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.