ParetoNBD#

class pymc_marketing.clv.distributions.ParetoNBD(name: str, *args, rng=None, dims: str | Sequence[str | None] | None = None, initval=None, observed=None, total_size=None, transform=UNSET, default_transform=UNSET, **kwargs)[source]#

Population-level distribution class for a continuous, non-contractual, Pareto/NBD process.

It is based on Schmittlein, et al. in [2].

The likelihood function is derived from equations (22) and (23) of [3], with terms rearranged for numerical stability.

The modified expression is provided below:

\[\begin{split}\begin{align} \text{if }\alpha > \beta: \\ \\ \mathbb{L}(r, \alpha, s, \beta | x, t_x, T) &= \frac{\Gamma(r+x)\alpha^r\beta}{\Gamma(r)+(\alpha +t_x)^{r+s+x}} [(\frac{s}{r+s+x})_2F_1(r+s+x,s+1;r+s+x+1;\frac{\alpha-\beta}{\alpha+t_x}) \\ &+ (\frac{r+x}{r+s+x}) \frac{_2F_1(r+s+x,s;r+s+x+1;\frac{\alpha-\beta}{\alpha+T})(\alpha +t_x)^{r+s+x}} {(\alpha +T)^{r+s+x}}] \\ \\ \text{if }\beta >= \alpha: \\ \\ \mathbb{L}(r, \alpha, s, \beta | x, t_x, T) &= \frac{\Gamma(r+x)\alpha^r\beta}{\Gamma(r)+(\beta +t_x)^{r+s+x}} [(\frac{s}{r+s+x})_2F_1(r+s+x,r+x;r+s+x+1;\frac{\beta-\alpha}{\beta+t_x}) \\ &+ (\frac{r+x}{r+s+x}) \frac{_2F_1(r+s+x,r+x+1;r+s+x+1;\frac{\beta-\alpha}{\beta+T})(\beta +t_x)^{r+s+x}} {(\beta +T)^{r+s+x}}] \end{align}\end{split}\]

Support

\(t_j >= 0\) for \(j = 1, \dots, x\)

Mean

\(\mathbb{E}[X(t) | r, \alpha, s, \beta] = \frac{r\beta}{\alpha(s-1)}[1-(\frac{\beta}{\beta + t})^{s-1}]\)

References

[2]

David C. Schmittlein, Donald G. Morrison and Richard Colombo. “Counting Your Customers: Who Are They and What Will They Do Next.” Management Science,Vol. 33, No. 1 (Jan., 1987), pp. 1-24.

[3]

Fader, Peter & G. S. Hardie, Bruce (2005). “A Note on Deriving the Pareto/NBD Model and Related Expressions.” http://brucehardie.com/notes/009/pareto_nbd_derivations_2005-11-05.pdf

Methods

ParetoNBD.__init__(*args, **kwargs)

ParetoNBD.dist(r, alpha, s, beta, T, **kwargs)

Get the distribution from the parameters.

ParetoNBD.logp(r, alpha, s, beta, T)

Log-likelihood of the distribution.

Attributes

rv_op