public function testPFMIsBinomialWithNEqualsOne() { $this->assertEquals(Binomial::PMF(1, 0, 0.6), Bernoulli::PMF(0, 0.6)); $this->assertEquals(Binomial::PMF(1, 1, 0.6), Bernoulli::PMF(1, 0.6)); }
/** * @dataProvider dataProviderForPMF */ public function testPMF(int $n, int $r, float $p, float $pmf) { $this->assertEquals($pmf, Binomial::PMF($n, $r, $p), '', 0.001); }