MathPHP\Statistics\Regression\Methods\LeastSquares::correlationCoefficient PHP Method

correlationCoefficient() public method

A measure of the strength and direction of the linear relationship between two variables that is defined as the (sample) covariance of the variables divided by the product of their (sample) standard deviations. n∑⟮xy⟯ − ∑⟮x⟯∑⟮y⟯ -------------------------------- √[(n∑x² − ⟮∑x⟯²)(n∑y² − ⟮∑y⟯²)]
public correlationCoefficient ( ) : number
return number
    public function correlationCoefficient()
    {
        return sqrt($this->coefficientOfDetermination());
    }