Math Series

Layer 3 — Trading

Arbitrage Detection Algorithms for Multi-Platform Agents

Mathematical framework for detecting and executing arbitrage across prediction markets and sportsbooks. Covers two-way, three-way, and cross-platform arbs with dutching formulas, execution risk models, and a full Python scanner pulling from The Odds API and Polymarket CLOB.

Read →
Layer 4 — Intelligence

Bayesian Updating for Prediction Market Agents: How to Update Beliefs with New Information

How autonomous betting agents use Bayes' theorem to update probability estimates when new polls, news, or market data arrives — with full derivations, conjugate priors, multi-source fusion, and production Python code.

Read →
Layer 4 — Intelligence

Calibration and Model Evaluation: How Agents Know Their Models Are Good

The mathematical framework for evaluating prediction model accuracy — calibration plots, Brier score decomposition, ECE, Hosmer-Lemeshow tests, and automated calibration audits for betting agents.

Read →
Layer 4 — Intelligence

Closing Line Value (CLV): The Gold Standard Metric for Sharp Betting Agents

Why beating the closing line is the most reliable indicator of long-term sports betting profitability, how to calculate CLV formally, and how autonomous agents should track it as their primary model validation metric.

Read →
Layer 2 — Wallet

Correlation and Portfolio Theory for Multi-Market Agents: Markowitz Optimization for Betting Portfolios

How autonomous agents apply Markowitz mean-variance optimization to prediction market and sports betting portfolios. Build covariance matrices, compute efficient frontiers, and set position limits based on correlation structure.

Read →
Layer 4 — Intelligence

Correlation Risk in Parlays and Multi-Leg Bets: When 'Independent' Events Aren't

The math of correlated parlays — why sportsbooks price legs as independent, how to measure correlation from historical data, and how agents exploit SGP mispricing for +EV multi-leg bets.

Read →
Layer 2 — Wallet

Crypto and DeFi Prediction Markets: Volatility, Liquidation, and Yield Math

The mathematics of stablecoin risk, gas optimization, impermanent loss, liquidity provision yield, collateralization, liquidation cascades, and bridge risk for prediction market agents operating on-chain.

Read →
Layer 2 — Wallet

Drawdown Math: Understanding and Surviving Variance

The mathematics of losing streaks, expected maximum drawdown, gambler's ruin probability, and stop-loss thresholds for autonomous betting agents.

Read →
Layer 4 — Intelligence

Elo Ratings and Power Rankings: Building Agent Rating Systems from Scratch

The complete math behind Elo ratings, Glicko-2, and margin-of-victory adjustments for building team and player rating systems that produce calibrated probabilities for sports betting agents.

Read →
Layer 4 — Intelligence

Expected Value (EV) for Prediction Market Agents: The Only Metric That Matters

Why expected value is the only correct objective function for autonomous betting agents. Formal EV derivation, EV per dollar risked, EV per unit of time, and Python implementation for agent decision pipelines.

Read →
Layer 4 — Intelligence

Feature Engineering for Sports Prediction Models: Building the Signal That Powers Agent Intelligence

How to build, select, and pipeline features for sports prediction models — raw stats, derived metrics, rolling windows, opponent adjustments, interaction terms, and LASSO selection with full Python implementation.

Read →
Layer 4 — Intelligence

Game Theory for Prediction Market Agents: Nash Equilibrium and Adversarial Play

Game-theoretic framework for autonomous prediction market agents: Nash equilibrium, no-trade theorem violations, information asymmetry, market impact modeling, stealth execution on Polymarket CLOB, and predatory trading detection.

Read →
All Layers

Glossary of Betting Math Terms: 200+ Definitions for Agent Developers

Comprehensive A-Z glossary of every mathematical, statistical, and betting term used in the AgentBets Math Behind Betting series. Each entry includes a precise definition, the formula where applicable, and cross-references to the guide covering it in depth.

Read →
Layer 4 — Intelligence

Information Theory and Betting: Entropy, KL Divergence, and Edge Quantification

How to quantify betting edge using Shannon entropy, KL divergence, mutual information, and cross-entropy. Information-theoretic tools for autonomous agents to rank opportunities, select features, and measure model quality.

Read →
Layer 3 — Trading

LMSR and Automated Market Makers: The Math Behind Prediction Market Liquidity

Derives the Logarithmic Market Scoring Rule (LMSR) cost function, price function, and bounded loss theorem. Compares LMSR to CLOB and constant-product AMMs for autonomous agent trading.

Read →
Layer 4 — Intelligence

Market Manipulation Detection: Math for Identifying Artificial Price Movements

Statistical methods for detecting wash trading, spoofing, and artificial price movements in prediction markets. Martingale tests, Benford's law, variance ratio tests, and graph-based wash trading detection for autonomous agents.

Read →
Layer 3 — Trading

Market Microstructure for Prediction Markets: Orderbooks, Spreads, and Liquidity

How prediction market orderbooks work — CLOB architecture, bid-ask spreads, depth of book analysis, slippage modeling, and maker-taker fees for autonomous betting agents.

Read →
Layer 4 — Intelligence

MLB Run Expectancy and Win Expectancy: The Markov Chain Approach

Baseball as a Markov chain: derive run expectancy from the 24 base-out states, build a full win expectancy model, compute linear weights (wOBA, FIP), and apply the framework to MLB betting lines and F5 totals.

Read →
Layer 4 — Intelligence

Monte Carlo Simulation for Prediction Market Position Sizing

How to use Monte Carlo methods to simulate thousands of outcome scenarios, stress-test Kelly sizing under model uncertainty, and set position limits for autonomous prediction market agents.

Read →
Layer 4 — Intelligence

Multi-Armed Bandit Problems: How Agents Explore vs. Exploit in Betting Markets

How autonomous betting agents use multi-armed bandit algorithms — UCB, Thompson sampling, epsilon-greedy, and contextual bandits — to balance exploration and exploitation across sports betting and prediction markets.

Read →
Layer 3 — Trading

Multi-Outcome Markets: Combinatorial Math and Conditional Probability

The mathematics of n-outcome prediction markets, combinatorial market makers that avoid exponential blowup, and conditional probability markets — with Python implementations for autonomous agents.

Read →
Layer 4 — Intelligence

NBA Win Probability and Live Betting Models: Score Differential, Time, and Pace

Build a real-time NBA win probability model using score margin, time remaining, pace, and team quality. Deploy it as a live betting agent that detects mispriced in-game lines.

Read →
Layer 4 — Intelligence

NFL Modeling: Point Spreads, Totals, and Player Prop Math

Build NFL point spread, totals, and player prop models from team efficiency metrics, key number analysis, teaser math, and same-game parlay correlation exploitation for autonomous betting agents.

Read →
Layer 4 — Intelligence

Poisson Distribution and Sports Modeling: Projecting Scores from First Principles

How to use the Poisson distribution to model goal-scoring in soccer, hockey, and baseball, build match probability matrices, and find +EV bets against sportsbook lines.

Read →
Layer 4 — Intelligence

Political Prediction Markets: Modeling Elections with Fundamentals and Polls

How to build quantitative models for political prediction markets using economic fundamentals, poll aggregation, state-level correlation modeling, and t-distribution win probability conversion.

Read →
Layer 3 — Trading

Prediction Market Math 101: Prices, Probabilities, and the No-Arbitrage Condition

How prediction market prices equal implied probabilities, why mispricing creates arbitrage, and how agents extract probabilities from Polymarket and Kalshi orderbooks.

Read →
Layer 4 — Intelligence

Prediction Market Scoring Rules: Brier, Logarithmic, and Proper Scoring

Derives the Brier score and logarithmic scoring rule, proves both are proper, and shows how autonomous agents use scoring rules to evaluate forecast quality against prediction market consensus.

Read →
Layer 4 — Intelligence

Probability Distribution Cheat Sheet for Betting and Prediction Markets

Quick reference guide to every probability distribution a betting agent needs: PDF/PMF formulas, parameter estimation, scipy.stats code, and worked examples for Bernoulli, Binomial, Poisson, Normal, Log-normal, Beta, Exponential, Negative Binomial, Student's t, Dirichlet, and Uniform distributions.

Read →
All Layers

Python Libraries for Quantitative Betting: The Agent Developer's Toolkit

Curated guide to every Python library an autonomous betting agent needs — from NumPy and SciPy to py-clob-client and nfl_data_py. Installation, usage examples, and Agent Betting Stack layer mapping for each.

Read →
Layer 4 — Intelligence

Regression Models for Sports Betting: From Linear to Logistic to Ridge

Build predictive sports models using linear, logistic, Poisson, and regularized regression. Full derivations, NFL worked examples, and production-ready Python code for autonomous betting agents.

Read →
Layer 4 — Intelligence

Reinforcement Learning for Dynamic Bet Timing and Execution

How to frame autonomous bet timing as a reinforcement learning problem — MDPs, Q-learning, DQN, policy gradients, sim-to-real transfer, and combining RL execution with model-based edge detection.

Read →
Layer 4 — Intelligence

Soccer/Football Expected Goals (xG): Mathematical Framework for Betting

How to build and exploit expected goals (xG) models for soccer betting — from logistic regression shot models to Poisson match outcome predictions, with Python implementation for autonomous agents.

Read →
Layer 3 — Trading

Sports Betting Math 101: Odds Formats, Implied Probability, and the Vig

Complete primer on sports betting mathematics: American, decimal, and fractional odds conversions, implied probability extraction, vig calculation, and vig removal methods agents need for profitable execution.

Read →
Layer 4 — Intelligence

Statistical Significance in Sports Betting: Sample Size, p-Values, and When to Trust Results

How to determine whether a betting edge is real or noise. Hypothesis testing, required sample sizes, p-values, confidence intervals, Bonferroni correction, Bayesian alternatives, and statistical power for autonomous betting agents.

Read →
Layer 4 — Intelligence

The Efficient Market Hypothesis in Prediction Markets: When and Why Markets Get It Wrong

Where prediction markets fail to be efficient, why systematic mispricings persist, and how autonomous agents exploit weak-form, semi-strong, and strong-form inefficiencies on Polymarket, Kalshi, and sportsbooks.

Read →
Layer 4 — Intelligence

The Kelly Criterion: Optimal Bet Sizing for Autonomous Agents

Full mathematical derivation of the Kelly Criterion for optimal bet sizing, fractional Kelly variants, simultaneous Kelly for multiple bets, and Python implementation for autonomous betting agents.

Read →
Layer 2 — Wallet

The Mathematics of Bankroll Growth: Compound Returns in Betting

Formal derivation of geometric bankroll growth rates, the gain-loss asymmetry, time to double a bankroll, certainty equivalents, and how autonomous betting agents set and measure ROI targets.

Read →
All Layers

The Odds API to Edge Detection: Building an End-to-End Agent Math Pipeline

Complete eight-step mathematical pipeline from raw odds ingestion through edge detection to trade execution. Covers vig removal with Shin's method, model prediction, Kelly sizing, portfolio correlation checks, and CLV feedback loops — with full Python code.

Read →
Layer 3 — Trading

Time Series and Line Movement Analysis for Betting Agents

How to analyze and exploit line movement patterns using time series methods — reverse line movement, steam moves, ARIMA forecasting, and real-time monitoring for autonomous betting agents.

Read →
Layer 4 — Intelligence

World Cup 2026 Betting Math: Tournament Structure, Group Stage, and Knockout Models

Mathematical modeling for the expanded 48-team World Cup 2026 — Poisson group stage simulation, Elo-based match probabilities, knockout bracket propagation via Monte Carlo, and futures pricing for autonomous betting agents.

Read →