def simple_calculation(cls, k, n, f_ratio, alphas): if f_ratio < 0: print("Cannot make decision because F is negative") return df_n = k - 1 df_d = (k * n) - k print("df_n: %d" % df_n) print("df_d: %d" % df_d) print("F-ratio: % .3f" % f_ratio) for alpha in alphas: critical = StatTool.f_critical_value(alpha, df_n, df_d) print("alpha %.3f: critical: %.3f conclusion: %s" % (alpha, critical, "reject H0" if f_ratio >= critical else "accept H0"))
def _calc(self): return StatTool.f_critical_value(self.alpha, self.df_between(), self.df_within())