There are no flushes of course, since digits don't come in suits, but the natural straight (digits arising in order) serves as a analog to the royal flush of standard poker. Unlike standard poker, both the natural and the ordinary straight beat a full house, because they're both less likely than a full house. And, again unlike standard poker, a nothing hand beats a single pair, because its less likely.
The computations are as follows.
Since any of the ten digits is as likely as any other to show up in a given
position, the possible 100,000 hands are themselves equally likely.
The problem of computing the probabilities of different kinds of hands then
becomes what in mathematics is called a counting problem, that is, a
problem of determining in how many different ways a certain event can happen.
The first tool we need is k!, defined as k(k-1)...(2)(1) and read as "k factorial." It counts the number ways that k objects can be put in different orders. (There are k choices for the first position, k-1 for the second position, and so on.) With it, we can make nCk, which is read as "n choose k" and defined as
nCk = n!/k!(n-k)!
= {n!/(n-k)!}/k!
= n(n-1)(n-2)...(n-k+2)(n-k+1)/k!
= n(n-1)(n-2)...(n-k+2)(n-k+1)/k(k-1)(k-2)...(2)(1) .
This second tool counts the number of ways that one can choose k objects from among n objects, ignoring the order in which they are chosen. (There are n choices for the first selection, n-1 for the second selection, and so on, down to n-k+1 choices for the k-th selection. The division by k! removes the effect of selecting in a given order.)
For example, the number of ways of choosing a three person committee from among seven candidates is
7C3 = 7!/{3!4!}
= {(7*6*5*4*3*2*1)/(4*3*2*1)}/{3*2*1}
= {7*6*5}/{3*2*1}
= 35 .
Now then. Most (but not all) of the calculations for five-digit poker proceed by using nCk to compute the number of ways that particular digit patterns can arise, by first choosing the digits and then choosing their positions in the five-digit hand. Using W to denote the number of ways, we have
for five of a kind: W = 10C1 * 5C5 = 10 ;
for a straight, in order (up or down): W = 6*2 = 12 ;
for four of a kind: W = 10C1*9C1 * 5C4*1C1 = 450 ;
for a full house: W = 10C1*9C1 * 5C3*2C2 = 900 ;
for a straight, not in order: W = 6*(5!-2) = 708 ;
for three of a kind: W = 10C1*9C2 * 5C3*2C1*1C1 = 7200 ;
for two pair: W = 10C2*8C1 * 5C2*3C2*1C1 = 10,800 ;
for one pair: W = 10C1*9C3 * 5C2*3C1*2C1*1C1 = 50,400 ; and
for none of the above (no pair, no straight): W = 10C5*5! -12 -708 = 29,520 .
Dividing these counts by 100,000 gives the probabilities displayed above.
The calculations for standard poker are only slightly more involved than these. Click here for an introductory presentation in The Math Forum at Drexel University and click here for a very thorough presentation by Encyclopaedia Brittanica.