Expected value is the only metric that determines whether an agent should take a bet. EV = p - c for binary contracts, where p is true probability and c is the price. If EV > 0, bet. If EV ≤ 0, skip. Win rate, streak length, and gut feeling are noise.
Why This Matters for Agents
An autonomous betting agent makes one decision thousands of times: should I take this position?
This is Layer 4 — Intelligence. The EV calculation is the core of the agent’s decision engine. The agent pulls implied probabilities from the Prediction Market API Reference endpoints, compares them against its own model’s probability estimates (generated by tools like Polyseer), and computes EV. Positive EV positions enter the sizing module (Kelly Criterion). Zero or negative EV positions get skipped. No exceptions.
Every other concept in this series feeds into or out of the EV calculation. Prediction Market Math 101 teaches you how to extract the market’s implied probability — that’s one input. Bayesian updating refines the agent’s own probability estimate — that’s the other input. Kelly sizing takes EV as its prerequisite. EV is the central node.
The Math
EV from First Principles
Expected value is the probability-weighted average of all possible outcomes minus the cost of entry.
For a general bet with n possible outcomes:
EV = Σ(pᵢ × payoffᵢ) - cost
where pᵢ is the true probability of outcome i and payoffᵢ is the payout received if outcome i occurs.
For a binary prediction market contract (the most common case), this simplifies. You buy a YES contract at price c. Your model estimates the true probability at p.
EV = p × ($1.00 - c) - (1 - p) × c
EV = p - pc - c + pc
EV = p - c
That’s it. EV = p - c. The expected value of a binary contract is your estimated probability minus the price.
If your model says 62% and the market says 55%:
EV = 0.62 - 0.55 = $0.07 per contract
Seven cents of expected profit per contract. On 1,000 contracts, that’s $70 in expected profit. The math doesn’t care whether any individual contract wins or loses.
EV Per Dollar Risked (Edge)
Raw EV doesn’t account for the capital deployed. An agent needs to compare a $0.07 EV opportunity at $0.55 against a $0.07 EV opportunity at $0.90.
Edge normalizes EV by the amount risked:
Edge = EV / Cost = (p - c) / c
For the $0.55 contract with $0.07 EV:
Edge = $0.07 / $0.55 = 12.7%
For a $0.90 contract with $0.07 EV:
Edge = $0.07 / $0.90 = 7.8%
Same raw EV, but the cheap contract offers 63% more edge per dollar deployed. An agent with limited capital should prefer higher edge-per-dollar opportunities.
EV Per Unit of Time
A prediction market contract that resolves in 2 hours offers different value than one resolving in 6 months, even at identical EV.
EV per hour captures opportunity cost:
EV_per_hour = EV / estimated_hours_to_resolution
An agent sitting on a $0.07 EV position for 180 days (4,320 hours) earns:
EV_per_hour = $0.07 / 4320 = $0.0000162
The same $0.07 EV on a contract resolving in 4 hours:
EV_per_hour = $0.07 / 4 = $0.0175
The short-duration contract is 1,080x more capital-efficient. This is why agents monitoring live events and fast-resolving markets outperform agents in long-dated political markets on a risk-adjusted basis — the capital turns over faster.
EV Per Unit of Variance (Risk-Adjusted EV)
Not all positive EV bets are equally attractive when variance is a concern. A Sharpe-like ratio for betting:
Risk-Adjusted EV = EV / σ
where σ is the standard deviation of the bet’s outcome. For a binary bet at price c with estimated probability p:
σ = sqrt(p × (1-c)² + (1-p) × c²)
A high-probability, low-payout bet (p = 0.92, c = 0.85) has:
EV = 0.92 - 0.85 = $0.07
σ = sqrt(0.92 × 0.15² + 0.08 × 0.85²) = sqrt(0.0207 + 0.0578) = $0.280
Risk-Adjusted EV = $0.07 / $0.280 = 0.25
A lower-probability, higher-payout bet (p = 0.35, c = 0.25) has:
EV = 0.35 - 0.25 = $0.10
σ = sqrt(0.35 × 0.75² + 0.65 × 0.25²) = sqrt(0.1969 + 0.0406) = $0.487
Risk-Adjusted EV = $0.10 / $0.487 = 0.21
The expensive favorite has better risk-adjusted EV despite lower raw EV. An agent managing drawdown risk (see the drawdown math guide) should weight risk-adjusted EV alongside raw EV in its opportunity ranking.
Why Win Rate Is Irrelevant
This is the single most important insight for betting agents, and the one most humans get wrong.
Consider two agents over 1,000 bets:
Agent A: 60% win rate, average odds -200 (risk $2 to win $1)
Wins: 600 × $1.00 = $600
Losses: 400 × $2.00 = -$800
Net: -$200 (LOSING despite 60% win rate)
Agent B: 35% win rate, average odds +250 (risk $1 to win $2.50)
Wins: 350 × $2.50 = $875
Losses: 650 × $1.00 = -$650
Net: +$225 (PROFITABLE despite 35% win rate)
Agent A wins more often and loses money. Agent B loses most bets and makes money. The difference is EV.
Agent A’s average bet: EV = 0.60 × $1.00 - 0.40 × $2.00 = -$0.20 per bet. Agent B’s average bet: EV = 0.35 × $2.50 - 0.65 × $1.00 = +$0.225 per bet.
An agent that optimizes for win rate will systematically take -EV positions on heavy favorites. An agent that optimizes for EV will take profitable positions regardless of how often they win.
Worked Examples
Example 1: Polymarket Binary Contract
A Polymarket market on “Will the Fed cut rates at the June 2026 FOMC meeting?” shows:
YES best bid: $0.41
YES best ask: $0.43
Midpoint: $0.42 (market implies 42% probability)
Your agent’s model — trained on Fed funds futures, CPI data, and FOMC dot plots — estimates a 51% probability of a cut. Using the probability extraction method from Prediction Market Math 101:
Market implied probability: 0.42
Agent model probability: 0.51
EV = p - c = 0.51 - 0.42 = $0.09 per contract
Edge = $0.09 / $0.42 = 21.4%
This is a strong signal. At 21.4% edge, the agent passes this to the Kelly module for position sizing. On a $10,000 bankroll, quarter-Kelly would suggest risking roughly $500 on this position (exact calculation in the Kelly guide).
Example 2: Overpriced Favorite
A Kalshi market on “Will Bitcoin exceed $200,000 by Dec 31, 2026?” shows:
YES price: 8¢ ($0.08)
Your model: 4% probability
EV = 0.04 - 0.08 = -$0.04 per contract
Negative EV. The market is pricing this event at double what your model estimates. The agent skips this — or considers selling YES (buying NO at $0.92) if the model has high confidence.
Selling YES (equivalently, buying NO):
NO price = 1 - 0.08 = $0.92
Probability of NO = 1 - 0.04 = 0.96
EV of NO = 0.96 - 0.92 = $0.04 per contract
Edge = $0.04 / $0.92 = 4.3%
A modest 4.3% edge on the NO side. Whether this is worth the capital commitment depends on resolution time and alternative opportunities.
Example 3: Multi-Outcome Market
A “Who will win the 2026 World Series?” market on Polymarket shows 8 teams. Your model disagrees with the market on three of them:
Team Market Price Model Prob EV per contract
──────────────────────────────────────────────────────
Dodgers $0.22 0.24 +$0.02
Yankees $0.18 0.15 -$0.03
Astros $0.11 0.14 +$0.03
Braves $0.09 0.08 -$0.01
Phillies $0.08 0.09 +$0.01
Orioles $0.07 0.07 $0.00
Mets $0.06 0.05 -$0.01
Field $0.19 0.18 -$0.01
The agent identifies three +EV positions: Dodgers (+$0.02), Astros (+$0.03), and Phillies (+$0.01). It skips the rest. Note: taking multiple positions in the same multi-outcome market introduces correlation — the correlation and portfolio theory guide covers how to size correlated positions.
Implementation
Here’s a complete EV calculator module an agent can drop into its decision pipeline:
import numpy as np
from dataclasses import dataclass
@dataclass
class EVResult:
"""EV analysis output for a single opportunity."""
market_id: str
ev: float
edge_pct: float
ev_per_hour: float
risk_adjusted_ev: float
model_prob: float
market_prob: float
recommended_action: str # "buy_yes", "buy_no", "skip"
def binary_ev(model_prob: float, market_price: float) -> float:
"""
Compute EV for a binary YES contract.
EV = p - c, where p = model probability, c = contract price.
"""
return model_prob - market_price
def binary_edge(model_prob: float, market_price: float) -> float:
"""Edge as percentage of capital risked."""
if market_price <= 0:
return 0.0
return (model_prob - market_price) / market_price
def binary_std(model_prob: float, market_price: float) -> float:
"""Standard deviation of a single binary bet outcome."""
p = model_prob
c = market_price
return np.sqrt(p * (1 - c) ** 2 + (1 - p) * c ** 2)
def evaluate_opportunity(
market_id: str,
model_prob: float,
best_bid: float,
best_ask: float,
hours_to_resolution: float = 24.0,
fee_rate: float = 0.02,
min_edge: float = 0.03
) -> EVResult:
"""
Full EV evaluation for a binary prediction market opportunity.
Checks both YES and NO sides, returns the better option or skip.
fee_rate: platform fee on winnings (Polymarket = 0.02).
min_edge: minimum edge threshold to recommend action.
"""
midpoint = (best_bid + best_ask) / 2
# YES side
yes_price = best_ask # cost to buy YES immediately
yes_ev = binary_ev(model_prob, yes_price)
yes_edge = binary_edge(model_prob, yes_price)
# NO side
no_price = 1 - best_bid # cost to buy NO = 1 - YES bid
no_prob = 1 - model_prob
no_ev = binary_ev(no_prob, no_price)
no_edge = binary_edge(no_prob, no_price)
# Pick the better side
if yes_ev > no_ev and yes_edge >= min_edge:
action = "buy_yes"
ev = yes_ev
edge = yes_edge
price = yes_price
elif no_edge >= min_edge:
action = "buy_no"
ev = no_ev
edge = no_edge
price = no_price
else:
action = "skip"
ev = max(yes_ev, no_ev)
edge = max(yes_edge, no_edge)
price = yes_price if yes_ev >= no_ev else no_price
# Fee adjustment
if ev > 0:
profit_if_win = 1.0 - price
fee_cost = fee_rate * profit_if_win * model_prob
ev_after_fees = ev - fee_cost
else:
ev_after_fees = ev
sigma = binary_std(model_prob, price)
ev_per_hour = ev_after_fees / max(hours_to_resolution, 0.01)
risk_adj = ev_after_fees / sigma if sigma > 0 else 0.0
return EVResult(
market_id=market_id,
ev=ev_after_fees,
edge_pct=edge * 100,
ev_per_hour=ev_per_hour,
risk_adjusted_ev=risk_adj,
model_prob=model_prob,
market_prob=midpoint,
recommended_action=action
)
def rank_opportunities(results: list[EVResult]) -> list[EVResult]:
"""Rank opportunities by EV per hour, filtering out skips."""
actionable = [r for r in results if r.recommended_action != "skip"]
return sorted(actionable, key=lambda r: r.ev_per_hour, reverse=True)
# --- Demo: evaluate a batch of markets ---
if __name__ == "__main__":
markets = [
{"id": "fed-rate-cut-june-2026", "model_prob": 0.51, "bid": 0.41, "ask": 0.43, "hours": 2160},
{"id": "btc-200k-2026", "model_prob": 0.04, "bid": 0.07, "ask": 0.09, "hours": 6600},
{"id": "spacex-starship-q2", "model_prob": 0.72, "bid": 0.61, "ask": 0.64, "hours": 1440},
{"id": "uk-snap-election-2026", "model_prob": 0.12, "bid": 0.14, "ask": 0.17, "hours": 4320},
]
results = []
for m in markets:
result = evaluate_opportunity(
market_id=m["id"],
model_prob=m["model_prob"],
best_bid=m["bid"],
best_ask=m["ask"],
hours_to_resolution=m["hours"]
)
results.append(result)
ranked = rank_opportunities(results)
print(f"{'Market':<28} {'Action':<10} {'EV':>7} {'Edge%':>7} {'EV/hr':>10} {'RiskAdj':>8}")
print("-" * 78)
for r in ranked:
print(f"{r.market_id:<28} {r.recommended_action:<10} ${r.ev:>.4f} {r.edge_pct:>6.1f}% {r.ev_per_hour:>10.6f} {r.risk_adjusted_ev:>8.3f}")
print(f"\nSkipped {len(results) - len(ranked)} opportunities (below edge threshold)")
The EV-to-Profit Gap: Why Variance Matters
An agent with a 5% edge per bet will be profitable in the long run. But “long run” is doing heavy lifting in that sentence.
The standard deviation of total profit after n independent bets of equal size is approximately:
σ_total ≈ σ_single × √n
The expected profit grows linearly with n, but the standard deviation grows with √n. This means the signal-to-noise ratio (EV / σ) improves with more bets — but slowly.
After 100 bets at 5% edge on contracts priced at $0.50:
Expected profit: 100 × $0.025 = $2.50
σ per bet: $0.50
σ total: $0.50 × √100 = $5.00
Signal-to-noise: $2.50 / $5.00 = 0.50
There’s a meaningful probability (~31%) that the agent is underwater after 100 bets despite having a real, positive edge. After 1,000 bets:
Expected profit: 1000 × $0.025 = $25.00
σ total: $0.50 × √1000 = $15.81
Signal-to-noise: $25.00 / $15.81 = 1.58
Now the probability of being underwater is ~5.7%. After 10,000 bets, the signal-to-noise ratio reaches 5.0 and the probability of being down is essentially zero.
This is why agents need proper bankroll management. A +EV strategy will eventually make money. But “eventually” can be a long time, and going broke before “eventually” arrives is the real risk. The Kelly Criterion solves this by sizing bets proportional to edge, ensuring the agent survives the variance.
Limitations and Edge Cases
1. Model calibration. EV = p - c requires that p is accurate. If your model says 62% but the true probability is 55%, your perceived $0.07 EV is actually -$0.03. Garbage probabilities in, garbage EV out. The calibration and model evaluation guide covers how an agent tests whether its own probability estimates are reliable.
2. Market impact. An agent buying $50,000 of YES contracts will move the price. The effective cost is higher than the quoted ask when the order walks up the book. EV calculations should use the volume-weighted average price (VWAP) across the levels consumed, not the top-of-book price. The market microstructure guide covers slippage modeling.
3. Correlated positions. An agent with YES positions on “Democrats win the House” and “Democrats win the Senate” has correlated exposure. The portfolio’s EV is the sum of individual EVs, but the variance is amplified by the correlation. Evaluating positions independently misses portfolio-level risk. See the correlation and portfolio theory guide.
4. Resolution risk. Some prediction markets have ambiguous resolution criteria. A contract on “Will X happen by December 2026?” might settle based on a specific source’s determination. If the resolution process introduces noise (e.g., the source is slow, definitions are disputed), the effective probability includes resolution risk that the model may not capture.
5. Fee sensitivity at small edges. Polymarket’s 2% winner fee is irrelevant for 20% edge bets. It matters for 3% edge bets. An agent operating near the fee-adjusted breakeven should compute EV after fees, not before. The implementation above handles this.
FAQ
How do you calculate expected value in prediction markets?
For a binary prediction market contract, EV = p - c, where p is your estimated true probability and c is the contract price. If your model says an event has a 62% chance and the YES contract costs $0.55, your EV is $0.62 - $0.55 = $0.07 per contract. Positive EV means the bet is worth taking over the long run.
Why is expected value more important than win rate for betting agents?
Win rate ignores payoff magnitude. An agent winning 30% of bets at +300 odds earns more than an agent winning 60% at -200 odds. EV captures both probability and payoff in a single number. Maximizing EV — not win rate — is the mathematically proven objective for long-run profit.
How many bets does it take for results to converge to expected value?
Variance dominates over short samples. At a 5% edge, standard deviation after 100 bets is roughly 2x the expected profit. Convergence to true EV typically requires 1,000+ bets, depending on edge size and odds distribution. This is why bankroll management via the Kelly Criterion is essential.
What is the difference between expected value and edge in sports betting?
Edge is EV expressed as a percentage of the amount risked. If EV = $0.07 on a $0.55 contract, edge = $0.07 / $0.55 = 12.7%. Edge normalizes EV across different price points, letting agents compare opportunities at $0.20 and $0.80 on equal footing.
How does expected value connect to Kelly Criterion bet sizing?
EV answers whether to bet (is EV > 0?). Kelly answers how much to bet given that positive EV exists. The Kelly formula f* = (bp - q) / b requires a positive EV bet as input — without edge, Kelly returns zero. See the Kelly Criterion guide for the full sizing framework.
What’s Next
This page gives your agent its decision rule: compute EV, trade only when EV > 0. The next questions are how much to bet and where do the probability estimates come from.
- Next in the series: The Efficient Market Hypothesis in Prediction Markets — when and why markets get prices wrong, creating the mispricings that generate positive EV.
- Bet sizing: The Kelly Criterion — once EV is positive, Kelly tells you the optimal fraction of bankroll to wager.
- Probability estimation: Bayesian Updating for Prediction Market Agents — how an agent generates the model probabilities that feed into EV calculations.
- See the full stack: The Agent Betting Stack shows how EV calculation fits into the four-layer agent architecture.
- Tool integration: Polyseer uses multi-agent Bayesian analysis to produce the probability estimates that power EV comparisons against market prices.
