import math


def calcRMS(items,avg):
	""" returns RootMeanSquare  of items in a list """ 
	# sqrt(sum(x^2))
	# Not statistics RMS... "physics" RMS, i.e. standard deviation: sqrt(sum((x-avg)**2)/N)
	# return math.sqrt(reduce(lambda x: (x - avg)**2, items) / len(items))	
	return math.sqrt(sum([(x-avg)**2 for x in items])/len(items))