Differences Between: [Versions 310 and 400] [Versions 311 and 400] [Versions 39 and 400] [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]
1 <?php 2 3 namespace PhpOffice\PhpSpreadsheet\Calculation; 4 5 use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages; 6 use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional; 7 use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Confidence; 8 use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts; 9 use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Maximum; 10 use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Minimum; 11 use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Permutations; 12 use PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations; 13 use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends; 14 use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances; 15 16 /** 17 * @deprecated 1.18.0 18 */ 19 class Statistical 20 { 21 const LOG_GAMMA_X_MAX_VALUE = 2.55e305; 22 const EPS = 2.22e-16; 23 const MAX_VALUE = 1.2e308; 24 const SQRT2PI = 2.5066282746310005024157652848110452530069867406099; 25 26 /** 27 * AVEDEV. 28 * 29 * Returns the average of the absolute deviations of data points from their mean. 30 * AVEDEV is a measure of the variability in a data set. 31 * 32 * Excel Function: 33 * AVEDEV(value1[,value2[, ...]]) 34 * 35 * @Deprecated 1.17.0 36 * 37 * @see Statistical\Averages::averageDeviations() 38 * Use the averageDeviations() method in the Statistical\Averages class instead 39 * 40 * @param mixed ...$args Data values 41 * 42 * @return float|string 43 */ 44 public static function AVEDEV(...$args) 45 { 46 return Averages::averageDeviations(...$args); 47 } 48 49 /** 50 * AVERAGE. 51 * 52 * Returns the average (arithmetic mean) of the arguments 53 * 54 * Excel Function: 55 * AVERAGE(value1[,value2[, ...]]) 56 * 57 * @Deprecated 1.17.0 58 * 59 * @see Statistical\Averages::average() 60 * Use the average() method in the Statistical\Averages class instead 61 * 62 * @param mixed ...$args Data values 63 * 64 * @return float|string 65 */ 66 public static function AVERAGE(...$args) 67 { 68 return Averages::average(...$args); 69 } 70 71 /** 72 * AVERAGEA. 73 * 74 * Returns the average of its arguments, including numbers, text, and logical values 75 * 76 * Excel Function: 77 * AVERAGEA(value1[,value2[, ...]]) 78 * 79 * @Deprecated 1.17.0 80 * 81 * @see Statistical\Averages::averageA() 82 * Use the averageA() method in the Statistical\Averages class instead 83 * 84 * @param mixed ...$args Data values 85 * 86 * @return float|string 87 */ 88 public static function AVERAGEA(...$args) 89 { 90 return Averages::averageA(...$args); 91 } 92 93 /** 94 * AVERAGEIF. 95 * 96 * Returns the average value from a range of cells that contain numbers within the list of arguments 97 * 98 * Excel Function: 99 * AVERAGEIF(value1[,value2[, ...]],condition) 100 * 101 * @Deprecated 1.17.0 102 * 103 * @see Statistical\Conditional::AVERAGEIF() 104 * Use the AVERAGEIF() method in the Statistical\Conditional class instead 105 * 106 * @param mixed $range Data values 107 * @param string $condition the criteria that defines which cells will be checked 108 * @param mixed[] $averageRange Data values 109 * 110 * @return null|float|string 111 */ 112 public static function AVERAGEIF($range, $condition, $averageRange = []) 113 { 114 return Conditional::AVERAGEIF($range, $condition, $averageRange); 115 } 116 117 /** 118 * BETADIST. 119 * 120 * Returns the beta distribution. 121 * 122 * @Deprecated 1.18.0 123 * 124 * @see Statistical\Distributions\Beta::distribution() 125 * Use the distribution() method in the Statistical\Distributions\Beta class instead 126 * 127 * @param float $value Value at which you want to evaluate the distribution 128 * @param float $alpha Parameter to the distribution 129 * @param float $beta Parameter to the distribution 130 * @param mixed $rMin 131 * @param mixed $rMax 132 * 133 * @return float|string 134 */ 135 public static function BETADIST($value, $alpha, $beta, $rMin = 0, $rMax = 1) 136 { 137 return Statistical\Distributions\Beta::distribution($value, $alpha, $beta, $rMin, $rMax); 138 } 139 140 /** 141 * BETAINV. 142 * 143 * Returns the inverse of the Beta distribution. 144 * 145 * @Deprecated 1.18.0 146 * 147 * @see Statistical\Distributions\Beta::inverse() 148 * Use the inverse() method in the Statistical\Distributions\Beta class instead 149 * 150 * @param float $probability Probability at which you want to evaluate the distribution 151 * @param float $alpha Parameter to the distribution 152 * @param float $beta Parameter to the distribution 153 * @param float $rMin Minimum value 154 * @param float $rMax Maximum value 155 * 156 * @return float|string 157 */ 158 public static function BETAINV($probability, $alpha, $beta, $rMin = 0, $rMax = 1) 159 { 160 return Statistical\Distributions\Beta::inverse($probability, $alpha, $beta, $rMin, $rMax); 161 } 162 163 /** 164 * BINOMDIST. 165 * 166 * Returns the individual term binomial distribution probability. Use BINOMDIST in problems with 167 * a fixed number of tests or trials, when the outcomes of any trial are only success or failure, 168 * when trials are independent, and when the probability of success is constant throughout the 169 * experiment. For example, BINOMDIST can calculate the probability that two of the next three 170 * babies born are male. 171 * 172 * @Deprecated 1.18.0 173 * 174 * @see Statistical\Distributions\Binomial::distribution() 175 * Use the distribution() method in the Statistical\Distributions\Binomial class instead 176 * 177 * @param mixed $value Number of successes in trials 178 * @param mixed $trials Number of trials 179 * @param mixed $probability Probability of success on each trial 180 * @param mixed $cumulative 181 * 182 * @return float|string 183 */ 184 public static function BINOMDIST($value, $trials, $probability, $cumulative) 185 { 186 return Statistical\Distributions\Binomial::distribution($value, $trials, $probability, $cumulative); 187 } 188 189 /** 190 * CHIDIST. 191 * 192 * Returns the one-tailed probability of the chi-squared distribution. 193 * 194 * @Deprecated 1.18.0 195 * 196 * @see Statistical\Distributions\ChiSquared::distributionRightTail() 197 * Use the distributionRightTail() method in the Statistical\Distributions\ChiSquared class instead 198 * 199 * @param float $value Value for the function 200 * @param float $degrees degrees of freedom 201 * 202 * @return float|string 203 */ 204 public static function CHIDIST($value, $degrees) 205 { 206 return Statistical\Distributions\ChiSquared::distributionRightTail($value, $degrees); 207 } 208 209 /** 210 * CHIINV. 211 * 212 * Returns the one-tailed probability of the chi-squared distribution. 213 * 214 * @Deprecated 1.18.0 215 * 216 * @see Statistical\Distributions\ChiSquared::inverseRightTail() 217 * Use the inverseRightTail() method in the Statistical\Distributions\ChiSquared class instead 218 * 219 * @param float $probability Probability for the function 220 * @param float $degrees degrees of freedom 221 * 222 * @return float|string 223 */ 224 public static function CHIINV($probability, $degrees) 225 { 226 return Statistical\Distributions\ChiSquared::inverseRightTail($probability, $degrees); 227 } 228 229 /** 230 * CONFIDENCE. 231 * 232 * Returns the confidence interval for a population mean 233 * 234 * @Deprecated 1.18.0 235 * 236 * @see Statistical\Confidence::CONFIDENCE() 237 * Use the CONFIDENCE() method in the Statistical\Confidence class instead 238 * 239 * @param float $alpha 240 * @param float $stdDev Standard Deviation 241 * @param float $size 242 * 243 * @return float|string 244 */ 245 public static function CONFIDENCE($alpha, $stdDev, $size) 246 { 247 return Confidence::CONFIDENCE($alpha, $stdDev, $size); 248 } 249 250 /** 251 * CORREL. 252 * 253 * Returns covariance, the average of the products of deviations for each data point pair. 254 * 255 * @Deprecated 1.18.0 256 * 257 * @see Statistical\Trends::CORREL() 258 * Use the CORREL() method in the Statistical\Trends class instead 259 * 260 * @param mixed $yValues array of mixed Data Series Y 261 * @param null|mixed $xValues array of mixed Data Series X 262 * 263 * @return float|string 264 */ 265 public static function CORREL($yValues, $xValues = null) 266 { 267 return Trends::CORREL($xValues, $yValues); 268 } 269 270 /** 271 * COUNT. 272 * 273 * Counts the number of cells that contain numbers within the list of arguments 274 * 275 * Excel Function: 276 * COUNT(value1[,value2[, ...]]) 277 * 278 * @Deprecated 1.17.0 279 * 280 * @see Statistical\Counts::COUNT() 281 * Use the COUNT() method in the Statistical\Counts class instead 282 * 283 * @param mixed ...$args Data values 284 * 285 * @return int 286 */ 287 public static function COUNT(...$args) 288 { 289 return Counts::COUNT(...$args); 290 } 291 292 /** 293 * COUNTA. 294 * 295 * Counts the number of cells that are not empty within the list of arguments 296 * 297 * Excel Function: 298 * COUNTA(value1[,value2[, ...]]) 299 * 300 * @Deprecated 1.17.0 301 * 302 * @see Statistical\Counts::COUNTA() 303 * Use the COUNTA() method in the Statistical\Counts class instead 304 * 305 * @param mixed ...$args Data values 306 * 307 * @return int 308 */ 309 public static function COUNTA(...$args) 310 { 311 return Counts::COUNTA(...$args); 312 } 313 314 /** 315 * COUNTBLANK. 316 * 317 * Counts the number of empty cells within the list of arguments 318 * 319 * Excel Function: 320 * COUNTBLANK(value1[,value2[, ...]]) 321 * 322 * @Deprecated 1.17.0 323 * 324 * @see Statistical\Counts::COUNTBLANK() 325 * Use the COUNTBLANK() method in the Statistical\Counts class instead 326 * 327 * @param mixed ...$args Data values 328 * 329 * @return int 330 */ 331 public static function COUNTBLANK(...$args) 332 { 333 return Counts::COUNTBLANK(...$args); 334 } 335 336 /** 337 * COUNTIF. 338 * 339 * Counts the number of cells that contain numbers within the list of arguments 340 * 341 * Excel Function: 342 * COUNTIF(range,condition) 343 * 344 * @Deprecated 1.17.0 345 * 346 * @see Statistical\Conditional::COUNTIF() 347 * Use the COUNTIF() method in the Statistical\Conditional class instead 348 * 349 * @param mixed $range Data values 350 * @param string $condition the criteria that defines which cells will be counted 351 * 352 * @return int 353 */ 354 public static function COUNTIF($range, $condition) 355 { 356 return Conditional::COUNTIF($range, $condition); 357 } 358 359 /** 360 * COUNTIFS. 361 * 362 * Counts the number of cells that contain numbers within the list of arguments 363 * 364 * Excel Function: 365 * COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…) 366 * 367 * @Deprecated 1.17.0 368 * 369 * @see Statistical\Conditional::COUNTIFS() 370 * Use the COUNTIFS() method in the Statistical\Conditional class instead 371 * 372 * @param mixed $args Pairs of Ranges and Criteria 373 * 374 * @return int 375 */ 376 public static function COUNTIFS(...$args) 377 { 378 return Conditional::COUNTIFS(...$args); 379 } 380 381 /** 382 * COVAR. 383 * 384 * Returns covariance, the average of the products of deviations for each data point pair. 385 * 386 * @Deprecated 1.18.0 387 * 388 * @see Statistical\Trends::COVAR() 389 * Use the COVAR() method in the Statistical\Trends class instead 390 * 391 * @param mixed $yValues array of mixed Data Series Y 392 * @param mixed $xValues array of mixed Data Series X 393 * 394 * @return float|string 395 */ 396 public static function COVAR($yValues, $xValues) 397 { 398 return Trends::COVAR($yValues, $xValues); 399 } 400 401 /** 402 * CRITBINOM. 403 * 404 * Returns the smallest value for which the cumulative binomial distribution is greater 405 * than or equal to a criterion value 406 * 407 * See https://support.microsoft.com/en-us/help/828117/ for details of the algorithm used 408 * 409 * @Deprecated 1.18.0 410 * 411 * @see Statistical\Distributions\Binomial::inverse() 412 * Use the inverse() method in the Statistical\Distributions\Binomial class instead 413 * 414 * @param float $trials number of Bernoulli trials 415 * @param float $probability probability of a success on each trial 416 * @param float $alpha criterion value 417 * 418 * @return int|string 419 */ 420 public static function CRITBINOM($trials, $probability, $alpha) 421 { 422 return Statistical\Distributions\Binomial::inverse($trials, $probability, $alpha); 423 } 424 425 /** 426 * DEVSQ. 427 * 428 * Returns the sum of squares of deviations of data points from their sample mean. 429 * 430 * Excel Function: 431 * DEVSQ(value1[,value2[, ...]]) 432 * 433 * @Deprecated 1.18.0 434 * 435 * @see Statistical\Deviations::sumSquares() 436 * Use the sumSquares() method in the Statistical\Deviations class instead 437 * 438 * @param mixed ...$args Data values 439 * 440 * @return float|string 441 */ 442 public static function DEVSQ(...$args) 443 { 444 return Statistical\Deviations::sumSquares(...$args); 445 } 446 447 /** 448 * EXPONDIST. 449 * 450 * Returns the exponential distribution. Use EXPONDIST to model the time between events, 451 * such as how long an automated bank teller takes to deliver cash. For example, you can 452 * use EXPONDIST to determine the probability that the process takes at most 1 minute. 453 * 454 * @Deprecated 1.18.0 455 * 456 * @see Statistical\Distributions\Exponential::distribution() 457 * Use the distribution() method in the Statistical\Distributions\Exponential class instead 458 * 459 * @param float $value Value of the function 460 * @param float $lambda The parameter value 461 * @param bool $cumulative 462 * 463 * @return float|string 464 */ 465 public static function EXPONDIST($value, $lambda, $cumulative) 466 { 467 return Statistical\Distributions\Exponential::distribution($value, $lambda, $cumulative); 468 } 469 470 /** 471 * F.DIST. 472 * 473 * Returns the F probability distribution. 474 * You can use this function to determine whether two data sets have different degrees of diversity. 475 * For example, you can examine the test scores of men and women entering high school, and determine 476 * if the variability in the females is different from that found in the males. 477 * 478 * @Deprecated 1.18.0 479 * 480 * @see Statistical\Distributions\F::distribution() 481 * Use the distribution() method in the Statistical\Distributions\Exponential class instead 482 * 483 * @param float $value Value of the function 484 * @param int $u The numerator degrees of freedom 485 * @param int $v The denominator degrees of freedom 486 * @param bool $cumulative If cumulative is TRUE, F.DIST returns the cumulative distribution function; 487 * if FALSE, it returns the probability density function. 488 * 489 * @return float|string 490 */ 491 public static function FDIST2($value, $u, $v, $cumulative) 492 { 493 return Statistical\Distributions\F::distribution($value, $u, $v, $cumulative); 494 } 495 496 /** 497 * FISHER. 498 * 499 * Returns the Fisher transformation at x. This transformation produces a function that 500 * is normally distributed rather than skewed. Use this function to perform hypothesis 501 * testing on the correlation coefficient. 502 * 503 * @Deprecated 1.18.0 504 * 505 * @see Statistical\Distributions\Fisher::distribution() 506 * Use the distribution() method in the Statistical\Distributions\Fisher class instead 507 * 508 * @param float $value 509 * 510 * @return float|string 511 */ 512 public static function FISHER($value) 513 { 514 return Statistical\Distributions\Fisher::distribution($value); 515 } 516 517 /** 518 * FISHERINV. 519 * 520 * Returns the inverse of the Fisher transformation. Use this transformation when 521 * analyzing correlations between ranges or arrays of data. If y = FISHER(x), then 522 * FISHERINV(y) = x. 523 * 524 * @Deprecated 1.18.0 525 * 526 * @see Statistical\Distributions\Fisher::inverse() 527 * Use the inverse() method in the Statistical\Distributions\Fisher class instead 528 * 529 * @param float $value 530 * 531 * @return float|string 532 */ 533 public static function FISHERINV($value) 534 { 535 return Statistical\Distributions\Fisher::inverse($value); 536 } 537 538 /** 539 * FORECAST. 540 * 541 * Calculates, or predicts, a future value by using existing values. The predicted value is a y-value for a given x-value. 542 * 543 * @Deprecated 1.18.0 544 * 545 * @see Statistical\Trends::FORECAST() 546 * Use the FORECAST() method in the Statistical\Trends class instead 547 * 548 * @param float $xValue Value of X for which we want to find Y 549 * @param mixed $yValues array of mixed Data Series Y 550 * @param mixed $xValues of mixed Data Series X 551 * 552 * @return bool|float|string 553 */ 554 public static function FORECAST($xValue, $yValues, $xValues) 555 { 556 return Trends::FORECAST($xValue, $yValues, $xValues); 557 } 558 559 /** 560 * GAMMA. 561 * 562 * Returns the gamma function value. 563 * 564 * @Deprecated 1.18.0 565 * 566 * @see Statistical\Distributions\Gamma::gamma() 567 * Use the gamma() method in the Statistical\Distributions\Gamma class instead 568 * 569 * @param float $value 570 * 571 * @return float|string The result, or a string containing an error 572 */ 573 public static function GAMMAFunction($value) 574 { 575 return Statistical\Distributions\Gamma::gamma($value); 576 } 577 578 /** 579 * GAMMADIST. 580 * 581 * Returns the gamma distribution. 582 * 583 * @Deprecated 1.18.0 584 * 585 * @see Statistical\Distributions\Gamma::distribution() 586 * Use the distribution() method in the Statistical\Distributions\Gamma class instead 587 * 588 * @param float $value Value at which you want to evaluate the distribution 589 * @param float $a Parameter to the distribution 590 * @param float $b Parameter to the distribution 591 * @param bool $cumulative 592 * 593 * @return float|string 594 */ 595 public static function GAMMADIST($value, $a, $b, $cumulative) 596 { 597 return Statistical\Distributions\Gamma::distribution($value, $a, $b, $cumulative); 598 } 599 600 /** 601 * GAMMAINV. 602 * 603 * Returns the inverse of the Gamma distribution. 604 * 605 * @Deprecated 1.18.0 606 * 607 * @see Statistical\Distributions\Gamma::inverse() 608 * Use the inverse() method in the Statistical\Distributions\Gamma class instead 609 * 610 * @param float $probability Probability at which you want to evaluate the distribution 611 * @param float $alpha Parameter to the distribution 612 * @param float $beta Parameter to the distribution 613 * 614 * @return float|string 615 */ 616 public static function GAMMAINV($probability, $alpha, $beta) 617 { 618 return Statistical\Distributions\Gamma::inverse($probability, $alpha, $beta); 619 } 620 621 /** 622 * GAMMALN. 623 * 624 * Returns the natural logarithm of the gamma function. 625 * 626 * @Deprecated 1.18.0 627 * 628 * @see Statistical\Distributions\Gamma::ln() 629 * Use the ln() method in the Statistical\Distributions\Gamma class instead 630 * 631 * @param float $value 632 * 633 * @return float|string 634 */ 635 public static function GAMMALN($value) 636 { 637 return Statistical\Distributions\Gamma::ln($value); 638 } 639 640 /** 641 * GAUSS. 642 * 643 * Calculates the probability that a member of a standard normal population will fall between 644 * the mean and z standard deviations from the mean. 645 * 646 * @Deprecated 1.18.0 647 * 648 * @see Statistical\Distributions\StandardNormal::gauss() 649 * Use the gauss() method in the Statistical\Distributions\StandardNormal class instead 650 * 651 * @param float $value 652 * 653 * @return float|string The result, or a string containing an error 654 */ 655 public static function GAUSS($value) 656 { 657 return Statistical\Distributions\StandardNormal::gauss($value); 658 } 659 660 /** 661 * GEOMEAN. 662 * 663 * Returns the geometric mean of an array or range of positive data. For example, you 664 * can use GEOMEAN to calculate average growth rate given compound interest with 665 * variable rates. 666 * 667 * Excel Function: 668 * GEOMEAN(value1[,value2[, ...]]) 669 * 670 * @Deprecated 1.18.0 671 * 672 * @see Statistical\Averages\Mean::geometric() 673 * Use the geometric() method in the Statistical\Averages\Mean class instead 674 * 675 * @param mixed ...$args Data values 676 * 677 * @return float|string 678 */ 679 public static function GEOMEAN(...$args) 680 { 681 return Statistical\Averages\Mean::geometric(...$args); 682 } 683 684 /** 685 * GROWTH. 686 * 687 * Returns values along a predicted exponential Trend 688 * 689 * @Deprecated 1.18.0 690 * 691 * @see Statistical\Trends::GROWTH() 692 * Use the GROWTH() method in the Statistical\Trends class instead 693 * 694 * @param mixed[] $yValues Data Series Y 695 * @param mixed[] $xValues Data Series X 696 * @param mixed[] $newValues Values of X for which we want to find Y 697 * @param bool $const a logical value specifying whether to force the intersect to equal 0 698 * 699 * @return float[] 700 */ 701 public static function GROWTH($yValues, $xValues = [], $newValues = [], $const = true) 702 { 703 return Trends::GROWTH($yValues, $xValues, $newValues, $const); 704 } 705 706 /** 707 * HARMEAN. 708 * 709 * Returns the harmonic mean of a data set. The harmonic mean is the reciprocal of the 710 * arithmetic mean of reciprocals. 711 * 712 * Excel Function: 713 * HARMEAN(value1[,value2[, ...]]) 714 * 715 * @Deprecated 1.18.0 716 * 717 * @see Statistical\Averages\Mean::harmonic() 718 * Use the harmonic() method in the Statistical\Averages\Mean class instead 719 * 720 * @param mixed ...$args Data values 721 * 722 * @return float|string 723 */ 724 public static function HARMEAN(...$args) 725 { 726 return Statistical\Averages\Mean::harmonic(...$args); 727 } 728 729 /** 730 * HYPGEOMDIST. 731 * 732 * Returns the hypergeometric distribution. HYPGEOMDIST returns the probability of a given number of 733 * sample successes, given the sample size, population successes, and population size. 734 * 735 * @Deprecated 1.18.0 736 * 737 * @see Statistical\Distributions\HyperGeometric::distribution() 738 * Use the distribution() method in the Statistical\Distributions\HyperGeometric class instead 739 * 740 * @param mixed $sampleSuccesses Number of successes in the sample 741 * @param mixed $sampleNumber Size of the sample 742 * @param mixed $populationSuccesses Number of successes in the population 743 * @param mixed $populationNumber Population size 744 * 745 * @return float|string 746 */ 747 public static function HYPGEOMDIST($sampleSuccesses, $sampleNumber, $populationSuccesses, $populationNumber) 748 { 749 return Statistical\Distributions\HyperGeometric::distribution( 750 $sampleSuccesses, 751 $sampleNumber, 752 $populationSuccesses, 753 $populationNumber 754 ); 755 } 756 757 /** 758 * INTERCEPT. 759 * 760 * Calculates the point at which a line will intersect the y-axis by using existing x-values and y-values. 761 * 762 * @Deprecated 1.18.0 763 * 764 * @see Statistical\Trends::INTERCEPT() 765 * Use the INTERCEPT() method in the Statistical\Trends class instead 766 * 767 * @param mixed[] $yValues Data Series Y 768 * @param mixed[] $xValues Data Series X 769 * 770 * @return float|string 771 */ 772 public static function INTERCEPT($yValues, $xValues) 773 { 774 return Trends::INTERCEPT($yValues, $xValues); 775 } 776 777 /** 778 * KURT. 779 * 780 * Returns the kurtosis of a data set. Kurtosis characterizes the relative peakedness 781 * or flatness of a distribution compared with the normal distribution. Positive 782 * kurtosis indicates a relatively peaked distribution. Negative kurtosis indicates a 783 * relatively flat distribution. 784 * 785 * @Deprecated 1.18.0 786 * 787 * @see Statistical\Deviations::kurtosis() 788 * Use the kurtosis() method in the Statistical\Deviations class instead 789 * 790 * @param array ...$args Data Series 791 * 792 * @return float|string 793 */ 794 public static function KURT(...$args) 795 { 796 return Statistical\Deviations::kurtosis(...$args); 797 } 798 799 /** 800 * LARGE. 801 * 802 * Returns the nth largest value in a data set. You can use this function to 803 * select a value based on its relative standing. 804 * 805 * Excel Function: 806 * LARGE(value1[,value2[, ...]],entry) 807 * 808 * @Deprecated 1.18.0 809 * 810 * @see Statistical\Size::large() 811 * Use the large() method in the Statistical\Size class instead 812 * 813 * @param mixed $args Data values 814 * 815 * @return float|string The result, or a string containing an error 816 */ 817 public static function LARGE(...$args) 818 { 819 return Statistical\Size::large(...$args); 820 } 821 822 /** 823 * LINEST. 824 * 825 * Calculates the statistics for a line by using the "least squares" method to calculate a straight line that best fits your data, 826 * and then returns an array that describes the line. 827 * 828 * @Deprecated 1.18.0 829 * 830 * @see Statistical\Trends::LINEST() 831 * Use the LINEST() method in the Statistical\Trends class instead 832 * 833 * @param mixed[] $yValues Data Series Y 834 * @param null|mixed[] $xValues Data Series X 835 * @param bool $const a logical value specifying whether to force the intersect to equal 0 836 * @param bool $stats a logical value specifying whether to return additional regression statistics 837 * 838 * @return array|int|string The result, or a string containing an error 839 */ 840 public static function LINEST($yValues, $xValues = null, $const = true, $stats = false) 841 { 842 return Trends::LINEST($yValues, $xValues, $const, $stats); 843 } 844 845 /** 846 * LOGEST. 847 * 848 * Calculates an exponential curve that best fits the X and Y data series, 849 * and then returns an array that describes the line. 850 * 851 * @Deprecated 1.18.0 852 * 853 * @see Statistical\Trends::LOGEST() 854 * Use the LOGEST() method in the Statistical\Trends class instead 855 * 856 * @param mixed[] $yValues Data Series Y 857 * @param null|mixed[] $xValues Data Series X 858 * @param bool $const a logical value specifying whether to force the intersect to equal 0 859 * @param bool $stats a logical value specifying whether to return additional regression statistics 860 * 861 * @return array|int|string The result, or a string containing an error 862 */ 863 public static function LOGEST($yValues, $xValues = null, $const = true, $stats = false) 864 { 865 return Trends::LOGEST($yValues, $xValues, $const, $stats); 866 } 867 868 /** 869 * LOGINV. 870 * 871 * Returns the inverse of the normal cumulative distribution 872 * 873 * @Deprecated 1.18.0 874 * 875 * @see Statistical\Distributions\LogNormal::inverse() 876 * Use the inverse() method in the Statistical\Distributions\LogNormal class instead 877 * 878 * @param float $probability 879 * @param float $mean 880 * @param float $stdDev 881 * 882 * @return float|string The result, or a string containing an error 883 * 884 * @TODO Try implementing P J Acklam's refinement algorithm for greater 885 * accuracy if I can get my head round the mathematics 886 * (as described at) http://home.online.no/~pjacklam/notes/invnorm/ 887 */ 888 public static function LOGINV($probability, $mean, $stdDev) 889 { 890 return Statistical\Distributions\LogNormal::inverse($probability, $mean, $stdDev); 891 } 892 893 /** 894 * LOGNORMDIST. 895 * 896 * Returns the cumulative lognormal distribution of x, where ln(x) is normally distributed 897 * with parameters mean and standard_dev. 898 * 899 * @Deprecated 1.18.0 900 * 901 * @see Statistical\Distributions\LogNormal::cumulative() 902 * Use the cumulative() method in the Statistical\Distributions\LogNormal class instead 903 * 904 * @param float $value 905 * @param float $mean 906 * @param float $stdDev 907 * 908 * @return float|string The result, or a string containing an error 909 */ 910 public static function LOGNORMDIST($value, $mean, $stdDev) 911 { 912 return Statistical\Distributions\LogNormal::cumulative($value, $mean, $stdDev); 913 } 914 915 /** 916 * LOGNORM.DIST. 917 * 918 * Returns the lognormal distribution of x, where ln(x) is normally distributed 919 * with parameters mean and standard_dev. 920 * 921 * @Deprecated 1.18.0 922 * 923 * @see Statistical\Distributions\LogNormal::distribution() 924 * Use the distribution() method in the Statistical\Distributions\LogNormal class instead 925 * 926 * @param float $value 927 * @param float $mean 928 * @param float $stdDev 929 * @param bool $cumulative 930 * 931 * @return float|string The result, or a string containing an error 932 */ 933 public static function LOGNORMDIST2($value, $mean, $stdDev, $cumulative = false) 934 { 935 return Statistical\Distributions\LogNormal::distribution($value, $mean, $stdDev, $cumulative); 936 } 937 938 /** 939 * MAX. 940 * 941 * MAX returns the value of the element of the values passed that has the highest value, 942 * with negative numbers considered smaller than positive numbers. 943 * 944 * Excel Function: 945 * max(value1[,value2[, ...]]) 946 * 947 * @Deprecated 1.17.0 948 * 949 * @param mixed ...$args Data values 950 * 951 * @return float 952 * 953 *@see Statistical\Maximum::max() 954 * Use the MAX() method in the Statistical\Maximum class instead 955 */ 956 public static function MAX(...$args) 957 { 958 return Maximum::max(...$args); 959 } 960 961 /** 962 * MAXA. 963 * 964 * Returns the greatest value in a list of arguments, including numbers, text, and logical values 965 * 966 * Excel Function: 967 * maxA(value1[,value2[, ...]]) 968 * 969 * @Deprecated 1.17.0 970 * 971 * @param mixed ...$args Data values 972 * 973 * @return float 974 * 975 *@see Statistical\Maximum::maxA() 976 * Use the MAXA() method in the Statistical\Maximum class instead 977 */ 978 public static function MAXA(...$args) 979 { 980 return Maximum::maxA(...$args); 981 } 982 983 /** 984 * MAXIFS. 985 * 986 * Counts the maximum value within a range of cells that contain numbers within the list of arguments 987 * 988 * Excel Function: 989 * MAXIFS(max_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...) 990 * 991 * @Deprecated 1.17.0 992 * 993 * @see Statistical\Conditional::MAXIFS() 994 * Use the MAXIFS() method in the Statistical\Conditional class instead 995 * 996 * @param mixed $args Data range and criterias 997 * 998 * @return float 999 */ 1000 public static function MAXIFS(...$args) 1001 { 1002 return Conditional::MAXIFS(...$args); 1003 } 1004 1005 /** 1006 * MEDIAN. 1007 * 1008 * Returns the median of the given numbers. The median is the number in the middle of a set of numbers. 1009 * 1010 * Excel Function: 1011 * MEDIAN(value1[,value2[, ...]]) 1012 * 1013 * @Deprecated 1.18.0 1014 * 1015 * @see Statistical\Averages::median() 1016 * Use the median() method in the Statistical\Averages class instead 1017 * 1018 * @param mixed ...$args Data values 1019 * 1020 * @return float|string The result, or a string containing an error 1021 */ 1022 public static function MEDIAN(...$args) 1023 { 1024 return Statistical\Averages::median(...$args); 1025 } 1026 1027 /** 1028 * MIN. 1029 * 1030 * MIN returns the value of the element of the values passed that has the smallest value, 1031 * with negative numbers considered smaller than positive numbers. 1032 * 1033 * Excel Function: 1034 * MIN(value1[,value2[, ...]]) 1035 * 1036 * @Deprecated 1.17.0 1037 * 1038 * @param mixed ...$args Data values 1039 * 1040 * @return float 1041 * 1042 *@see Statistical\Minimum::min() 1043 * Use the min() method in the Statistical\Minimum class instead 1044 */ 1045 public static function MIN(...$args) 1046 { 1047 return Minimum::min(...$args); 1048 } 1049 1050 /** 1051 * MINA. 1052 * 1053 * Returns the smallest value in a list of arguments, including numbers, text, and logical values 1054 * 1055 * Excel Function: 1056 * MINA(value1[,value2[, ...]]) 1057 * 1058 * @Deprecated 1.17.0 1059 * 1060 * @param mixed ...$args Data values 1061 * 1062 * @return float 1063 * 1064 *@see Statistical\Minimum::minA() 1065 * Use the minA() method in the Statistical\Minimum class instead 1066 */ 1067 public static function MINA(...$args) 1068 { 1069 return Minimum::minA(...$args); 1070 } 1071 1072 /** 1073 * MINIFS. 1074 * 1075 * Returns the minimum value within a range of cells that contain numbers within the list of arguments 1076 * 1077 * Excel Function: 1078 * MINIFS(min_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...) 1079 * 1080 * @Deprecated 1.17.0 1081 * 1082 * @see Statistical\Conditional::MINIFS() 1083 * Use the MINIFS() method in the Statistical\Conditional class instead 1084 * 1085 * @param mixed $args Data range and criterias 1086 * 1087 * @return float 1088 */ 1089 public static function MINIFS(...$args) 1090 { 1091 return Conditional::MINIFS(...$args); 1092 } 1093 1094 /** 1095 * MODE. 1096 * 1097 * Returns the most frequently occurring, or repetitive, value in an array or range of data 1098 * 1099 * Excel Function: 1100 * MODE(value1[,value2[, ...]]) 1101 * 1102 * @Deprecated 1.18.0 1103 * 1104 * @see Statistical\Averages::mode() 1105 * Use the mode() method in the Statistical\Averages class instead 1106 * 1107 * @param mixed ...$args Data values 1108 * 1109 * @return float|string The result, or a string containing an error 1110 */ 1111 public static function MODE(...$args) 1112 { 1113 return Statistical\Averages::mode(...$args); 1114 } 1115 1116 /** 1117 * NEGBINOMDIST. 1118 * 1119 * Returns the negative binomial distribution. NEGBINOMDIST returns the probability that 1120 * there will be number_f failures before the number_s-th success, when the constant 1121 * probability of a success is probability_s. This function is similar to the binomial 1122 * distribution, except that the number of successes is fixed, and the number of trials is 1123 * variable. Like the binomial, trials are assumed to be independent. 1124 * 1125 * @Deprecated 1.18.0 1126 * 1127 * @see Statistical\Distributions\Binomial::negative() 1128 * Use the negative() method in the Statistical\Distributions\Binomial class instead 1129 * 1130 * @param mixed $failures Number of Failures 1131 * @param mixed $successes Threshold number of Successes 1132 * @param mixed $probability Probability of success on each trial 1133 * 1134 * @return float|string The result, or a string containing an error 1135 */ 1136 public static function NEGBINOMDIST($failures, $successes, $probability) 1137 { 1138 return Statistical\Distributions\Binomial::negative($failures, $successes, $probability); 1139 } 1140 1141 /** 1142 * NORMDIST. 1143 * 1144 * Returns the normal distribution for the specified mean and standard deviation. This 1145 * function has a very wide range of applications in statistics, including hypothesis 1146 * testing. 1147 * 1148 * @Deprecated 1.18.0 1149 * 1150 * @see Statistical\Distributions\Normal::distribution() 1151 * Use the distribution() method in the Statistical\Distributions\Normal class instead 1152 * 1153 * @param mixed $value 1154 * @param mixed $mean Mean Value 1155 * @param mixed $stdDev Standard Deviation 1156 * @param mixed $cumulative 1157 * 1158 * @return float|string The result, or a string containing an error 1159 */ 1160 public static function NORMDIST($value, $mean, $stdDev, $cumulative) 1161 { 1162 return Statistical\Distributions\Normal::distribution($value, $mean, $stdDev, $cumulative); 1163 } 1164 1165 /** 1166 * NORMINV. 1167 * 1168 * Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation. 1169 * 1170 * @Deprecated 1.18.0 1171 * 1172 * @see Statistical\Distributions\Normal::inverse() 1173 * Use the inverse() method in the Statistical\Distributions\Normal class instead 1174 * 1175 * @param mixed $probability 1176 * @param mixed $mean Mean Value 1177 * @param mixed $stdDev Standard Deviation 1178 * 1179 * @return float|string The result, or a string containing an error 1180 */ 1181 public static function NORMINV($probability, $mean, $stdDev) 1182 { 1183 return Statistical\Distributions\Normal::inverse($probability, $mean, $stdDev); 1184 } 1185 1186 /** 1187 * NORMSDIST. 1188 * 1189 * Returns the standard normal cumulative distribution function. The distribution has 1190 * a mean of 0 (zero) and a standard deviation of one. Use this function in place of a 1191 * table of standard normal curve areas. 1192 * 1193 * @Deprecated 1.18.0 1194 * 1195 * @see Statistical\Distributions\StandardNormal::cumulative() 1196 * Use the cumulative() method in the Statistical\Distributions\StandardNormal class instead 1197 * 1198 * @param mixed $value 1199 * 1200 * @return float|string The result, or a string containing an error 1201 */ 1202 public static function NORMSDIST($value) 1203 { 1204 return Statistical\Distributions\StandardNormal::cumulative($value); 1205 } 1206 1207 /** 1208 * NORM.S.DIST. 1209 * 1210 * Returns the standard normal cumulative distribution function. The distribution has 1211 * a mean of 0 (zero) and a standard deviation of one. Use this function in place of a 1212 * table of standard normal curve areas. 1213 * 1214 * @Deprecated 1.18.0 1215 * 1216 * @see Statistical\Distributions\StandardNormal::distribution() 1217 * Use the distribution() method in the Statistical\Distributions\StandardNormal class instead 1218 * 1219 * @param mixed $value 1220 * @param mixed $cumulative 1221 * 1222 * @return float|string The result, or a string containing an error 1223 */ 1224 public static function NORMSDIST2($value, $cumulative) 1225 { 1226 return Statistical\Distributions\StandardNormal::distribution($value, $cumulative); 1227 } 1228 1229 /** 1230 * NORMSINV. 1231 * 1232 * Returns the inverse of the standard normal cumulative distribution 1233 * 1234 * @Deprecated 1.18.0 1235 * 1236 * @see Statistical\Distributions\StandardNormal::inverse() 1237 * Use the inverse() method in the Statistical\Distributions\StandardNormal class instead 1238 * 1239 * @param mixed $value 1240 * 1241 * @return float|string The result, or a string containing an error 1242 */ 1243 public static function NORMSINV($value) 1244 { 1245 return Statistical\Distributions\StandardNormal::inverse($value); 1246 } 1247 1248 /** 1249 * PERCENTILE. 1250 * 1251 * Returns the nth percentile of values in a range.. 1252 * 1253 * Excel Function: 1254 * PERCENTILE(value1[,value2[, ...]],entry) 1255 * 1256 * @Deprecated 1.18.0 1257 * 1258 * @see Statistical\Percentiles::PERCENTILE() 1259 * Use the PERCENTILE() method in the Statistical\Percentiles class instead 1260 * 1261 * @param mixed $args Data values 1262 * 1263 * @return float|string The result, or a string containing an error 1264 */ 1265 public static function PERCENTILE(...$args) 1266 { 1267 return Statistical\Percentiles::PERCENTILE(...$args); 1268 } 1269 1270 /** 1271 * PERCENTRANK. 1272 * 1273 * Returns the rank of a value in a data set as a percentage of the data set. 1274 * Note that the returned rank is simply rounded to the appropriate significant digits, 1275 * rather than floored (as MS Excel), so value 3 for a value set of 1, 2, 3, 4 will return 1276 * 0.667 rather than 0.666 1277 * 1278 * @Deprecated 1.18.0 1279 * 1280 * @see Statistical\Percentiles::PERCENTRANK() 1281 * Use the PERCENTRANK() method in the Statistical\Percentiles class instead 1282 * 1283 * @param mixed $valueSet An array of, or a reference to, a list of numbers 1284 * @param mixed $value the number whose rank you want to find 1285 * @param mixed $significance the number of significant digits for the returned percentage value 1286 * 1287 * @return float|string (string if result is an error) 1288 */ 1289 public static function PERCENTRANK($valueSet, $value, $significance = 3) 1290 { 1291 return Statistical\Percentiles::PERCENTRANK($valueSet, $value, $significance); 1292 } 1293 1294 /** 1295 * PERMUT. 1296 * 1297 * Returns the number of permutations for a given number of objects that can be 1298 * selected from number objects. A permutation is any set or subset of objects or 1299 * events where internal order is significant. Permutations are different from 1300 * combinations, for which the internal order is not significant. Use this function 1301 * for lottery-style probability calculations. 1302 * 1303 * @Deprecated 1.17.0 1304 * 1305 * @see Statistical\Permutations::PERMUT() 1306 * Use the PERMUT() method in the Statistical\Permutations class instead 1307 * 1308 * @param int $numObjs Number of different objects 1309 * @param int $numInSet Number of objects in each permutation 1310 * 1311 * @return float|int|string Number of permutations, or a string containing an error 1312 */ 1313 public static function PERMUT($numObjs, $numInSet) 1314 { 1315 return Permutations::PERMUT($numObjs, $numInSet); 1316 } 1317 1318 /** 1319 * POISSON. 1320 * 1321 * Returns the Poisson distribution. A common application of the Poisson distribution 1322 * is predicting the number of events over a specific time, such as the number of 1323 * cars arriving at a toll plaza in 1 minute. 1324 * 1325 * @Deprecated 1.18.0 1326 * 1327 * @see Statistical\Distributions\Poisson::distribution() 1328 * Use the distribution() method in the Statistical\Distributions\Poisson class instead 1329 * 1330 * @param mixed $value 1331 * @param mixed $mean Mean Value 1332 * @param mixed $cumulative 1333 * 1334 * @return float|string The result, or a string containing an error 1335 */ 1336 public static function POISSON($value, $mean, $cumulative) 1337 { 1338 return Statistical\Distributions\Poisson::distribution($value, $mean, $cumulative); 1339 } 1340 1341 /** 1342 * QUARTILE. 1343 * 1344 * Returns the quartile of a data set. 1345 * 1346 * Excel Function: 1347 * QUARTILE(value1[,value2[, ...]],entry) 1348 * 1349 * @Deprecated 1.18.0 1350 * 1351 * @see Statistical\Percentiles::QUARTILE() 1352 * Use the QUARTILE() method in the Statistical\Percentiles class instead 1353 * 1354 * @param mixed $args Data values 1355 * 1356 * @return float|string The result, or a string containing an error 1357 */ 1358 public static function QUARTILE(...$args) 1359 { 1360 return Statistical\Percentiles::QUARTILE(...$args); 1361 } 1362 1363 /** 1364 * RANK. 1365 * 1366 * Returns the rank of a number in a list of numbers. 1367 * 1368 * @Deprecated 1.18.0 1369 * 1370 * @see Statistical\Percentiles::RANK() 1371 * Use the RANK() method in the Statistical\Percentiles class instead 1372 * 1373 * @param mixed $value the number whose rank you want to find 1374 * @param mixed $valueSet An array of, or a reference to, a list of numbers 1375 * @param mixed $order Order to sort the values in the value set 1376 * 1377 * @return float|string The result, or a string containing an error 1378 */ 1379 public static function RANK($value, $valueSet, $order = 0) 1380 { 1381 return Statistical\Percentiles::RANK($value, $valueSet, $order); 1382 } 1383 1384 /** 1385 * RSQ. 1386 * 1387 * Returns the square of the Pearson product moment correlation coefficient through data points in known_y's and known_x's. 1388 * 1389 * @Deprecated 1.18.0 1390 * 1391 * @see Statistical\Trends::RSQ() 1392 * Use the RSQ() method in the Statistical\Trends class instead 1393 * 1394 * @param mixed[] $yValues Data Series Y 1395 * @param mixed[] $xValues Data Series X 1396 * 1397 * @return float|string The result, or a string containing an error 1398 */ 1399 public static function RSQ($yValues, $xValues) 1400 { 1401 return Trends::RSQ($yValues, $xValues); 1402 } 1403 1404 /** 1405 * SKEW. 1406 * 1407 * Returns the skewness of a distribution. Skewness characterizes the degree of asymmetry 1408 * of a distribution around its mean. Positive skewness indicates a distribution with an 1409 * asymmetric tail extending toward more positive values. Negative skewness indicates a 1410 * distribution with an asymmetric tail extending toward more negative values. 1411 * 1412 * @Deprecated 1.18.0 1413 * 1414 * @see Statistical\Deviations::skew() 1415 * Use the skew() method in the Statistical\Deviations class instead 1416 * 1417 * @param array ...$args Data Series 1418 * 1419 * @return float|string The result, or a string containing an error 1420 */ 1421 public static function SKEW(...$args) 1422 { 1423 return Statistical\Deviations::skew(...$args); 1424 } 1425 1426 /** 1427 * SLOPE. 1428 * 1429 * Returns the slope of the linear regression line through data points in known_y's and known_x's. 1430 * 1431 * @Deprecated 1.18.0 1432 * 1433 * @see Statistical\Trends::SLOPE() 1434 * Use the SLOPE() method in the Statistical\Trends class instead 1435 * 1436 * @param mixed[] $yValues Data Series Y 1437 * @param mixed[] $xValues Data Series X 1438 * 1439 * @return float|string The result, or a string containing an error 1440 */ 1441 public static function SLOPE($yValues, $xValues) 1442 { 1443 return Trends::SLOPE($yValues, $xValues); 1444 } 1445 1446 /** 1447 * SMALL. 1448 * 1449 * Returns the nth smallest value in a data set. You can use this function to 1450 * select a value based on its relative standing. 1451 * 1452 * Excel Function: 1453 * SMALL(value1[,value2[, ...]],entry) 1454 * 1455 * @Deprecated 1.18.0 1456 * 1457 * @see Statistical\Size::small() 1458 * Use the small() method in the Statistical\Size class instead 1459 * 1460 * @param mixed $args Data values 1461 * 1462 * @return float|string The result, or a string containing an error 1463 */ 1464 public static function SMALL(...$args) 1465 { 1466 return Statistical\Size::small(...$args); 1467 } 1468 1469 /** 1470 * STANDARDIZE. 1471 * 1472 * Returns a normalized value from a distribution characterized by mean and standard_dev. 1473 * 1474 * @Deprecated 1.18.0 1475 * 1476 * @see Statistical\Standardize::execute() 1477 * Use the execute() method in the Statistical\Standardize class instead 1478 * 1479 * @param float $value Value to normalize 1480 * @param float $mean Mean Value 1481 * @param float $stdDev Standard Deviation 1482 * 1483 * @return float|string Standardized value, or a string containing an error 1484 */ 1485 public static function STANDARDIZE($value, $mean, $stdDev) 1486 { 1487 return Statistical\Standardize::execute($value, $mean, $stdDev); 1488 } 1489 1490 /** 1491 * STDEV. 1492 * 1493 * Estimates standard deviation based on a sample. The standard deviation is a measure of how 1494 * widely values are dispersed from the average value (the mean). 1495 * 1496 * Excel Function: 1497 * STDEV(value1[,value2[, ...]]) 1498 * 1499 * @Deprecated 1.17.0 1500 * 1501 * @see Statistical\StandardDeviations::STDEV() 1502 * Use the STDEV() method in the Statistical\StandardDeviations class instead 1503 * 1504 * @param mixed ...$args Data values 1505 * 1506 * @return float|string The result, or a string containing an error 1507 */ 1508 public static function STDEV(...$args) 1509 { 1510 return StandardDeviations::STDEV(...$args); 1511 } 1512 1513 /** 1514 * STDEVA. 1515 * 1516 * Estimates standard deviation based on a sample, including numbers, text, and logical values 1517 * 1518 * Excel Function: 1519 * STDEVA(value1[,value2[, ...]]) 1520 * 1521 * @Deprecated 1.17.0 1522 * 1523 * @see Statistical\StandardDeviations::STDEVA() 1524 * Use the STDEVA() method in the Statistical\StandardDeviations class instead 1525 * 1526 * @param mixed ...$args Data values 1527 * 1528 * @return float|string 1529 */ 1530 public static function STDEVA(...$args) 1531 { 1532 return StandardDeviations::STDEVA(...$args); 1533 } 1534 1535 /** 1536 * STDEVP. 1537 * 1538 * Calculates standard deviation based on the entire population 1539 * 1540 * Excel Function: 1541 * STDEVP(value1[,value2[, ...]]) 1542 * 1543 * @Deprecated 1.17.0 1544 * 1545 * @see Statistical\StandardDeviations::STDEVP() 1546 * Use the STDEVP() method in the Statistical\StandardDeviations class instead 1547 * 1548 * @param mixed ...$args Data values 1549 * 1550 * @return float|string 1551 */ 1552 public static function STDEVP(...$args) 1553 { 1554 return StandardDeviations::STDEVP(...$args); 1555 } 1556 1557 /** 1558 * STDEVPA. 1559 * 1560 * Calculates standard deviation based on the entire population, including numbers, text, and logical values 1561 * 1562 * Excel Function: 1563 * STDEVPA(value1[,value2[, ...]]) 1564 * 1565 * @Deprecated 1.17.0 1566 * 1567 * @see Statistical\StandardDeviations::STDEVPA() 1568 * Use the STDEVPA() method in the Statistical\StandardDeviations class instead 1569 * 1570 * @param mixed ...$args Data values 1571 * 1572 * @return float|string 1573 */ 1574 public static function STDEVPA(...$args) 1575 { 1576 return StandardDeviations::STDEVPA(...$args); 1577 } 1578 1579 /** 1580 * STEYX. 1581 * 1582 * @Deprecated 1.18.0 1583 * 1584 * @see Statistical\Trends::STEYX() 1585 * Use the STEYX() method in the Statistical\Trends class instead 1586 * 1587 * Returns the standard error of the predicted y-value for each x in the regression. 1588 * 1589 * @param mixed[] $yValues Data Series Y 1590 * @param mixed[] $xValues Data Series X 1591 * 1592 * @return float|string 1593 */ 1594 public static function STEYX($yValues, $xValues) 1595 { 1596 return Trends::STEYX($yValues, $xValues); 1597 } 1598 1599 /** 1600 * TDIST. 1601 * 1602 * Returns the probability of Student's T distribution. 1603 * 1604 * @Deprecated 1.18.0 1605 * 1606 * @see Statistical\Distributions\StudentT::distribution() 1607 * Use the distribution() method in the Statistical\Distributions\StudentT class instead 1608 * 1609 * @param float $value Value for the function 1610 * @param float $degrees degrees of freedom 1611 * @param float $tails number of tails (1 or 2) 1612 * 1613 * @return float|string The result, or a string containing an error 1614 */ 1615 public static function TDIST($value, $degrees, $tails) 1616 { 1617 return Statistical\Distributions\StudentT::distribution($value, $degrees, $tails); 1618 } 1619 1620 /** 1621 * TINV. 1622 * 1623 * Returns the one-tailed probability of the Student-T distribution. 1624 * 1625 * @Deprecated 1.18.0 1626 * 1627 * @see Statistical\Distributions\StudentT::inverse() 1628 * Use the inverse() method in the Statistical\Distributions\StudentT class instead 1629 * 1630 * @param float $probability Probability for the function 1631 * @param float $degrees degrees of freedom 1632 * 1633 * @return float|string The result, or a string containing an error 1634 */ 1635 public static function TINV($probability, $degrees) 1636 { 1637 return Statistical\Distributions\StudentT::inverse($probability, $degrees); 1638 } 1639 1640 /** 1641 * TREND. 1642 * 1643 * Returns values along a linear Trend 1644 * 1645 * @Deprecated 1.18.0 1646 * 1647 * @see Statistical\Trends::TREND() 1648 * Use the TREND() method in the Statistical\Trends class instead 1649 * 1650 * @param mixed[] $yValues Data Series Y 1651 * @param mixed[] $xValues Data Series X 1652 * @param mixed[] $newValues Values of X for which we want to find Y 1653 * @param bool $const a logical value specifying whether to force the intersect to equal 0 1654 * 1655 * @return float[] 1656 */ 1657 public static function TREND($yValues, $xValues = [], $newValues = [], $const = true) 1658 { 1659 return Trends::TREND($yValues, $xValues, $newValues, $const); 1660 } 1661 1662 /** 1663 * TRIMMEAN. 1664 * 1665 * Returns the mean of the interior of a data set. TRIMMEAN calculates the mean 1666 * taken by excluding a percentage of data points from the top and bottom tails 1667 * of a data set. 1668 * 1669 * Excel Function: 1670 * TRIMEAN(value1[,value2[, ...]], $discard) 1671 * 1672 * @Deprecated 1.18.0 1673 * 1674 *@see Statistical\Averages\Mean::trim() 1675 * Use the trim() method in the Statistical\Averages\Mean class instead 1676 * 1677 * @param mixed $args Data values 1678 * 1679 * @return float|string 1680 */ 1681 public static function TRIMMEAN(...$args) 1682 { 1683 return Statistical\Averages\Mean::trim(...$args); 1684 } 1685 1686 /** 1687 * VARFunc. 1688 * 1689 * Estimates variance based on a sample. 1690 * 1691 * Excel Function: 1692 * VAR(value1[,value2[, ...]]) 1693 * 1694 * @Deprecated 1.17.0 1695 * 1696 *@see Statistical\Variances::VAR() 1697 * Use the VAR() method in the Statistical\Variances class instead 1698 * 1699 * @param mixed ...$args Data values 1700 * 1701 * @return float|string (string if result is an error) 1702 */ 1703 public static function VARFunc(...$args) 1704 { 1705 return Variances::VAR(...$args); 1706 } 1707 1708 /** 1709 * VARA. 1710 * 1711 * Estimates variance based on a sample, including numbers, text, and logical values 1712 * 1713 * Excel Function: 1714 * VARA(value1[,value2[, ...]]) 1715 * 1716 * @Deprecated 1.17.0 1717 * 1718 * @see Statistical\Variances::VARA() 1719 * Use the VARA() method in the Statistical\Variances class instead 1720 * 1721 * @param mixed ...$args Data values 1722 * 1723 * @return float|string (string if result is an error) 1724 */ 1725 public static function VARA(...$args) 1726 { 1727 return Variances::VARA(...$args); 1728 } 1729 1730 /** 1731 * VARP. 1732 * 1733 * Calculates variance based on the entire population 1734 * 1735 * Excel Function: 1736 * VARP(value1[,value2[, ...]]) 1737 * 1738 * @Deprecated 1.17.0 1739 * 1740 * @see Statistical\Variances::VARP() 1741 * Use the VARP() method in the Statistical\Variances class instead 1742 * 1743 * @param mixed ...$args Data values 1744 * 1745 * @return float|string (string if result is an error) 1746 */ 1747 public static function VARP(...$args) 1748 { 1749 return Variances::VARP(...$args); 1750 } 1751 1752 /** 1753 * VARPA. 1754 * 1755 * Calculates variance based on the entire population, including numbers, text, and logical values 1756 * 1757 * Excel Function: 1758 * VARPA(value1[,value2[, ...]]) 1759 * 1760 * @Deprecated 1.17.0 1761 * 1762 * @see Statistical\Variances::VARPA() 1763 * Use the VARPA() method in the Statistical\Variances class instead 1764 * 1765 * @param mixed ...$args Data values 1766 * 1767 * @return float|string (string if result is an error) 1768 */ 1769 public static function VARPA(...$args) 1770 { 1771 return Variances::VARPA(...$args); 1772 } 1773 1774 /** 1775 * WEIBULL. 1776 * 1777 * Returns the Weibull distribution. Use this distribution in reliability 1778 * analysis, such as calculating a device's mean time to failure. 1779 * 1780 * @Deprecated 1.18.0 1781 * 1782 * @see Statistical\Distributions\Weibull::distribution() 1783 * Use the distribution() method in the Statistical\Distributions\Weibull class instead 1784 * 1785 * @param float $value 1786 * @param float $alpha Alpha Parameter 1787 * @param float $beta Beta Parameter 1788 * @param bool $cumulative 1789 * 1790 * @return float|string (string if result is an error) 1791 */ 1792 public static function WEIBULL($value, $alpha, $beta, $cumulative) 1793 { 1794 return Statistical\Distributions\Weibull::distribution($value, $alpha, $beta, $cumulative); 1795 } 1796 1797 /** 1798 * ZTEST. 1799 * 1800 * Returns the one-tailed P-value of a z-test. 1801 * 1802 * For a given hypothesized population mean, x, Z.TEST returns the probability that the sample mean would be 1803 * greater than the average of observations in the data set (array) — that is, the observed sample mean. 1804 * 1805 * @Deprecated 1.18.0 1806 * 1807 * @see Statistical\Distributions\StandardNormal::zTest() 1808 * Use the zTest() method in the Statistical\Distributions\StandardNormal class instead 1809 * 1810 * @param float $dataSet 1811 * @param float $m0 Alpha Parameter 1812 * @param float $sigma Beta Parameter 1813 * 1814 * @return float|string (string if result is an error) 1815 */ 1816 public static function ZTEST($dataSet, $m0, $sigma = null) 1817 { 1818 return Statistical\Distributions\StandardNormal::zTest($dataSet, $m0, $sigma); 1819 } 1820 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body