Function: prob_from_decimal()
prob_from_decimal(
price):number
Defined in: src/odds/math.ts:109
Raw (vig-included) implied probability of a decimal price (py prob_from_decimal).
Parameters
price
number
Decimal (European) price; must be strictly greater than 1.
Returns
number
1 / price.
Throws
OddsValueError When price <= 1.
Remarks
A NaN price is not rejected by the <= 1 check and yields NaN.
Example
import sdv from 'sportsdataverse';
sdv.odds.prob_from_decimal(2.5); // 0.4