def calculate_avg_difference(initial_price, market_price):
    """
    Calculate the average difference between two list of values, used mainly for the difference between initial and
    market prices of the items.
    :param initial_price: array 1
    :param market_price: array 2
    :return: average difference between the values of both arrays
    """
    assert len(initial_price) == len(market_price)
    total_difference = 0
    for item in range(len(initial_price)):
        total_difference += market_price[item] - initial_price[item]

    return total_difference / len(initial_price)