MathPHP\Probability\Distribution\Table\ChiSquared::getChiSquareValue PHP Метод

getChiSquareValue() публичный статический Метод

Get χ² score
public static getChiSquareValue ( integer $df, float $p ) : float
$df integer Degrees of freedom
$p float P value
Результат float χ² score
    public static function getChiSquareValue(int $df, float $p) : float
    {
        if (isset(self::CHI_SQUARED_SCORES[$df][sprintf('%1.3f', $p)])) {
            return self::CHI_SQUARED_SCORES[$df][sprintf('%1.3f', $p)];
        }
        throw new Exception\BadDataException("No chi-squared value for degrees of freedom {$df} and p value " . sprintf('%1.3f', $p));
    }