def correlation(data, data1):
    try:
        z1 = z_score(data)
        z2 = z_score(data1)
        z1_z2 = list(map(lambda x, y: x * y, z1, z2))
        corr = sum(z1_z2) / len(z1_z2)
        return round(corr, 7)
    except ZeroDivisionError:
        print("Error: Enter values greater than 0")
    except ValueError:
        print("Error: insert the correct data type")
Beispiel #2
0
def p_value(data):
    data = []
    n = len(data)
    score = z_score()
    for index in n:
        if n == score:
            data.append(index)
    return index
Beispiel #3
0
 def z_score(self, data):
     self.result = z_score(data)
     return self.result
def pvalue(num):
    return z_score(num)
 def z_score(self):
     self.result = z_score(self.data)
     return self.result
Beispiel #6
0
 def z_score(self, x, u, s):
     self.result = z_score(x, u, s)
     return self.result