Files
PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TinvTest.php
T
Mark Baker ec2531411d Start implementing Newton-Raphson for the inverse of Statistical Distributions (#1958)
* Start implementing Newton-Raphson for the inverse of Statistical Distributions, starting with the two-tailed Student-T
* Additional unit tests and validations
* Use the new Newton Raphson class for calculating the Inverse of ChiSquared
* Extract Weibull distribution, and provide unit tests
2021-03-27 13:29:58 +01:00

28 lines
698 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Statistical;
use PhpOffice\PhpSpreadsheet\Calculation\Statistical;
use PHPUnit\Framework\TestCase;
class TinvTest extends TestCase
{
/**
* @dataProvider providerTINV
*
* @param mixed $expectedResult
* @param mixed $probability
* @param mixed $degrees
*/
public function testTINV($expectedResult, $probability, $degrees): void
{
$result = Statistical::TINV($probability, $degrees);
self::assertEqualsWithDelta($expectedResult, $result, 1E-12);
}
public function providerTINV()
{
return require 'tests/data/Calculation/Statistical/TINV.php';
}
}