def eu_testna_statistika(var, year): #return 1.734 s,f = seznam_vzorec(var, year) n = len(s) probability = 0.10 #TODO figure out why n-2 and not n-1 t = statistics.tinv(probability, n-2) return t
def t_vrednost(var, year): n = len(seznam_vzorec(var, year)[0]) probability = 0.10 t = statistics.tinv(probability, n-1) t_array = [round(t, 2), round(t, 3), round(t, 3)] return t_array
def zaupanje_aritmeticna(var, year): s,f = seznam_vzorec(var, year) n = len(s) asredina = stats.lmean(s) #z = 2.093 # print n, "artimeticna", var, year probability = 0.10 z = round(statistics.tinv(probability, n-1), 2) # print "z is", z std = math.sqrt(vzorcna_varianca(var, year)[0]) interval1 = asredina - (z * (std / math.sqrt(n)) ) interval2 = asredina + (z * (std / math.sqrt(n)) ) return interval1, interval2