def lsStatistics(self,alpha):
"""
a priori variance of unit weight = 1
"""
self.chi2=self.VtPV
t=np.sqrt(2*np.log(1/alpha))
chi_1_alpha=t-(2.515517+0.802853*t+0.010328*t**2)/(1+1.432788*t+0.189269*t**2+0.001308*t**3)
dof=float(self.dof)
self.chi2c=dof*(chi_1_alpha*sqrt(2/(9*dof))+1-2/(9*dof))**3
print "SD a posteriori: %6.2f"%float(self.SDaposteriori)
print "chi square value: %6.2f"%float(self.chi2)
print "critical chi square value: %6.2f"%float(self.chi2c)
if self.chi2<self.chi2c:
print "Chi-test accepted"
else:
print "Chi-test rejected"
评论列表
文章目录