- Adding
kendallTau()method for Kendall tau-b rank correlation with tie handling - Adding
kendallmethod support tocorrelation() - Adding
chiSquaredTest()method for chi-squared goodness-of-fit tests - Adding
chiSquaredIndependence()method for chi-squared tests on contingency tables - Adding fluent
Statistics::chiSquaredTest()wrapper method
- Adding
rank()method for assigning 1-based ranks to data points, with support foraverage,min,max,dense, andordinaltie strategies - Adding
percentileRank()method for calculating the percentile position of a value, withweak,strict,mean, andrankvariants - Adding fluent
Statistics::rank()andStatistics::percentileRank()wrapper methods - Fixing
Statistics::tTestPaired()to preserve the original input order for paired observations - Updating README documentation and examples for ranking and percentile-rank usage
- Improving
Statisticstest coverage for two-sample and paired t-test wrappers
- Adding
logarithmicRegression(),powerRegression(), andexponentialRegression()methods for non-linear regression models
- Adding
Utils\Arrclass withextract()method for multi-column extraction from arrays of associative arrays, andpartition()method for splitting arrays into matching/non-matching groups by field condition (supports ==, !=, >, <, >=, <= operators) - Adding
Utils\Formatclass withsecondsToTime(),timeToSeconds(),secondsToHms(), andhmsToSeconds()methods for time formatting and parsing - Adding
Utils\Mathclass — reorganized from root namespace for consistency withEnums/andException/sub-directories - Reorganized
ArrUtilandMathintoUtils\ArrandUtils\Mathsub-namespace; original classes remain as deprecated proxies for backward compatibility - Updated internal references in
Stat,Freq,StreamingStat, andStatisticsto use the newUtilsnamespace
- Adding
tTestTwoSample()method for two-sample independent t-test (Welch's t-test) — compares the means of two independent groups without assuming equal variances - Adding
tTestPaired()method for paired t-test — tests whether the mean difference between paired observations (e.g. before/after) is significantly different from zero - Adding
StudentTclass for the Student's t-distribution (pdf, cdf, invCdf) — building block for t-tests and confidence intervals with small samples - Adding
tTest()method for one-sample t-test — like z-test but appropriate for small samples where the population standard deviation is unknown - Adding
zTest()method for one-sample Z-test — tests whether the sample mean differs significantly from a hypothesized population mean (includes p-value calculation) - Adding
Alternativeenum (TwoSided,Greater,Less) for hypothesis testing - Adding
confidenceInterval()method for computing confidence intervals for the mean using the normal (z) distribution - Adding
rSquared()method for R² (coefficient of determination) — proportion of variance explained by linear regression
- Adding
StreamingStatclass (experimental) for streaming/online computation of mean, variance, stdev, skewness, kurtosis, sum, min, and max with O(1) memory - Adding
percentile()method for computing the value at any percentile (0–100) with linear interpolation - Adding
coefficientOfVariation()method for relative dispersion (CV%), supporting both sample and population modes - Adding
trimmedMean()method for robust central tendency — computes the mean after removing outliers from each side - Adding
weightedMedian()method for computing the median with weighted observations - Adding
sem()method for standard error of the mean - Adding
meanAbsoluteDeviation()method for mean absolute deviation — average distance from the mean - Adding
medianAbsoluteDeviation()method for median absolute deviation — robust dispersion measure resistant to outliers - Adding
zscores()method for computing z-scores of each value in a dataset - Adding
outliers()method for z-score based outlier detection with configurable threshold - Adding
iqrOutliers()method for IQR-based outlier detection (box plot whiskers), robust for skewed data - Adding
rSquared()method for R² (coefficient of determination) — proportion of variance explained by linear regression
- Adding
kurtosis()method for excess kurtosis
- Adding
skewness()method for adjusted Fisher-Pearson sample skewness - Adding
pskewness()method for population (biased) skewness - Full Coverage Tests (adding some edge cases)
- Create KDE example
- Adding
kde()method for Kernel Density Estimation — returns a closure that estimates PDF or CDF from sample data, supporting 9 kernel functions with aliases - Adding
kdeRandom()method for random sampling from a Kernel Density Estimate — returns a closure that generates random floats from the KDE distribution - Introducing
KdeKernelbacked string enum —kde()andkdeRandom(). It acceptsKdeKernelenum cases - Adding Kernel Density Estimation (KDE) examples
- Adding
methodparameter toquantiles()supporting'exclusive'(default) and'inclusive'interpolation methods - Adding
medianGrouped()method for estimating the median of grouped/binned continuous data using interpolation - Adding Spearman rank correlation via
methodparameter incorrelation()(method='ranked') - Adding proportional linear regression via
proportionalparameter inlinearRegression()for regression through the origin - Adding optional pre-computed mean parameter to
variance()(xbar) andpvariance()(mu)
- Adding
invCdf()method to normal distribution - Adding
getVariance()method to normal distribution (sigma squared) - Adding
getMedian()method to normal distribution (equals mean) - Adding
getMode()method to normal distribution (equals mean) - Adding
quantiles()method to normal distribution (divide into n equal-probability intervals) - Adding
overlap()method to normal distribution (overlapping coefficient between two distributions) - Adding
zscore()method to normal distribution (standard score) - Adding
samples()method to normal distribution (generate random samples with optional seed) - Adding
subtract()method to normal distribution (counterpart to add) - Adding
divide()method to normal distribution (counterpart to multiply)
- Welcome to PHP 8.5
- Upgrading to PHPstan new rules (offsetAccess)
- Tests migrated from PestPHP 2 to PHPUnit 11
- Code Syntax checker from Pint to PHP CS Fixer
- Adding
fmean()method for computing the arithmetic mean with float numbers.
- Adding
multiply()method to scale NormalDist by a constant
- Implementing
add()method for NormalDist
- Implementing fromSample method for NormalDist
- Upgrading RectorPHP v 2
- Upgrading PHPStan v 2
- NormalDist class, with
cdf()andpdf() - Fix deprecations for PHP 8.4
- Welcome PHP 8.4
- Upgrading to Rector 1
- Fixed
median()function to handle unsorted data by @keatis - Rector refactor
- PHPstan level 8
- Support for PHP 8.1 and above
- Add support for PHP 8.2 by @AmooAti
- Update to PestPHP v2 by @AmooAti
- Improving documentation (readme, contributing, code of conduct, security policies) by @AbhineshJha, @Arcturus22, @tvermaashutosh, @Abhishekgupta204, @Aryan4884
- Rector v0.18.5 by @sukuasoft
- Introducing Pint by @sukuasoft
- GitHub Actions: Updating actions/checkout v4
- Linear regression
- Raise Exception instead of returning null if there is no valid input. By Artem Trokhymchuk @trokhymchuk thanks for the PR #15;
- PHPStan, level 9
- Code refactoring by @trokhymchuk
- Clean phpdoc blocks by @trokhymchuk
- Stat::correlation()
- PHPStan, level 8
- Stat::covariance()
- frequencyTable()
- frequencyTableBySize()
- code refactoring and documenting some functions by Artem Trokhymchuk @trokhymchuk thanks for the PR #2
- add tests for Math class
- quantiles()
- firstQuartile()
- thirdQuartile()
- geometricMean(): geometric mean
- harmonicMean(): harmonic mean and weighted harmonic mean
- pstdev(): Population standard deviation
- stdev(): Sample standard deviation
- pvariance(): variance for a population
- variance(): variance for a sample
- Create Freq class with static method for managing frequencies table
- Create Stat class with static methods for basci statistic functions like: mean, mode, median, multimode...
- Refactor Statistics class in order to use logic provided by Freq and Stat class
- Create ArrUtil with some helpers/functions to manage arrays
- Add CICD test for PHP 8.1
Initial release with:
- getMean()
- count()
- median()
- firstQuartile()
- thirdQuartile()
- mode()
- frequencies(): a frequency is the number of times a value of the data occurs;
- relativeFrequencies(): a relative frequency is the ratio (fraction or proportion) of the number of times a value of the data occurs in the set of all outcomes to the total number of outcomes;
- cumulativeFrequencies(): is the accumulation of the previous relative frequencies.;
- cumulativeRelativeFrequencies(): is the accumulation of the previous relative ratio.
Initial release with:
- getMean()
- count()
- median()
- firstQuartile()
- thirdQuartile()
- mode()
- frequencies(): a frequency is the number of times a value of the data occurs;
- relativeFrequencies(): a relative frequency is the ratio (fraction or proportion) of the number of times a value of the data occurs in the set of all outcomes to the total number of outcomes;
- cumulativeFrequencies(): is the accumulation of the previous relative frequencies.;
- cumulativeRelativeFrequencies(): is the accumulation of the previous relative ratio.