fcaz.stats.chf#

fcaz.stats.chf(dist: SupportsLogSf, x: float | floating[Any] | NDArray[number[Any]] | Sequence[float | floating[Any] | NDArray[number[Any]]]) → float64 | NDArray[float64][source]#

Cumulative hazard function of a frozen distribution (i.e., one with parameters already fixed).

Parameters:
  • dist (frozen distribution) – Any object with a logsf method, e.g. scipy.stats.expon(scale=8).

  • x (array_like) – Points at which to evaluate the cumulative hazard.

Returns:

\(H(x) = -\\ln S(x)\).

Return type:

ndarray

Examples

>>> from scipy import stats
>>> from fcaz.stats import chf
>>> round(float(chf(stats.expon(scale=8), 2.5)), 4)
0.3125