def posterior(y,a ,b ):
    """
    given data, a, and b from the previous func
    calculate the shape and the rate of the posterior
    """
    shape = a + sum(y)
    rate = b + len(y)
    
    return shape, rate