What does Baccarat Edges, Counting and Ruin conclude, in numbers, about “Gambler's Ruin: a Finite Bankroll Against a House Without a Ceiling”?
Answer: Chapter 3 uses the gambler's ruin formula to show that doubling 20 units on Player succeeds with probability only 0.3668.
Scope of the numbers: Its parameters are illustrative, all calculations are generated by its programs, and nothing in it is personalised financial advice. Marked boxes separate published evidence, runnable Python calculations (21 programs), classical sources and the author's hypotheses.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.3668, 20
| decided-coup win chance of the Player bet p = 0.493175 | ||||
| start | target | P(reach target) | fair game | P(ruin) |
| 10 | 20 | 0.4322 | 0.5000 | 0.5678 |
| 20 | 40 | 0.3668 | 0.5000 | 0.6332 |
| 50 | 100 | 0.2034 | 0.5000 | 0.7966 |
| 100 | 200 | 0.0612 | 0.5000 | 0.9388 |
| 20 | 30 | 0.5727 | 0.6667 | 0.4273 |
| 20 | 25 | 0.7420 | 0.8000 | 0.2580 |
| 100 | 110 | 0.7486 | 0.9091 | 0.2514 |
| aim at 10 x bankroll from | 20: P(reach) = 0.003102 | |||
| aim at 10 x bankroll from 100: P(reach) = 0.000000 | ||||
| no ceiling (house never stops): P(ruin) = 1 for every start |
Show the full program
# Chapter 3. p31: Gambler's ruin for the Player bet, exact. Ties push,
# so only decided coups move the bankroll: win one unit with chance
# p = P(Player)/(P(Player)+P(Banker)), lose one with q = 1 - p, from the
# exact eight-deck enumeration of p11. Classical formula (Feller 1968):
# from i units, playing until 0 or N, P(reach N) = (1 - r^i)/(1 - r^N)
# with r = q/p; against a house with no ceiling ruin is certain.
# Bankrolls and targets are illustrative.
from fractions import Fraction as F
def banker_draws(b, p3):
# 庄家补牌表:b 为庄两张牌点数,p3 为闲第三张牌点数
if b <= 2:
return True
if b == 3:
return p3 != 8
if b == 4:
return 2 <= p3 <= 7
if b == 5:
return 4 <= p3 <= 7
if b == 6:
return p3 in (6, 7)
return False
DRAW = [[banker_draws(b, p3) for p3 in range(10)] for b in range(10)]
# WIN[p][b]:0 庄胜,1 闲胜,2 和
WIN = [[0 if b > p else 1 if p > b else 2 for b in range(10)]
for p in range(10)]
def tally(c):
# 返回 [庄胜, 闲胜, 和] 的整数权重,分母为 n 起连乘六项的降阶乘
c = list(c)
n = 0
for x in c:
n += x
s4, s5 = (n - 4) * (n - 5), n - 5
acc = [0, 0, 0]
vals = range(10)
for p1 in vals:
w1 = c[p1]
if not w1:
continue
c[p1] -= 1
for b1 in vals:
w2 = w1 * c[b1]
if not w2:
continue
c[b1] -= 1
for p2 in vals:
w3 = w2 * c[p2]
if not w3:
continue
c[p2] -= 1
pt = (p1 + p2) % 10
for b2 in vals:
w4 = w3 * c[b2]
if not w4:
continue
c[b2] -= 1
bt = (b1 + b2) % 10
if pt >= 8 or bt >= 8 or (pt >= 6 and bt >= 6):
acc[WIN[pt][bt]] += w4 * s4
elif pt <= 5:
drw = DRAW[bt]
for p3 in vals:
w5 = w4 * c[p3]
if not w5:
continue
pf = (pt + p3) % 10
row = WIN[pf]
if drw[p3]:
c[p3] -= 1
for b3 in vals:
acc[row[(bt + b3) % 10]] += w5 * c[b3]
c[p3] += 1
else:
acc[row[bt]] += w5 * s5
else:
row = WIN[pt]
w = w4 * s5
for b3 in vals:
acc[row[(bt + b3) % 10]] += w * c[b3]
c[b2] += 1
c[p2] += 1
c[b1] += 1
c[p1] += 1
return acc
def reach(i, n, p):
q = 1 - p
if p == q:
return F(i, n)
r = q / p
return (1 - r ** i) / (1 - r ** n)
if __name__ == "__main__":
wb, wp, wt = tally([128] + [32] * 9)
p = F(wp, wp + wb)
print("decided-coup win chance of the Player bet p = %.6f" % p)
print("start target P(reach target) fair game P(ruin)")
for i, n in ((10, 20), (20, 40), (50, 100), (100, 200),
(20, 30), (20, 25), (100, 110)):
w = reach(i, n, p)
print("%5d %6d %.4f %.4f %.4f" % (
i, n, w, F(i, n), 1 - w))
for i in (20, 100):
w = reach(i, 10 * i, p)
print("aim at 10 x bankroll from %3d: P(reach) = %.6f" % (i, w))
print("no ceiling (house never stops): P(ruin) = 1 for every start")Single source and citation
Fan, Y. (2026). Exact Enumeration of Baccarat House Edges, the Futility of Card Counting and Gambler's Ruin Probabilities (Version 1.0.0), Chapter 3: Gambler's Ruin: a Finite Bankroll Against a House Without a Ceiling. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-224 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026224,
author = {Fan, Yafu},
title = {Exact Enumeration of Baccarat House Edges, the Futility of Card Counting and Gambler's Ruin Probabilities},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Exact Enumeration of the Eight-Deck Shoe: Where Banker 1.06 % and Player 1.24 % Come From
- Chapter 2 · Why Counting Barely Works: Effects of Removal, Simulated Shoes and the Fundamental Theorem
- Chapter 4 · Staking Systems Cannot Change the Expectation: Doubling, d'Alembert and the Optional Stopping Theorem
- Chapter 5 · The Road Has No Predictive Power: Streak Lengths, Runs Tests and Small-Sample Bias
- Chapter 6 · The Price of a Session: Loss Distributions, a Hard Stop Line and Chasing
- Chapter 7 · Sources East and West: Tao Kan Throws the Gaming Pieces into the River, and Cardano's Book on Games of Chance
- Chapter 8 · Closing the Loop: the Entertainment Stop-Loss Calculator, Risk Notices and Pre-Registered Tests