The Claude Quant PlaybookDownload ebookDownload ebook

Binomial distribution

beginnerDistributions2 of 11

The number of wins in n independent trials that each win with the same chance p. It tells you how likely every possible count of winners is.

Build a trading system with Claude.Download ebook

01The formula

the number of wins in n independent trials
the number of trials (trades)
a particular number of wins
the chance each trial wins
n choose k: the number of ways to place k wins among n trials

02See it move

03Where it is used

04Why traders use it

It turns a win rate into a range of outcomes. A strategy with a 55% edge still has losing weeks, and the binomial says exactly how often.

05Worked example

With 20 trades that each win 55% of the time, the chance of exactly 14 winners is 7.46%, and the chance of at least 14 is 13.0%. On average you get 11.0 winners, give or take 2.22.

06How it is built

  1. Any one sequence with wins and losses has probability , because the trials are independent.
  2. There are such sequences.
  3. Multiply: .
  4. X is a sum of Bernoulli trials, so its mean is and its variance .

07The common mistake

Using it when trials are not independent. Trades from the same signal on the same day often win or lose together, so real counts are more spread out than the binomial says.

08In Python and LaTeX

from scipy.stats import binom
n, p, k = 20, 0.55, 14
print(round(binom.pmf(k, n, p), 4), round(binom.sf(k - 1, n, p), 4))  # P(X=k), P(X>=k)
P(X = k) = \binom{n}{k} p^k (1 - p)^{n - k}, \qquad E[X] = np,\quad \operatorname{Var}(X) = np(1-p)

09Where it fits

Rather not code the maths yourself? Describe your trading idea and let AI build the bot.

Build a bot with AgenKit

The worked example and the model run the same code, so every number matches. Models simplify markets on purpose. This is education, not financial advice.