def mean(data):
    """
    Return the sample arithmetic mean of data.
    """
    n = len(data)
    if n < 1:
        raise ValueError('mean requires at least one data point')
    return sum(data) / float(n)