mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-25 02:48:16 +00:00
f51c19c125
* First steps toward refactoring Statistical Distributions into smaller classes: BETA() and GAMMA() (and related functions) to start with... they all need a lot of tidying up, and more testing; but it's a start * Add basic datatype validations to Beta and Gamma Excel function implementations * Switch to using a trait with the validation methods to provide easier sharing between distribution classes * Additional unit tests for Beta and Gamma functions, including unhappy path for validations * Extract ChiSquared functions * Additional argument validation checks with unit tests for Chi Squared functions * Extract Fisher * Move MEDIAN() and MODE() to the Averages class * Extract filters for Median and Mode for common usage
81 lines
1.2 KiB
PHP
81 lines
1.2 KiB
PHP
<?php
|
|
|
|
return [
|
|
[
|
|
0.4059136,
|
|
0.4, 4, 5,
|
|
],
|
|
[
|
|
0.99596045887,
|
|
3, 5, 10, 1, 4,
|
|
],
|
|
[
|
|
0.960370937542,
|
|
3, 7.5, 9, 1, 4,
|
|
],
|
|
[
|
|
0.960370937542,
|
|
3, 7.5, 9, 4, 1,
|
|
],
|
|
[
|
|
0.598190307617,
|
|
7.5, 8, 9, 5, 10,
|
|
],
|
|
[
|
|
0.685470581054,
|
|
2, 8, 10, 1, 3,
|
|
],
|
|
[
|
|
0.4059136,
|
|
0.4, 4, 5,
|
|
],
|
|
[
|
|
'#VALUE!',
|
|
'NAN', 8, 10, 1, 3,
|
|
],
|
|
[
|
|
'#VALUE!',
|
|
2, 'NAN', 10, 1, 3,
|
|
],
|
|
[
|
|
'#VALUE!',
|
|
2, 8, 'NAN', 1, 3,
|
|
],
|
|
[
|
|
'#VALUE!',
|
|
2, 8, 10, 'NAN', 3,
|
|
],
|
|
[
|
|
'#VALUE!',
|
|
2, 8, 10, 1, 'NAN',
|
|
],
|
|
'alpha < 0' => [
|
|
'#NUM!',
|
|
2, -8, 10, 1, 3,
|
|
],
|
|
'alpha = 0' => [
|
|
'#NUM!',
|
|
2, 0, 10, 1, 3,
|
|
],
|
|
'beta < 0' => [
|
|
'#NUM!',
|
|
2, 8, -10, 1, 3,
|
|
],
|
|
'beta = 0' => [
|
|
'#NUM!',
|
|
2, 8, 0, 1, 3,
|
|
],
|
|
'value < Min' => [
|
|
'#NUM!',
|
|
0.5, 8, 10, 1, 3,
|
|
],
|
|
'value > Max' => [
|
|
'#NUM!',
|
|
3.5, 8, 10, 1, 3,
|
|
],
|
|
'Min = Max' => [
|
|
'#NUM!',
|
|
2, 8, 10, 2, 2,
|
|
],
|
|
];
|