View Single Post
  #11  
Old 08-27-2005, 10:00 PM
irchans irchans is offline
Senior Member
 
Join Date: Sep 2002
Posts: 157
Default Re: Exact answer 11.7327% ? (edited)

I fixed some typos in the post below

I think it's possible to use recurrence formulas like Bruce's formaulas to get the exact answer.

Look at the 1000 hands as 900 overlapping windows of width 100.

The Probability p[n] that the nth window will have exactly 14 hands is 0.0014279740790007608. Let g[n] be the probability that the nth window has exactly 14 hands and that no previous window had 14 hands. Let r[n,i] be the probability that the nth window will have exactly 14 hands given that the ith window had exactly 14 hands. Note that r[n,i] = r[n-i] because it only depends on the difference between n and i. Then

p[n] = Sum[ g[j] * r[n-j] , {j, 1, n}].

( p is the convolution of g and r so we might be able to use Fourier Transforms to solve the problem, but I won't use those in this post. )

If we can solve this equation for g[n] then the answer to the original poster's question is:


Sum[ g[n], {n,1,900}].

Notice that r[0] = 1 so:

p[n] = Sum[ g[j] * r[n-j] , {j, 1, n}]
p[n] = g[n] + Sum[ g[j] * r[n-j] , {j, 1, n-1}]
g[n] = p[n] - Sum[ g[j] * r[n-j] , {j, 1, n-1}]
g[n] = 0.0014279740790007608- Sum[ g[j] * r[n-j] , {j, 1, n-1}].

Now we just need the sequence r[n] to compute g[n]. If n<100, r[n] is the sum over k=0,...,14 of the probability that the first n hands of a window has k pairs times the probability that the next n hands after the window have k pairs. (If n>=100, r[n] = 0.0014279740790007608.)

Code:


r[n] = Sum[ C[n, i]
*(1/17^i)*(16/17)^(n - i) * prfirst[n, i],
{i, 0, Min[n, 14]}]



The probability that the first n hands of a 100 hand window have i pairs is

Code:


prfirst[i, j] = If[ j < 14 - (100 - i),
0,
C[i, j]*C[100 - i, 14 - j] / C[100, 14]]



Using those formulas, the 110 values of r are 0.81765, 0.68107, 0.57759, 0.49818, 0.43635, 0.38746, 0.34817, 0.31607, 0.28941, 0.26693, 0.24769, 0.231, 0.21634, 0.20332, 0.19166, 0.18111, 0.17151, 0.16272, 0.15461, 0.1471, 0.14012, 0.13361, 0.12751, 0.12178, 0.11639, 0.1113, 0.10648, 0.10192, 0.09759, 0.09347, 0.08955, 0.08581, 0.08224, 0.07883, 0.07557, 0.07245, 0.06946, 0.06659, 0.06384, 0.0612, 0.05866, 0.05622, 0.05387, 0.05162, 0.04945, 0.04736, 0.04534, 0.0434, 0.04154, 0.03974, 0.038, 0.03633, 0.03472, 0.03317, 0.03168, 0.03023, 0.02884, 0.0275, 0.02621, 0.02497, 0.02377, 0.02262, 0.02151, 0.02044, 0.01941, 0.01841, 0.01746, 0.01654, 0.01566, 0.01482, 0.014, 0.01322, 0.01247, 0.01175, 0.01107, 0.01041, 0.00977, 0.00917, 0.00859, 0.00804, 0.00752, 0.00701, 0.00654, 0.00608, 0.00565, 0.00524, 0.00485, 0.00448, 0.00413, 0.0038, 0.00349, 0.0032, 0.00292, 0.00266, 0.00242, 0.00219, 0.00198, 0.00178, 0.0016, 0.00143, 0.00143, 0.00143, 0.00143, 0.00143, 0.00143, 0.00143, 0.00143, 0.00143, 0.00143, and 0.00143.

Plugging these values into the formula for g gives

g[1] = 0.00142797
g[2] = 0.000260395
g[3] = 0.000242518,
g[4] = 0.000227544, ...

Adding up the first 900 values of g gives an answer of 11.7327%. This number seems a bit higher than the simulation values so I'm not real confident about it yet.

Any comments?
Reply With Quote