PHPackages                             fiedsch/php-stats - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. fiedsch/php-stats

ActiveLibrary

fiedsch/php-stats
=================

Statistics library

0.5.1(2y ago)096MITPHPPHP &gt;=5.3.0

Since Oct 12Pushed 2y ago1 watchersCompare

[ Source](https://github.com/fiedsch/PHPStats)[ Packagist](https://packagist.org/packages/fiedsch/php-stats)[ Docs](https://github.com/fiedsch/PHPStats)[ RSS](/packages/fiedsch-php-stats/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (4)Used By (0)

PHPStats Statistical Library
============================

[](#phpstats-statistical-library)

**Introduction to PHPStats**PHPStats is a statistical library for PHP. Its goal is to implement statistical functions in PHP that are not covered in the PHP core. PHPStats is written entirely in native PHP for ease of installation and for use in shared hosting environments, where the installation of binary files is difficult, if not impossible.

**Downloading PHPStats**To download PHPStats visit [the GitHub page](https://github.com/mcordingley/PHPStats)for the latest code or download the [current stable version](https://github.com/mcordingley/PHPStats/zipball/v0.4).

**Installation**Installing PHPStats is easy. Just copy the PHPStats.phar file into the folder where you keep your libraries and include the file in your scripts. At this point, you can just start using the classes directly; the classes will autoload when needed. As an example: include('PHPStats.phar');

To use a class, remember to properly call the namespace that it's in. For example, to create a new instance of the Beta distribution, call it like this: $beta = new \\PHPStats\\ProbabilityDistribution\\Beta(6,20);

If performance is a concern, files can be pre-emptively loaded, rather than waiting for the autoload functionality. For example, to pre-load the Beta class file, call: include('phar://PHPStats.phar/lib/ProbabilityDistribution/Beta.php');

**Dependencies**PHPStats is written to work with PHP 5.3 and greater, as it makes heavy use of features introduced in PHP 5.3. No other run-time dependencies exist.

Build dependencies include both Phing and PHPUnit. When attempting to build this library, beware that the tests for the random variate functions are probabalistic in nature and will fail on occasion.

**License**PHPStats is released under the LGPL version 3 or later. For more details, please refer to the copy of LICENSE.txt that accompanies your download.

**Change Log**

*v0.4*

Added Levy distribution

Added Kmeans clustering

Matrix constructor now optionally takes arrays

*v0.3*

Added LogNormal distribution

Tested and fixed all random number generators

Added Kolmogorov-Smirnov test

Completed implementing the gamma family of special functions

Many bugfixes

*v0.2*

Added a Matrix class for Linear Algebra

Added the Rayleigh Distribution

*v0.1.1*

Added the Cauchy Distribution

Assorted bug fixes

*v0.1*

First release of PHPStats

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1101 days

Total

2

Last Release

978d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5047601?v=4)[Andreas Fieger](/maintainers/fiedsch)[@fiedsch](https://github.com/fiedsch)

---

Top Contributors

[![mcordingley](https://avatars.githubusercontent.com/u/1084253?v=4)](https://github.com/mcordingley "mcordingley (263 commits)")[![fiedsch](https://avatars.githubusercontent.com/u/5047601?v=4)](https://github.com/fiedsch "fiedsch (11 commits)")[![robzienert](https://avatars.githubusercontent.com/u/108741?v=4)](https://github.com/robzienert "robzienert (6 commits)")[![cameronsutter](https://avatars.githubusercontent.com/u/780655?v=4)](https://github.com/cameronsutter "cameronsutter (1 commits)")

---

Tags

statsstatistics

### Embed Badge

![Health badge](/badges/fiedsch-php-stats/health.svg)

```
[![Health](https://phpackages.com/badges/fiedsch-php-stats/health.svg)](https://phpackages.com/packages/fiedsch-php-stats)
```

###  Alternatives

[wnx/laravel-stats

Get insights about your Laravel Project

1.8k1.8M7](/packages/wnx-laravel-stats)[markrogoyski/math-php

Math Library for PHP. Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra

2.4k7.1M40](/packages/markrogoyski-math-php)[rubix/tensor

A library and extension that provides objects for scientific computing in PHP.

2751.4M5](/packages/rubix-tensor)[szymach/c-pchart

Port of "pChart" library into PHP 8+

1512.3M7](/packages/szymach-c-pchart)[richjenks/stats

Statistics library for non-statistical people

23149.0k1](/packages/richjenks-stats)[slickdeals/statsd

a PHP client for statsd

264.5M8](/packages/slickdeals-statsd)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
