MathPHP\Statistics\Correlation::coefficientOfDetermination PHP Метод

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

Indicates the proportion of the variance in the dependent variable that is predictable from the independent variable. Range of 0 - 1. Close to 1 means the regression line is a good fit https://en.wikipedia.org/wiki/Coefficient_of_determination
public static coefficientOfDetermination ( array $X, array $Y, boolean $popluation = false ) : number
$X array values for random variable X
$Y array values for random variable Y
$popluation boolean
Результат number
    public static function coefficientOfDetermination(array $X, array $Y, bool $popluation = false)
    {
        return pow(self::r($X, $Y, $popluation), 2);
    }