def update_average(old_avg: float, old_num: int, new_avg: float, new_num: int):
    """Updates the old average with new data.

    Params:
    - old_avg (float): The current average value
    - old_num (int): The number of elements contributing to the current average
    - new_avg (float): The new average value
    - new_num (int): The number of elements contributing to the new average
    """
    old_sum = old_avg * old_num
    new_sum = new_avg * new_num
    updated_sum = old_sum + new_sum
    updated_num = old_num + new_num
    updated_avg = updated_sum / updated_num
    return updated_avg