PHPackages                             oefenweb/statistics - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. oefenweb/statistics

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

oefenweb/statistics
===================

Statistics library for PHP

v3.0.1(4y ago)32402.3k↓83.7%10[2 issues](https://github.com/Oefenweb/php-statistics/issues)1MITPHPPHP &gt;=7.0.0

Since Jun 10Pushed 4y ago2 watchersCompare

[ Source](https://github.com/Oefenweb/php-statistics)[ Packagist](https://packagist.org/packages/oefenweb/statistics)[ Docs](http://github.com/Oefenweb/php-statistics)[ RSS](/packages/oefenweb-statistics/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (9)DependenciesVersions (11)Used By (1)

php-statistics
==============

[](#php-statistics)

[![Build Status](https://camo.githubusercontent.com/5af866024c5785fc5e8833168347d488b45fb9bed22918e29baf3b6f7e756e67/68747470733a2f2f7472617669732d63692e6f72672f4f6566656e7765622f7068702d737461746973746963732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Oefenweb/php-statistics)[![PHP 7 ready](https://camo.githubusercontent.com/eebee3ab4883540be29629b2f6001efcd4ccde351107cdf95401c44ffc396e17/687474703a2f2f7068703772656164792e74696d6573706c696e7465722e63682f4f6566656e7765622f7068702d737461746973746963732f62616467652e737667)](https://travis-ci.org/Oefenweb/php-statistics)[![codecov](https://camo.githubusercontent.com/59d63223b76c90ca33fb2659915a85e17d102fbbcdf72bccc38b7eb0f08b7d8d/68747470733a2f2f636f6465636f762e696f2f67682f4f6566656e7765622f7068702d737461746973746963732f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/Oefenweb/php-statistics)[![Packagist downloads](https://camo.githubusercontent.com/b04b29d05ab4345642ddac0ca3b056a8449f819cf112da5e56bde0e493e98971/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4f6566656e7765622f737461746973746963732e737667)](https://packagist.org/packages/oefenweb/statistics)[![Code Climate](https://camo.githubusercontent.com/ff2eb25f84b428e5a4987a53e7e5ff2e97eb07df021c0c69671bd64da440b11f/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4f6566656e7765622f7068702d737461746973746963732f6261646765732f6770612e737667)](https://codeclimate.com/github/Oefenweb/php-statistics)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6bdc13874eb362e1a7ad1dff9e2b06cbe7fe756e1f365aebb17f9493c0b27bc9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4f6566656e7765622f7068702d737461746973746963732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Oefenweb/php-statistics/?branch=master)

Statistics library for PHP.

Requirements
------------

[](#requirements)

- PHP 7.2.0 or greater.

Usage
-----

[](#usage)

### Sum

[](#sum)

```
use Oefenweb\Statistics\Statistics;

Statistics::sum([1, 2, 3]); // 6
```

### Minimum

[](#minimum)

```
use Oefenweb\Statistics\Statistics;

Statistics::min([1, 2, 3]); // 1
```

### Maximum

[](#maximum)

```
use Oefenweb\Statistics\Statistics;

Statistics::max([1, 2, 3]); // 3
```

### Mean

[](#mean)

```
use Oefenweb\Statistics\Statistics;

Statistics::mean([1, 2, 3]); // 2
```

### Frequency

[](#frequency)

```
use Oefenweb\Statistics\Statistics;

Statistics::frequency([1, 2, 3, 3, 3]); // [1 => 1, 2 => 1, 3 => 3]
```

### Mode

[](#mode)

```
use Oefenweb\Statistics\Statistics;

Statistics::mode([1, 2, 2, 3]); // 2
```

### Variance (sample and population)

[](#variance-sample-and-population)

```
use Oefenweb\Statistics\Statistics;

Statistics::variance([1, 2, 3]); // 1
Statistics::variance([1, 2, 3], false); // 0.66666666666667
```

### Standard deviation (sample and population)

[](#standard-deviation-sample-and-population)

```
use Oefenweb\Statistics\Statistics;

Statistics::standardDeviation([1, 2, 3]); // 1.0
Statistics::standardDeviation([1, 2, 3], false); // 0.81649658092773
```

### Range

[](#range)

```
use Oefenweb\Statistics\Statistics;

Statistics::range([4, 6, 10, 15, 18]); // 14
```

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 93.3% 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 ~275 days

Recently: every ~289 days

Total

10

Last Release

1539d ago

Major Versions

v1.1.4 → v2.0.02019-01-23

v2.0.0 → v3.0.02020-03-11

PHP version history (3 changes)v1.0.0PHP &gt;=5.3.10

v1.1.0PHP &gt;=5.4.16

v2.0.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4697819?v=4)[Oefenweb.nl](/maintainers/oefenweb)[@Oefenweb](https://github.com/Oefenweb)

---

Top Contributors

[![tersmitten](https://avatars.githubusercontent.com/u/3392962?v=4)](https://github.com/tersmitten "tersmitten (42 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (3 commits)")

---

Tags

phpstatisticsstatistics

### Embed Badge

![Health badge](/badges/oefenweb-statistics/health.svg)

```
[![Health](https://phpackages.com/badges/oefenweb-statistics/health.svg)](https://phpackages.com/packages/oefenweb-statistics)
```

###  Alternatives

[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.4M47](/packages/markrogoyski-math-php)[wnx/laravel-stats

Get insights about your Laravel Project

1.7k1.8M7](/packages/wnx-laravel-stats)[rubix/tensor

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

2801.5M5](/packages/rubix-tensor)[hi-folks/statistics

PHP package that provides functions for calculating mathematical statistics of numeric data.

402113.2k](/packages/hi-folks-statistics)[mcordingley/regression

Regression Package for PHP

88132.3k1](/packages/mcordingley-regression)[richjenks/stats

Statistics library for non-statistical people

23152.6k1](/packages/richjenks-stats)

PHPackages © 2026

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