MathPHP\Statistics\Experiment::likelihoodRatio PHP Метод

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

Used to analyze the goodness of a diagnostic tests. https://en.wikipedia.org/wiki/Likelihood_ratios_in_diagnostic_testing a / (a + c) LL+ = ----------- b / (b + d) c / (a + c) LL- = ----------- d / (b + d)
public static likelihoodRatio ( integer $a, integer $b, integer $c, integer $d ) : array
$a integer Exposed and event present
$b integer Exposed and event absent
$c integer Non-exposed and event present
$d integer Non-exposed and event absent
Результат array [ LL+, LL- ]
    public static function likelihoodRatio(int $a, int $b, int $c, int $d) : array
    {
        // LL+ Positive likelihood ratio
        $LL+ = $a / ($a + $c) / ($b / ($b + $d));
        // LL- Negative likelihood ratio
        $LL− = $c / ($a + $c) / ($d / ($b + $d));
        return ['LL+' => $LL+, 'LL-' => $LL−];
    }