# A statistics and possibility problem based on Blackjack

Hi everyone,

I have been considering this problem for a long time, and I would really appreciate it if anyone can provide me some thoughts.

Provided there is a specific set of playing cards that have values from 1-10 and they have the same possibilities of 1/10. And assume that drawing cards away would not affect this possibility. Now starting to draw card one by one until the sum of the your holding cards exceeds 21. a condition of your holding can be: 2+8+8+5

Now I would like to know what is the possibility distribution function of the sum of the cards JUST BEFORE the sum exceeds 21? In the previous example, the summation would be:

2+8+8=18

That is to solve P(12) to P(21).

-

If you need the particular value of $m = 21$, you should just do the computation. Here is some Mathematica code which computes the generating function:

Clear[dist];
dist[n_] :=  dist[n] =
Expand[If[n > 21, 0, Sum[1/10 (If[n + i > 21, x^n, dist[n + i]]), {i, 1, 10}]]]
N[dist[0],21]


Output

0.0165311670611000000000 x^12 + 0.0341685675344200000000 x^13 +
0.0527481364317930000000 x^14 + 0.0720399334332964000000 x^15 +
0.0917344084707825500000 x^16 + 0.111426359181432966000 x^17 +
0.130596233949505639700 x^18 + 0.148588385879378518480 x^19 +
0.164585828235730916619 x^20 + 0.177580979822560009201 x^21


The asymptotics, as we let $m \to \infty$, can be seen as follows. The average value of the card is $11/2$, so the probability that $n$ is hit for $n$ large is about $2/11$. For $i=0,...,9$, the chance $m-i$ is the last value before going over is the probability that $m-i$ is hit times $10-i$, or about $2(10-i)/11$.

-