def calculate_probabilities(previous_probabilities):
    """
Calculate the probabilities for each genotype (AA, Aa, aa)
based on the probabilities of the previous generation.
    """
    probability_AA = (previous_probabilities["AA"] * 1/2 +
                      previous_probabilities["Aa"] * 1/4 +
                      previous_probabilities["aa"] * 0)
    
    probability_Aa = (previous_probabilities["AA"] * 1/2 +
                      previous_probabilities["Aa"] * 1/2 +
                      previous_probabilities["aa"] * 1/2)
            
    probability_aa = (previous_probabilities["AA"] * 0 +
                      previous_probabilities["Aa"] * 1/4 +
                      previous_probabilities["AA"] * 1/2)
            
    new_probabilities = { "AA": probability_AA,
                          "Aa": probability_Aa,
                          "aa": probability_aa }
    
    return(new_probabilities)