import math


def getLinearStats(values,size):
    """
    getLinearStats: returns (average, standard deviation) of a list of values
    @param values: a list of the values to be examined
    @param size:   the size of the list (in case it has been counted elsewhere)
    """

    # Average
    values = filter(lambda x: x is not None, values)
    avg = sum(values)/size

    # Standard Deviation
    return avg,math.sqrt(
        sum([
            pow(value - avg, 2)
            for value in values
        ])/(size-1)
    )