Lines Matching refs:chisq
1121 chisq = 0
1123 chisq = chisq + (f_obs[i] - f_exp[i])**2 / float(f_exp[i])
1124 return chisq, chisqprob(chisq, k - 1)
1333 chisq = 12.0 / (k * n * (k + 1)) * ssbn - 3 * n * (k + 1)
1334 return chisq, chisqprob(chisq, k - 1)
1341 def lchisqprob(chisq, df): argument
1357 if chisq <= 0 or df < 1:
1359 a = 0.5 * chisq
1369 s = 2.0 * zprob(-math.sqrt(chisq))
1371 chisq = 0.5 * (df - 1.0)
1382 while (z <= chisq):
1393 while (z <= chisq):
3515 chisq = N.add.reduce((f_obs - f_exp)**2 / f_exp)
3516 return chisq, achisqprob(chisq, k - 1)
3717 chisq = 12.0 / (k * n * (k + 1)) * ssbn - 3 * n * (k + 1)
3718 return chisq, achisqprob(chisq, k - 1)
3724 def achisqprob(chisq, df): argument
3739 if type(chisq) == N.ndarray:
3743 chisq = N.array([chisq])
3745 return N.ones(chisq.shape, N.float)
3746 probs = N.zeros(chisq.shape, N.float_)
3748 N.less_equal(chisq, 0), 1.0, probs) # set prob=1 for chisq<0
3749 a = 0.5 * chisq
3758 s = 2.0 * azprob(-N.sqrt(chisq))
3761 chisq = 0.5 * (df - 1.0)
3780 newmask = N.greater(z, chisq)
3798 newmask = N.greater(z, chisq)