MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


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

Thanks in advance.

share|cite|improve this question
up vote 5 down vote accepted

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:

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


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$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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