pymc.Geometric#

class pymc.Geometric(name, *args, **kwargs)[source]#

Geometric log-likelihood.

The probability that the first success in a sequence of Bernoulli trials occurs on the x’th trial. The pmf of this distribution is

\[f(x \mid p) = p(1-p)^{x-1}\]

(Source code, png, hires.png, pdf)

../../../_images/pymc-Geometric-1.png

Support

\(x \in \mathbb{N}_{>0}\)

Mean

\(\dfrac{1}{p}\)

Variance

\(\dfrac{1 - p}{p^2}\)

Parameters
ptensor_like of float

Probability of success on an individual trial (0 < p <= 1).

Methods

Geometric.__init__(*args, **kwargs)

Geometric.dist(p, *args, **kwargs)

Creates a tensor variable corresponding to the cls distribution.

Geometric.logcdf(p)

Compute the log of the cumulative distribution function for Geometric distribution at the specified value.

Geometric.logp(p)

Calculate log-probability of Geometric distribution at specified value.

Geometric.moment(size, p)

Attributes

rv_class

rv_op