def proba_func(threshold):
    """To associate an alpha to an empirical distribution function.

    Parameters
    ----------
    threshold : float
        The threshold of the target probability.

    Returns
    -------
    p_func : callable
        The probability function.

    """
    def p_func(x, axis=1):
        return (x >= threshold).mean(axis=axis)
    return p_func