ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
Confidence.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
PhpOffice\PhpSpreadsheet\Calculation\Statistical
;
4
5
use
PhpOffice\PhpSpreadsheet\Calculation\Exception
;
6
use
PhpOffice\PhpSpreadsheet\Calculation\Functions
;
7
8
class
Confidence
9
{
21
public
static
function
CONFIDENCE
($alpha, $stdDev,
$size
)
22
{
23
$alpha =
Functions::flattenSingleValue
($alpha);
24
$stdDev =
Functions::flattenSingleValue
($stdDev);
25
$size
=
Functions::flattenSingleValue
(
$size
);
26
27
try
{
28
$alpha =
StatisticalValidations::validateFloat
($alpha);
29
$stdDev =
StatisticalValidations::validateFloat
($stdDev);
30
$size
=
StatisticalValidations::validateInt
(
$size
);
31
}
catch
(
Exception
$e) {
32
return
$e->getMessage();
33
}
34
35
if
(($alpha <= 0) || ($alpha >= 1) || ($stdDev <= 0) || (
$size
< 1)) {
36
return
Functions::NAN
();
37
}
38
39
return
Distributions\StandardNormal::inverse
(1 - $alpha / 2) * $stdDev / sqrt(
$size
);
40
}
41
}
$size
$size
Definition:
RandomTest.php:84
PhpOffice\PhpSpreadsheet\Calculation\Statistical\Confidence
Definition:
Confidence.php:8
PhpOffice\PhpSpreadsheet\Calculation\Functions\NAN
static NAN()
NaN.
Definition:
Functions.php:181
PhpOffice\PhpSpreadsheet\Calculation\Statistical\StatisticalValidations\validateFloat
static validateFloat($value)
Definition:
StatisticalValidations.php:13
Exception
PhpOffice\PhpSpreadsheet\Calculation\Statistical
Definition:
AggregateBase.php:3
PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\StandardNormal\inverse
static inverse($value)
NORMSINV.
Definition:
StandardNormal.php:53
PhpOffice\PhpSpreadsheet\Calculation\Statistical\StatisticalValidations\validateInt
static validateInt($value)
Definition:
StatisticalValidations.php:25
Functions
PhpOffice\PhpSpreadsheet\Calculation\Statistical\Confidence\CONFIDENCE
static CONFIDENCE($alpha, $stdDev, $size)
CONFIDENCE.
Definition:
Confidence.php:21
php
PhpOffice\PhpSpreadsheet\Calculation\Functions\flattenSingleValue
static flattenSingleValue($value='')
Convert an array to a single scalar value by extracting the first element.
Definition:
Functions.php:649
Exception
libs
composer
vendor
phpoffice
phpspreadsheet
src
PhpSpreadsheet
Calculation
Statistical
Confidence.php
Generated on Thu Jan 16 2025 19:01:46 for ILIAS by
1.8.13 (using
Doxyfile
)