# Interesting Probability Problem - Revisited

A few weeks ago, I wrote a post about a probability problem that I found interesting.  The basic scenario was: Given a standard shuffled deck of 52 cards, you start at the top of the deck and draw cards one by one.  When you get to the first Ace, if you keep flipping, are you more likely to run into another Ace or a Deuce first (whether or not you have already seen a Deuce is not specified)?  Well, if you get the first Ace after flipping 30 cards, then obviously you are more likely to hit another Ace first.  So at what position does the first Ace need to be so that the probability of encountering an Ace or a Deuce after that are equal?

After running some computer simulations, the answer seemed to be between 11-12.  Here are some of the results from the simulation:

AcePosition: 10
Iterations: 4243160
Aces Hit: 48.784090159221%
Twos Hit: 51.215909840779%

AcePosition: 11
Iterations: 3935735
Aces Hit: 49.5682763194168%
Twos Hit: 50.4317236805832%

AcePosition: 12
Iterations: 3650605
Aces Hit: 50.3239052157108%
Twos Hit: 49.6760947842892%

AcePosition: 13
Iterations: 3374073
Aces Hit: 51.1721886278098%
Twos Hit: 48.8278113721902%

AcePosition: 14
Iterations: 3114720
Aces Hit: 51.9245710689885%
Twos Hit: 48.0754289310115%

As you can see, when the first Ace is drawn on the 11th card, you have a slightly better chance of encountering a Deuce before another Ace.  On the 12th card, the second Ace is slightly more likely to come up first.  Since I am not the best person at writing probability functions, I asked some friends to look into the solution and here is the result (Thanks to Neil Voss and Michael Henry):

prob(Get Ace before Two | X is first Ace) =

f(x) = [(x-4)*(x-3)*(x-2)*(x-1)*1

+(49-x)*(x-3)*(x-2)*(x-1)*3

+(49-x)*(48-x)*(x-2)*(x-1)*18/5

+(49-x)*(48-x)*(47-x)*(x-1)*2

+(49-x)*(48-x)*(47-x)*(46-x)*3/7]

/(48*47*46*45)

Solve(prob(x), x) = [

x = -107.7381992352327,

x = 11.57895392185286,

x = -14.42037734331007 - 99.55522666797053 i,

x = -14.42037734331007 + 99.55522666797053 i ]

The answer is obviously 11.5789.  This falls in line with the computer simulation above.