def frequency_to_probability(counts_table):
    """
    Convert a contingency table expressed in frequencies to one
    expressed in probabilities.
    """
    total = counts_table.sum()
    probs_table = counts_table / float(total)
    return probs_table
