← All tools

PF / Casino-Math Glossary

Navigating the math of modern provably fair casinos requires understanding the exact jargon of cryptography and probability. This searchable reference dictionary dissects the 25 core mathematical and cryptographic terms that separate amateur bettors from professional advantage players (if you are new to these concepts, we recommend you Start Here).

Provably-Fair / Casino-Math Glossary

Searchable terms. Type to filter.
  • Provably Fair A cryptographic protocol where game outcomes are deterministic functions of (server seed, client seed, nonce). The operator publishes the server seed HASH up-front; once rotated, the seed is revealed so any player can re-derive every outcome.
  • HMAC-SHA256 Keyed hash function used by every Stake-derived provably-fair engine: HMAC(server_seed, "client_seed:nonce:cursor") → 32 deterministic bytes.
  • Server seed Operator-chosen secret. Hashed and published before betting; revealed after the seed is retired so players can audit.
  • Client seed Player-chosen string. Lets the player force a different outcome stream — proves the operator cannot cherry-pick.
  • Nonce Bet counter. Increments by 1 every bet. Skipped nonces are a red flag — they may hide bets the player did not see.
  • Cursor Byte offset into the HMAC stream when a game needs more than 32 bytes (e.g. Mines, Keno).
  • House edge (HE) Operator's expected profit per unit wagered. EV per bet = −HE.
  • RTP Return to player = 1 − house edge.
  • Variance Second moment of per-bet return; quantifies how bumpy the ride is around the EV.
  • σ (sigma) Standard deviation = √Variance. Net result after N bets has σ = √N · σ_per_bet.
  • Kelly criterion Optimal bet fraction for a +EV opportunity: f* = (bp − q)/b. Maximises long-run geometric growth.
  • Fractional Kelly Bet a fraction (typically ¼–½) of full Kelly. Sacrifices growth for much lower drawdowns.
  • Risk of Ruin Probability of bankrupting the bankroll given finite stakes. Sileo / Schlesinger: RoR = ((1−α)/(1+α))^B with α = advantage/σ².
  • Drawdown Decline from a previous bankroll peak. Different from "final result" — you can win and still hit a deep drawdown along the way.
  • Modulo bias Distortion introduced when an operator does `randomInt % N` and 2^k does not divide cleanly by N. Low values get more hits.
  • Wagering requirement Volume of bets you must make before a bonus becomes withdrawable. Stated as a multiple of the bonus (× B) or bonus + deposit (× B+D).
  • Sticky bonus Bonus amount is removed from balance at withdrawal — you only keep what you won beyond it.
  • Cashable bonus Whole balance withdrawable after wagering is met. Less common.
  • Closing-line value (CLV) Difference between the odds you got and the closing odds. The strongest known long-run predictor of sports-betting profitability.
  • EV (expected value) Σ p_i × x_i over all outcomes. Negative on house games, positive on advantage plays.
  • Chi-square test Goodness-of-fit test for whether observed counts match an expected distribution.
  • Runs test Wald-Wolfowitz test for serial independence in a binary stream.
  • Mulberry32 Small deterministic PRNG used here for reproducible Monte Carlo runs.
  • Box-Muller Method to convert uniform RNG samples into standard normal samples.
  • Tilt Emotional state where players stake bigger / chase losses, abandoning planned discipline.

The mechanics of cryptographic trust

Online gambling transitioned from black-box software to provable transparency through the application of cryptographic hashing. To verify that an outcome was not altered after you placed your bet, you must understand the interplay of seeds, nonces, and mathematical operations.

Verifiable Transparency: A game is not “fair” just because the operator claims it is. True provable fairness means you can take three independent inputs—a server seed, a client seed, and a sequential bet counter—and manually compute the exact outcome of a spin, card deal, or crash multiplier using standard open-source tools.

25 Essential Provably Fair & Casino Math Terms (for an introductory explanation, see Provably Fair Explained)

1. Server Seed

A cryptographically secure random string generated by the casino’s server. To prevent you from predicting outcomes, this seed is kept secret (pre-hashed) until your playing session ends.

SHA-256(Server_Seed) = Published_Active_Hash

2. Client Seed

A random or custom string provided by your browser or entered manually by you. This input ensures the casino operator cannot pre-calculate or manipulate the outcomes, as they do not know your client seed before you lock in your bet.

3. Nonce

An incremental counter starting at 0 or 1 that advances by one with every bet you place. The nonce keeps outcomes distinct, allowing you to use the same seed pair for thousands of rounds without generating identical results.

4. HMAC-SHA256

Hash-based Message Authentication Code using the SHA-256 algorithm. It takes the server seed as the cryptographic key and the combined client seed and nonce as the message, outputting a 64-character hexadecimal signature used to generate raw game floats.

HMAC_SHA256(Key = Server_Seed, Message = "Client_Seed:Nonce:Cursor")

5. Cryptographic Hash

A one-way mathematical function that maps input data of any size to a fixed-size string of characters. In gaming, SHA-256 is the standard. It is computationally impossible to reverse-engineer the original server seed from its published hash.

6. Modulo Bias

An algorithmic flaw where using the modulo operator to scale a large random integer into a smaller range causes certain outcomes to appear more frequently than others. This occurs when the maximum value of the random generator is not a perfect multiple of the game’s outcome range.

Bias = (⌊2^k / N⌋ + 1) / ⌊2^k / N⌋ - 1

7. Fisher-Yates Shuffle

An algorithm used to generate random permutations of a finite set (like a deck of cards). In provably fair blackjack or poker, the HMAC byte stream is consumed to select indices from a sorted deck array, swapping them systematically to ensure a bias-free shuffle.

8. Return to Player (RTP)

The theoretical percentage of wagered money that a game pays back to players over billions of rounds. If a game has a 98% RTP, the operator expects to retain 2% of all wagers as profit.

9. House Edge (HE)

The mathematical advantage the casino holds over the player, expressed as a percentage of each wager. It is the direct complement of RTP.

House_Edge = 100% - Return_to_Player

10. Expected Value (EV)

The average amount a player expects to win or lose per bet if the same trial is repeated infinitely. Advantage players only seek positive EV opportunities (+EV).

EV = Σ (Probability_i × Payout_i)

11. Variance (σ²)

A statistical measure of how far game outcomes deviate from their expected value. High-variance games (like slots or crash games) produce massive swings, while low-variance games (like blackjack) yield stable, incremental results.

12. Standard Deviation (σ)

The square root of variance. In bankroll sizing, standard deviation is used to define confidence intervals and model the boundary limits of short-term volatility.

σ = √Variance

13. Kelly Criterion

A mathematical formula used to determine the optimal size of a series of bets to maximize the logarithmic growth rate of a bankroll in +EV scenarios.

f* = (b × p - q) / b

14. Risk of Ruin (RoR)

The probability that a bettor will lose their entire bankroll before reaching a target profit or completing a specific session duration.

15. Closing Line Value (CLV)

A metric in sports betting that compares the odds you locked in against the final closing odds offered by the bookmaker before the event begins. Beating the closing line consistently is the primary indicator of a profitable long-term sports bettor.

16. Implied Probability

The likelihood of an outcome occurring as suggested by the bookmaker’s betting odds, ignoring the integrated bookmaker commission (vig).

Implied_Probability = 1 / Decimal_Odds

17. Chi-Square Test (χ²)

A statistical test used to determine whether observed game outcomes (like roulette spins or dice rolls) deviate significantly from their expected theoretical distribution. It is used to audit discrete RNG outputs.

18. Kolmogorov-Smirnov Test (K-S)

A statistical audit that compares the cumulative distribution function of observed continuous floats against a uniform distribution between 0 and 1. It is the gold standard for checking byte-to-float conversions in provably fair algorithms.

19. Rakeback & Cashback

Loyalty rebates returned to the player. Rakeback refunds a percentage of the rake paid in peer-to-peer games, while cashback refunds a percentage of net losses or total wagered volume, effectively reducing the active house edge.

20. Wagering Requirement

A multiplier applied to a bonus (or deposit + bonus) that defines the total volume of wagers you must place before bonus funds convert into withdrawable cash.

Total_Wager_Needed = Bonus_Amount × Wagering_Multiplier

21. Volatility Index (VI)

A metric that describes the fluctuations of a game’s payouts. It is typically defined as the boundary limit of a session’s net winnings at a 95% confidence level over a specific number of rounds.

22. Monte Carlo Simulation

A computational algorithm that relies on repeated random sampling to obtain numerical results. It is used to simulate millions of gambling sessions to determine probability distributions for drawdowns, ruins, and complex betting progressions.

23. Sticky vs. Cashable Bonus

A cashable bonus can be withdrawn once wagering requirements are met. A sticky bonus can be used to place wagers but is deducted from your final balance when you initiate a withdrawal.

24. Absorbing Boundary

A mathematical state in a random walk from which escape is impossible. In gambling, your bankroll hitting zero ($0) is an absorbing boundary; once hit, you can no longer place wagers to recover.

25. Law of Large Numbers (LLN)

A theorem stating that as the number of independent trials increases, the empirical average outcome will converge closer to the theoretical expected value, grinding down short-term luck and exposing you to the true house edge.

Frequently asked questions

Why is HMAC-SHA256 preferred over simple SHA-256 for game outcomes?

Using a simple hash concatenation like SHA-256(Server_Seed + Client_Seed) can be vulnerable to length-extension attacks. HMAC-SHA256 utilizes a double-hashing structure with inner and outer pads, ensuring absolute cryptographic security even if parts of the input are known.

How does a client seed prevent the casino from cheating?

Because the casino publishes the hash of the server seed before you play, the server seed is locked. Since they do not know what client seed you will input, they cannot manipulate the server seed to force a losing outcome. If they change the server seed after you play, the final verification will fail to match the pre-published hash.

What is the difference between variance and standard deviation?

Variance measures the average of the squared differences from the mean, which yields squared units (e.g., dollars squared). Standard deviation is the square root of variance, returning the metric to the original unit of measurement (e.g., dollars), which makes it directly applicable to bankroll management.