def confidence_for_uniform_audit(n,u,b):
    """
    Return the chance of seeing one of b bad precincts in a
    uniformly drawn sample of size u, from a set of size n.
    """
    miss_prob = 1.0
    for i in range(int(u)):
        miss_prob *= float(n-b-i)/(n-i)
    return 1.0 - miss_prob