fcaz.stats.hf#

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

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

Parameters:
  • dist (frozen distribution) – Any object with pdf and sf methods, e.g. scipy.stats.expon(scale=8).

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

Returns:

\(h(x) = f(x) / S(x)\).

Return type:

ndarray

Examples

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