def _chance(solution, pdf):
    """Return the chance of obtaining a solution from a pdf.

    The probability of many independant weighted "coin flips" (one for each bit)
    """
    # 1.0 - abs(bit - p) gives probability of bit given p
    return _prod([1.0 - abs(bit - p) for bit, p in zip(solution, pdf)])