PHPackages                             syalanskiy/simple-stat - 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. syalanskiy/simple-stat

ActiveLibrary

syalanskiy/simple-stat
======================

Simple Math Stat Library

v1.0.0(2y ago)03MITPHPPHP &gt;=8.0

Since Nov 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Yalanskiy/SimpleStat)[ Packagist](https://packagist.org/packages/syalanskiy/simple-stat)[ RSS](/packages/syalanskiy-simple-stat/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

SimpleStat
==========

[](#simplestat)

This is a PHP class that performs various calculations on numeric arrays.

Installation
------------

[](#installation)

The package can be installed via Composer by running the following command:

```
composer require syalanskiy/simple-stat

```

Usage
-----

[](#usage)

First, include the vendor/autoload.php file:

```
require_once 'vendor/autoload.php';
```

Then, create an instance of the `Stat` class:

```
$data = [1, 7.7, 2, 3.3, 7.7, 5.67, 2, 1.1, 7.7, 9];
$stat = new \Yalanskiy\SimpleStat\Stat($data);
```

To perform calculation, call the appropriate method:

```
$stat->count();
$stat->summ();
$stat->arithmeticMean();
$stat->geometricMean();
$stat->median();
$stat->mode();
```

Example
-------

[](#example)

```
$data = [1, 7.7, 2, 3.3, 7.7, 5.67, 2, 1.1, 7.7, 9];
$stat = new \Yalanskiy\SimpleStat\Stat($data);

echo $stat->count();
echo PHP_EOL;

echo $stat->summ();
echo PHP_EOL;

echo $stat->arithmeticMean();
echo PHP_EOL;

echo $stat->geometricMean();
echo PHP_EOL;

echo $stat->median();
echo PHP_EOL;

echo $stat->mode();
echo PHP_EOL;
```

Contribution
------------

[](#contribution)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

902d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/db9e2e6ebabe9f22168040025511680976f32dcaaa550826215ee4cdca52d00b?d=identicon)[Yalanskiy](/maintainers/Yalanskiy)

---

Top Contributors

[![Yalanskiy](https://avatars.githubusercontent.com/u/464459?v=4)](https://github.com/Yalanskiy "Yalanskiy (1 commits)")

### Embed Badge

![Health badge](/badges/syalanskiy-simple-stat/health.svg)

```
[![Health](https://phpackages.com/badges/syalanskiy-simple-stat/health.svg)](https://phpackages.com/packages/syalanskiy-simple-stat)
```

PHPackages © 2026

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