Newer
Older
MS_cooling / Analyse / math.py
@Jihyun Bhom Jihyun Bhom on 13 Aug 2021 283 bytes started
def variance(arr):
    square = 0
    mean = 0.0
    root = 0.0
    n=len(arr)
    #Calculate square
    mean=sum(arr)/n

    for i in range(0,n):
        square += (arr[i] - mean)**2
        
    #Calculate Mean
    
    square=square/n/n
    root=Sqrt(square)    
    return root