sd function

Generic function for the standard desviation