Searched refs:f_exp (Results 1 – 1 of 1) sorted by relevance
1109 def lchisquare(f_obs, f_exp=None): argument1119 if f_exp == None:1120 f_exp = [sum(f_obs) / float(k)] * len(f_obs) # create k bins with = freq.1123 chisq = chisq + (f_obs[i] - f_exp[i])**2 / float(f_exp[i])3500 def achisquare(f_obs, f_exp=None): argument3512 if f_exp == None:3513 f_exp = N.array([sum(f_obs) / float(k)] * len(f_obs), N.float_)3514 f_exp = f_exp.astype(N.float_)3515 chisq = N.add.reduce((f_obs - f_exp)**2 / f_exp)