import math


def qual_eps(eps, p=0.5):
    """Provide a qualitative explanation for what a particular epsilon value means.

    Recommended description:
        If someone believed a user was in the data with probability p,
        then at most after seeing the data they will be qual_eps(eps, p) certain
        (assuming the sensitivity value is correct).
        e.g., for eps=1; p=0.5, they'd go from 50% certainty to at most 73.1% certainty.

    Parameters:
        eps: epsilon value that quantifies "privacy" level of differential privacy.
        p: initial belief that a given user is in the data -- e.g.,:
            0.5 represents complete uncertainty (50/50 chance)
            0.01 represents high certainty the person isn't in the data
            0.99 represents high certainty the person is in the data
    """
    # unacceptable values; p must be (0,1) -- i.e. some uncertainty
    if p > 0 and p < 1:
        return ((math.e ** eps) * p) / (1 + (((math.e ** eps) - 1) * p))
    else:
        return None