Ejemplo n.º 1
0
 /**
  * @covers NumbersPHP\Statistic::rSquared
  */
 public function testRSquared()
 {
     $source = array(10, 9, 8, 8, 7, 7, 6, 6.5, 6.4, 6.3, 6.2);
     $regression = array(9.077131929916444, 8.669377715385259, 8.279940244595563, 7.907996710352883, 7.552761266818376, 7.213483369166244, 6.8894461878255076, 6.579965093955639, 6.284386212956255, 6.002085042954625, 5.732465135352174);
     $this->assertEquals(0.8491729985314136, \NumbersPHP\Statistic::rSquared($source, $regression));
 }