Home/Financial AI/Part I

Episode 02 · Foundation · Foundations

Probability and expectation: the desk’s three words

North Desk's Coin now stores attributes: P, Bernoulli X, E[W]=$925, variance. A softmax is P. "Eighty percent confident" is English. Concept only — the chapter works the $925 path.

Related reading This episode stands on its own, but Ep01 · The Coin Flip covers why a single trade outcome tells you almost nothing about edge, if you want that context first.

Figure 1. Three primitives in order. Skip any one and “edge” collapses back into mood.

Probability to random variable to expectation flow

Ep01 left a wound: conviction on a single print is not measurement. To heal it you need three words that every later chapter reuses. Skip them and Kelly becomes a slogan, information coefficient becomes a spreadsheet decoration, and convergence cards become green theatre.

What a probability is

A probability is a number between 0 and 1 assigned to an event.

Philosophers argue about what probability means (long-run frequency versus degree of belief). Desks cannot wait for that war to end. What desks need is the arithmetic: numbers that obey non-negativity, normalization, and additivity for mutually exclusive events. Frequentist or Bayesian, the gates later in this series still consume those numbers.

Plain definition A probability assignment maps events to [0, 1], with P(everything) = 1,
and P(A or B) = P(A) + P(B) when A and B cannot both happen.

Critical production rule: every probability float must name its event. “Model confidence 0.73” with no horizon, no win definition, and no cost treatment is not a probability a desk can spend.

The Bernoulli random variable

A random variable maps outcomes to numbers. The workhorse for trades is Bernoulli:

Bernoulli trade flag X = 1 if the trade wins, 0 if it loses
P(X = 1) = p,   P(X = 0) = 1 − p
E[X] = p

That is Ep01’s coin, now named as an object. Labeled closes, win/loss flags, and many gate inputs are Bernoulli samples or transforms of them. When someone says “our sleeve wins 55% of the time,” they are claiming E[X] = 0.55 for the class definition they wrote down.

Expectation: the centre of mass

For a general random variable Y:

Expectation E[Y] = Σ y · P(Y = y)

Weight each possible number by how strongly the model believes it, then add. That weighted sum is the centre of mass of the uncertainty.

Two properties you will use constantly:

  1. Linearity. E[aY + b] = a E[Y] + b. Scaling risk and shifting by a constant fee behave cleanly.
  2. Not the median, not the mode. Expectation can sit where no single outcome lives. A rare large loss can drag E[Y] negative even if most days look fine. “Most trades feel okay” is not EV.

Figure 2. Why a 55% coin still feels almost fair. The wobble barely shrinks while the bias is tiny.

Variance of fair coin versus 55 percent coin

Variance: how much the outcome wobbles

Variance Var(Y) = E[(Y − E[Y])²]
For Bernoulli X: Var(X) = p(1 − p)
At p = 0.50: 0.25  |  At p = 0.55: 0.2475

Small edges drown in noise because the wobble is comparable to a fair coin while the bias is only a few points. Ep05 turns this into the square-root rule for standard errors. Lock the intuition now: small edge plus Bernoulli variance means you need large N.

WordDesk translation
Probability pClaimed win rate of a defined class
Random variable XNumeric encoding of the outcome
Expectation E[·]What the class is supposed to average to
VarianceHow violently individual prints deviate

Independent versus dependent samples

Classical sample-size talk assumes independent flips. Markets are not polite. Clustering, regimes, and overlapping holdings make effective N smaller than calendar trade count. Part III will harden that (HAC, effective N).

Production trench
Counting raw fills as independent Bernoulli trials overstates certainty. If your overnight job prints “N = 200” but half are the same theme in the same week, your true information is thinner. Treat headline N as an upper bound until dependence is modelled.

How this shows up in production

1. Probability as decoration. A model emits 0.73 with no event definition.

2. Confusing a forecast with an expectation of P&L. A directional score is not automatically E[R-multiple after costs]. Ep03 forces that translation.

3. Averaging incompatible beliefs. Two agents publish p for differently defined events, then someone averages them into “consensus.” That invents a third geometry.

4. Green win-rate tiles with no Var language. A dashboard that shows only p̂ without wobble or N trains humans to overreact to noise.

What to lock
  • Every probability float must name its event (horizon, win definition, costs).
  • Store outcomes as random variables you can audit.
  • Separate E[·] claims from single prints in UI and promotion memos.
  • When you quote N, ask whether samples are close to independent.
  • Do not average probabilities across differently defined events.
  • Next: attach money. EV in R-units is how these words become a spend/refuse gate.
Book pointer · Chapter 2 The textbook develops axioms, linearity, Bernoulli variance, and independence carefully. This essay is the vocabulary layer so Ep03’s EV formula is not a slogan.

Ep02Open on YouTube ↗

Next. Open Ep03: Expected value: the only number that may spend. Previous: Ep01 (The Coin Flip: why conviction is not edge). Part I index.