def bayes_posterior(prior, likelihood_df):
    """Calculate posterior given likelihoods and prior."""
    p_1 = prior * likelihood_df.iloc[:, (0)]
    p_2 = (1.0 - prior) * likelihood_df.iloc[:, (1)]
    return p_1 / (p_1 + p_2)
