def empirical_cdf(values, v):
    """
    Returns the proportion of values in ``values`` <= ``v``.
    """
    count = 0.0
    for idx, v0 in enumerate(values):
        if v0 < v:
            count += 1
    return count / len(values)