title = "Mathematics and House Edge in Table Games"

content = """
Understanding the mathematics behind casino games helps explain outcomes to players
and demonstrates why casinos maintain long-term advantages.

**House Edge Concepts:**

*Definition:* The mathematical advantage the casino holds over players, expressed
as a percentage of each bet the casino expects to retain long-term.

*Expected Value:* For a $100 bet with 2% house edge, the casino expects to win $2
per bet over millions of trials. Individual sessions vary wildly, but long-term
results converge to expected values.

*Player Perspective:* Short-term variance means players can win despite house edge.
However, extended play makes the mathematical advantage inevitable.

**Game-Specific House Edges:**

*Blackjack:* Approximately 0.5% with basic strategy. Poor play increases this
dramatically. Rule variations (6:5 blackjack, continuous shufflers) increase edge.

*Baccarat:* Player bet 1.24%, Banker bet 1.06% (after commission), Tie bet 14.4%.
Banker is the best mathematical bet despite the commission.

*Craps:* Pass/Don't Pass approximately 1.4%. Field bets 2.78%-5.6% depending on
2/12 payouts. Proposition bets 5%-16.67%.

*Roulette:* European (single zero) 2.7%. American (double zero) 5.26%. The extra
zero nearly doubles the house advantage.

*Three Card Poker:* Ante/Play approximately 3.4%. Pair Plus side bet 7.3%.

**Volatility and Variance:**

*Standard Deviation:* Measures result variability. High variance games (slots,
keno, craps proposition bets) have wild short-term swings. Low variance games
(baccarat, blackjack with flat betting) offer steadier results.

*Bankroll Requirements:* High variance games require larger bankrolls to survive
downswings. This affects both casino operations and player strategies.

**Explaining to Players:**

When players ask why they lost over time, explain that short-term luck varies but
the house edge ensures casino profitability over millions of bets. No system
overcomes the mathematics, though smart play (basic strategy) minimizes the edge.

Never tell players they "should have won" or were "due" — gambler's fallacy
misconceptions hurt player understanding of randomness.
"""  # noqa: E501

version = "0.0.1"
