def median(arr):
    """
    Calculate the median of all the values in a list

    :param arr: The list of values
    :type arr: list
    :return: The median of all the numbers
    :rtype: float
    """
    arr.sort()
    n = len(arr)
    mid = int(n / 2)
    return arr[mid]