Longshot — the math of tail bets

· updated

A single-file, in-browser dashboard for the probability of long-shot binary bets — the kind that pay a big multiple but rarely land. Everything runs on one model: your true win-rate p and the market price q. From those two numbers the sim builds four views — the law of large numbers, the expected-value math of a single bet, a Monte-Carlo of many sequential bets, and how a confident directional “signal” can fall out of pure noise.

Open fullscreen ↗

One model, two numbers

Drag the p win, q price and f bet sliders in the toolbar and every view updates together:

From those fall every number on the screen:

QuantityFormulaIn words
Gross payout on a win1/qA 3.1¢ contract that settles at $1 pays ×32
Net odds(1 − q)/qProfit per $1 staked, on a win
Breakeven win-rateqThe p you need just to not lose money
EV per $1p/q − 1Positive ⇔ p > q. This is the only thing that decides whether to bet.
Kelly fraction(p − q)/(1 − q)The bankroll share that maximizes long-run growth (the sim clamps it to ±1 at the extremes)

The single most important consequence: your expected value depends only on whether your win-rate beats the price — never on how big the payout is. The ×32 multiple is pure variance. It decides how violently the bankroll swings, not whether you should be in the trade.

The four views

Flip between the four tabs (or press v), set the engine running with space, and hover anything for a context-aware explanation. Every control, badge, bin, curve, marker, path and graph node answers when you point at it.

Lattice — the law of large numbers

A Galton board (quincunx). Every ball falls through 8 gates; at each gate it goes right — a win — with probability p. The bin it lands in is how many of the 8 bets it won, so the histogram is a live Binomial(8, p) and the running mean settles onto 8p exactly. That convergence is the law of large numbers, and it is the one and only thing an edge guarantees: in any single ball a +20% edge is invisible noise; it only becomes real over thousands of repetitions.

The board also makes the payout asymmetry visible. A session profits only if it lands right of the breakeven bin at 8·q wins — because each win pays 1/q, you can profit while winning fewer than half your bets. At the default p = 0.30, q = 0.25 fewer than half the sessions are green, yet the game is +20% EV.

Tail — when is a longshot worth it?

The economics of one bet. The payout frontier plots 1/q against price (the deeper the longshot, the bigger the multiple) and overlays your EV = p/q − 1 as price sweeps — the curve crosses zero exactly where the price equals your win-rate p. Drag q into the shaded tail zone and watch the payout balloon while the EV stays pinned to your edge.

Below it, a price-target ridge shows where the price comes from. Each stacked ridge is the distribution of the underlying at a longer horizon (spread grows like √time — a random walk); the shaded tail mass beyond the strike is the probability the bet wins, and that area is the fair price q. A deep longshot is just a thin tail.

Equity — drawdowns and ruin

It runs a Monte-Carlo of 240 sequential-bet runs, each staking a fraction f of a $1,000 bankroll over 120 bets at your chosen edge, on a log axis because bankrolls compound.

With Reveal off you see only the single luckiest hero run — smooth and up-and-to-the-right. With Reveal on you meet the other 239: the full path cloud, the inter-quartile band, the median (what a typical run actually lived), and the bust rate (the share that lost ≥ 90% of bankroll to gambler’s ruin). Reading the hero as skill is survivorship bias. Crank f above the Kelly fraction in the header and watch a genuinely +EV game still drive the median toward zero — proof that bet sizing, not edge, is what kills people.

Signal — confidence is not accuracy

A force-directed graph of “signal nodes” relaxing into clusters around three hubs, printing a confident directional call: “P(UP) 71%”. The catch, exposed by Reveal: each node’s vote is a biased coin, and the consensus is a finite sample of those votes. When the real edge is near zero the true up-probability is ~50%, yet the sampled readout still swings to 65–75%. A confident percentage is cheap; a small noisy sample produces one every single time.

What’s precise about it

Controls

Key / controlAction
spaceRun / pause the animation (balls drop, graph relaxes, curves draw in)
s / shift+sStep one tick / ten ticks
rReset — clear the bins, re-seed the Monte-Carlo, re-roll the graph, restore defaults
vCycle the four views
p win sliderYour true per-bet win probability
q price sliderThe market price (= implied probability); payout is 1/q
f bet sliderBankroll fraction staked per bet — the dominant driver of ruin
Reveal knobOff = only the lucky hero run and the bare consensus; on = the full truth (all paths, bust rate, sampling noise)
hover anythingContext-aware explanation on every control and every canvas region

How it works under the hood

A single HTML file with inline CSS and JavaScript — no build, no server, no external assets, runnable from a bare file://. A small IIFE holds the engine: the two parameters, the in-flight Galton balls and bins, the cached Monte-Carlo result (recomputed whenever a parameter changes), and the force-directed graph state. It exposes send({ cmd }) / getState() and mirrors them on window.__SIM__. A requestAnimationFrame loop — wrapped in try/catch so a single draw bug can’t freeze the UI — reads the engine each frame and draws the active view onto one 1180 × 700 logical canvas, rebuilding a registry of hover regions so every meaningful part of every panel answers when you point at it.

← probability