Probability mass function of the geometric distribution (number of failures before the first success). Equivalent to R's dgeom(x, prob, log = FALSE).
dgeom(x, prob, log = FALSE)
Value(s) at which to evaluate: a number, number[] or Float64Array. The result has the same shape.
number[]
Float64Array
Probability of success on each trial.
log (see DensityOptions).
log
The probability (or log probability).
dgeom(2, 0.3); // 0.147dgeom([0, 1, 2], 0.5); // [0.5, 0.25, 0.125] Copy
dgeom(2, 0.3); // 0.147dgeom([0, 1, 2], 0.5); // [0.5, 0.25, 0.125]
Probability mass function of the geometric distribution (number of failures before the first success). Equivalent to R's
dgeom(x, prob, log = FALSE).