from math import *

def Ecarttype(A,P):
    n=len(A)
    E=0
    for i in range(0,n):
        E=E+A[i]*P[i]
    V=0
    for i in range(0,n):
        V=V+P[i]*(A[i]-E)**2
        s=sqrt(V)
    return s



