Lines Matching refs:dof
106 double ChiSquareValue(int dof, double p) { in ChiSquareValue() argument
113 if (dof < 1 || p_value > 1.0) { in ChiSquareValue()
117 if (dof > kLargeDOF) { in ChiSquareValue()
124 const double mean = 1 - 2.0 / (9 * dof); in ChiSquareValue()
125 const double variance = 2.0 / (9 * dof); in ChiSquareValue()
128 return std::pow(z * std::sqrt(variance) + mean, 3.0) * dof; in ChiSquareValue()
137 double current = dof / std::sqrt(p_value); in ChiSquareValue()
139 if (ChiSquarePValue(current, dof) < p_value) { in ChiSquareValue()
156 double ChiSquarePValue(double chi_square, int dof) { in ChiSquarePValue() argument
168 if (dof > kLargeDOF) { in ChiSquarePValue()
170 const double chi_square_scaled = std::pow(chi_square / dof, 1.0 / 3); in ChiSquarePValue()
171 const double mean = 1 - 2.0 / (9 * dof); in ChiSquarePValue()
172 const double variance = 2.0 / (9 * dof); in ChiSquarePValue()
193 if (dof < 1) return 0; in ChiSquarePValue()
199 const bool even = !(dof & 1); // True if dof is an even number. in ChiSquarePValue()
203 if (dof <= 2) { in ChiSquarePValue()
207 chi_square = 0.5 * (dof - 1.0); in ChiSquarePValue()