@staticmethod
def __check_probability(p):
    """ Checks p is valid, i.e. a float value x ∈ [0.0, 1.0]. """
    if p is None or not isinstance(p, float) or not 0.0 <= p <= 1.0:
        error_msg = 'The term p should be an float x ∈ [0.0, 1.0]'
        raise ValueError(error_msg)
    else:
        return p
