Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions pymc/distributions/discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ class Bernoulli(Discrete):
.. math:: f(x \mid p) = p^{x} (1-p)^{1-x}

.. plot::
:context: close-figs

import matplotlib.pyplot as plt
import numpy as np
Expand Down Expand Up @@ -366,9 +367,9 @@ class Bernoulli(Discrete):

Parameters
----------
p: float
p : tensor_like of float
Probability of success (0 < p < 1).
logit_p: float
logit_p : tensor_like of float
Alternative log odds for the probability of success.
"""
rv_op = bernoulli
Expand Down Expand Up @@ -568,6 +569,7 @@ class Poisson(Discrete):
.. math:: f(x \mid \mu) = \frac{e^{-\mu}\mu^x}{x!}

.. plot::
:context: close-figs

import matplotlib.pyplot as plt
import numpy as np
Expand All @@ -592,7 +594,7 @@ class Poisson(Discrete):

Parameters
----------
mu: float
mu : tensor_like of float
Expected number of occurrences during the given interval
(mu >= 0).

Expand Down Expand Up @@ -685,6 +687,7 @@ class NegativeBinomial(Discrete):
(\alpha/(\mu+\alpha))^\alpha (\mu/(\mu+\alpha))^x

.. plot::
:context: close-figs

import matplotlib.pyplot as plt
import numpy as np
Expand Down Expand Up @@ -732,13 +735,13 @@ def NegBinom(a, m, x):

Parameters
----------
alpha: float
alpha : tensor_like of float
Gamma distribution shape parameter (alpha > 0).
mu: float
mu : tensor_like of float
Gamma distribution mean (mu > 0).
p: float
p : tensor_like of float
Alternative probability of success in each trial (0 < p < 1).
n: float
n : tensor_like of float
Alternative number of target success trials (n > 0)
"""
rv_op = nbinom
Expand Down Expand Up @@ -853,6 +856,7 @@ class Geometric(Discrete):
.. math:: f(x \mid p) = p(1-p)^{x-1}

.. plot::
:context: close-figs

import matplotlib.pyplot as plt
import numpy as np
Expand All @@ -876,7 +880,7 @@ class Geometric(Discrete):

Parameters
----------
p: float
p : tensor_like of float
Probability of success on an individual trial (0 < p <= 1).
"""

Expand Down Expand Up @@ -962,6 +966,7 @@ class HyperGeometric(Discrete):
.. math:: f(x \mid N, n, k) = \frac{\binom{k}{x}\binom{N-k}{n-x}}{\binom{N}{n}}

.. plot::
:context: close-figs

import matplotlib.pyplot as plt
import numpy as np
Expand Down