def BetaVariable(mu=.5, v=0.025):
    """
    This function defines alpha and beta for a beta distribution based on
    a given mean and variance
    """
    a = ((1 - mu) / v - 1 / mu) * mu ** 2
    b = a * (1 / mu - 1)
    return a, b