# statsmodels.duration.hazard_regression.rv_discrete_float¶

class statsmodels.duration.hazard_regression.rv_discrete_float(xk, pk)[source]

A class representing a collection of discrete distributions.

Parameters
xk

The support points, should be non-decreasing within each row.

pk

The probabilities, should sum to one within each row.

Notes

Each row of xk, and the corresponding row of pk describe a discrete distribution.

xk and pk should both be two-dimensional ndarrays. Each row of pk should sum to 1.

This class is used as a substitute for scipy.distributions. rv_discrete, since that class does not allow non-integer support points, or vectorized operations.

Only a limited number of methods are implemented here compared to the other scipy distribution classes.

Methods

 Returns a vector containing the mean values of the discrete distributions. rvs([n]) Returns a random sample from the discrete distribution. Returns a vector containing the standard deviations of the discrete distributions. Returns a vector containing the variances of the discrete distributions.

Methods

 Returns a vector containing the mean values of the discrete distributions. rvs([n]) Returns a random sample from the discrete distribution. Returns a vector containing the standard deviations of the discrete distributions. Returns a vector containing the variances of the discrete distributions.