Spunk Odds Reference

Keno guide

Wolf Keno: check the numbers yourself

Wolf is a label on this page and has nothing to do with the rules. This is an exercise. Work through it with a calculator or a few lines of code, and you will be able to check any keno table you meet.

What you need

Task 1: count all possible draws

Compute C(80, 20). You should get 3,535,316,142,212,174,320. That is the number of different sets of 20 the game can draw. Every one is equally likely in a fair draw.

Task 2: count draws for each catch count

For h catches, choose which h of your 4 spots are drawn, C(4, h), and fill the rest of the draw from the 76 numbers you did not pick, C(76, 20 - h). Multiply.

Your answers should match this table (4 spots, 80 numbers, 20 drawn)
Catches hC(4, h) x C(76, 20 - h)Probability
01,090,013,712,241,956,54030.8321%
11,529,843,806,655,377,60043.2732%
2751,733,594,649,625,20021.2635%
3152,894,968,403,313,6004.3248%
410,830,060,261,901,3800.3063%

Task 3: check that the counts add up

Add the five counts. The sum must equal C(80, 20) exactly; this is Vandermonde's identity. If it does not, a term is wrong. It is a quick way to catch typing errors before you go further. The probabilities, likewise, must sum to 100%.

Task 4: compute the return

Multiply each probability by its pay and add. With the illustrative pays you should get 92.62%. The edge is then 7.38%. As a cross-check, the expected catch count is 4 x 20 / 80 = 1, and the sum of h x probability over your table should give the same.

Task 5: verify one hashed draw

The table below derives a full 20-number draw from a seed pair and nonce, using one common construction. Pick any 4 numbers from 1 to 80 before you look at the result, then count your catches against the sorted list.

Exercise draw: 20 numbers from 80, nonce 3
Server seed (revealed later)wolf-exercise-seed-3e8d
Commitment shown before play: SHA-256(server seed)709d9b8935676cc37ce3d548f7e40a816c291e470f6ba946898151dffee31cda
Client seed : nonce : roundwolf-student:3:0
HMAC-SHA256(server seed, message)e952e5b78d423f051eb7cbf625e141d3650035c3482fd3b8bf8fa1135bfeb3bd
First 4 bytes (8 hex digits)e952e5b7 = 3,914,524,087
Float = value / 2^320.9114211628
20 floats, each picks from the numbers not yet used73, 44, 10, 13, 32, 24, 61, 30, 78, 35, 22, 38, 17, 39, 57, 20, 19, 56, 54, 16
Drawn numbers, sorted10, 13, 16, 17, 19, 20, 22, 24, 30, 32, 35, 38, 39, 44, 54, 56, 57, 61, 73, 78

One common construction, shown for teaching. Real services document their own message format; check theirs before verifying.

To repeat it yourself: compute SHA-256 of the server seed and compare with the commitment row; compute HMAC-SHA256 with the server seed as key and the message shown; take 4 bytes at a time and divide by 2^32; then use each float to pick from the numbers not yet drawn, as explained on Royal Keno.

Task 6: repeat it many times

If you can program, draw 20 of 80 a large number of times and count catches on a fixed 4-spot ticket. With 100,000 draws, the share of 4-catch results should be near 0.306%, give or take about 0.017%. Your own results will differ a little from run to run. That is expected.