Check that PMF tail is not sparse
Checks if the tail of a PMF vector has more than span
consecutive values smaller than tol
and throws a warning if so.
check_sparse_pmf_tail(pmf, span = 5, tol = 1e-06)
pmf
: A probability mass function vectorspan
: The number of consecutive indices in the tail to checktol
: The value which to consider the tail as sparseCalled for its side effects.
Useful links