def CentralMoment(xs, k):
 mean = RawMoment(xs, 1)
 return (sum((((x - mean) ** k) for x in xs)) / len(xs))

def CentralMoment ( xs , k ) : mean = RawMoment ( xs , 1 ) return ( sum ( ( ( ( x - mean ) ** k ) for x in xs ) ) / len ( xs ) )
computes the kth central moment of xs .