import math


def std_dev(x):
    """ Computes and returns the corrected sample standard deviation of x. """
    N = len(x)
    mu = sum(x)/N
    sum_sd = 0.0
    for i in range(N):
        sum_sd += (x[i] - mu) ** 2
    return math.sqrt(sum_sd/(N - 1))