Skip to main content

Function: spread_to_prob()

spread_to_prob(spread, sigma): number

Defined in: src/odds/math.ts:310

Home win probability from a point spread: Phi(spread / sigma) (py spread_to_prob).

Parameters​

spread​

number

Expected HOME margin in points; positive = home favoured (the negative of the quoted home line).

sigma​

number

Standard deviation of the margin in points; must not be 0.

Returns​

number

The standard-normal CDF of spread / sigma, a HOME win probability in [0, 1].

Throws​

OddsZeroDivisionError When sigma is 0.

Remarks​

The CDF is the Hart 1968 / West 2005 double-precision algorithm (~1e-15). NaN propagates; |x| > 37 saturates to exactly 0 / 1.

Example​

import sdv from 'sportsdataverse';
sdv.odds.spread_to_prob(3, 13.5); // 0.5878...