/** * @covers NumbersPHP\Statistic::quantile */ public function testQuantile() { $this->assertEquals(2, \NumbersPHP\Statistic::quantile(array(5, 2, 4), 0, 1)); $this->assertEquals(5, \NumbersPHP\Statistic::quantile(array(5, 2, 4), 6, 6)); $this->assertEquals(5, \NumbersPHP\Statistic::quantile(array(9, 1, 1, 9), 2, 4)); $this->assertEquals(7, \NumbersPHP\Statistic::quantile(array(3, 6, 7, 8, 8, 9, 10, 13, 15, 16, 20), 1, 4)); }