Pearson statistic

相関係数は、Excelでやりましたが、まあ一応。

<?php

require_once 'vendor/autoload.php';

use Phpml\Math\Statistic\Correlation;

$x = &#91;43, 21, 25, 42, 57, 59&#93;;
$y = &#91;99, 65, 79, 75, 87, 82&#93;;

$pearson = Correlation::pearson($x, $y);
echo $pearson;
?>