PHPackages                             huasofoundries/math\_histogram - 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. huasofoundries/math\_histogram

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

huasofoundries/math\_histogram
==============================

Fork/Refactor of PEAR's Math Stats + Math Histogram

1.0.3(8y ago)03.2k1[2 PRs](https://github.com/HuasoFoundries/math_histogram/pulls)PHP-3.0PHPPHP &gt;=5.5

Since Jan 28Pushed 5y ago13 watchersCompare

[ Source](https://github.com/HuasoFoundries/math_histogram)[ Packagist](https://packagist.org/packages/huasofoundries/math_histogram)[ RSS](/packages/huasofoundries-math-histogram/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (9)Used By (0)

Math\_Histogram
===============

[](#math_histogram)

[![Codacy Badge](https://camo.githubusercontent.com/94dc2975c528b03373b28677694af5abf32c64bd51294112039554832333e19b/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6362616132643665313162383461326261353831626334366532346132646137)](https://www.codacy.com/app/amenadiel/math_histogram?utm_source=github.com&utm_medium=referral&utm_content=HuasoFoundries/math_histogram&utm_campaign=badger)[![Packagist](https://camo.githubusercontent.com/fd32ab83becd6d65c03c20cd9e77925beec4cd20d2f4d5ea847a6cafde95c819/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f687561736f666f756e64726965732f6d6174685f686973746f6772616d2e737667)](https://packagist.org/packages/huasofoundries/math_histogram)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b5927eafee912fd47c74c91f948dfcecdd3c1068605bb3c90323d691bc2a7c05/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f487561736f466f756e64726965732f6d6174685f686973746f6772616d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/HuasoFoundries/math_histogram/?branch=master) [![Build Status](https://camo.githubusercontent.com/d8cdaa8f51cc5e9a1697525ee27d430f145690ae77262d4ab7047a277beada4a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f487561736f466f756e64726965732f6d6174685f686973746f6772616d2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/HuasoFoundries/math_histogram/build-status/master) [![StyleCI](https://camo.githubusercontent.com/ff5858b5c38e450746e019fce4f251da6e13a79f5dd67fa57cb5aeb3c66b4e5b/68747470733a2f2f7374796c6563692e696f2f7265706f732f35353432343637332f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/55424673)[![FOSSA Status](https://camo.githubusercontent.com/3e135d079a8d5e4ca9b8bd73953d79022891b3911f718f18ea4eeceadbe078a3/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d253246487561736f466f756e64726965732532466d6174685f686973746f6772616d2e7376673f747970653d736869656c64)](https://app.fossa.io/projects/git%2Bgithub.com%2FHuasoFoundries%2Fmath_histogram?ref=badge_shield)

This Package is a fork/refactor of classic PEAR's [Math\_Stats](http://pear.php.net/package/Math_Stats) and [Math\_Histogram](http://pear.php.net/package/Math_Histogram), adapted to use PSR4 autoloading, namespaces and PHP 5.5+ compatibility.

To test, run:

```
make install
make test

```

So what were Math Stats and Math Histogram?
-------------------------------------------

[](#so-what-were-math-stats-and-math-histogram)

This project is intented to replace both Math Stats and Math Histogram, which were meant to be installed with PEAR. These were their descriptions

### Math Stats

[](#math-stats)

Package to calculate statistical parameters of numerical arrays of data. The data can be in a simple numerical array, or in a cummulative numerical array. A cummulative array, has the value as the index and the number of repeats as the value for the array item, e.g. $data = \[ 3 =&gt; 4, 2.3 =&gt; 5, 1.25 =&gt; 6, 0.5 =&gt; 3\]. Nulls can be rejected, ignored or handled as zero values.

### Math Histogram

[](#math-histogram)

Package: Math\_Histogram

These classes can be used to calculate histogram distributions of data sets.

The Math\_Histogram class computes histograms from unidimensional data sets. These are also known as 2D historgrams, and can be computed in the regular binned frequency or as cummulative frequency.

Similarly, the Math\_Histogram3D and Math\_Histogram4D classes compute distributions from bi- and tri-dimensional data sets (respectively), both in regular frequency and cummulative frequency modes.

This package requires the Math\_Stats package, so if you do not have it installed, you need to do:

```
pear install Math_Stats

```

before you can start using Math\_Histogram in your scripts.

\--- Jesus M. Castagnetto

License
-------

[](#license)

[![FOSSA Status](https://camo.githubusercontent.com/09741285dfd0ed9e65f8e1b5bed60d41841324e12c03692803aeb682aad489ac/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d253246487561736f466f756e64726965732532466d6174685f686973746f6772616d2e7376673f747970653d6c61726765)](https://app.fossa.io/projects/git%2Bgithub.com%2FHuasoFoundries%2Fmath_histogram?ref=badge_large)

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~149 days

Recently: every ~170 days

Total

6

Last Release

3007d ago

Major Versions

0.2.0 → 1.0.02016-08-29

PHP version history (2 changes)v0.1.0PHP &gt;=5.3.3

0.2.0PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/284afa1961693b50b7e6707f198ebdba58dcd78cc4998870f1227597d12581e9?d=identicon)[ffflabs](/maintainers/ffflabs)

---

Top Contributors

[![jmcastagnetto](https://avatars.githubusercontent.com/u/364668?v=4)](https://github.com/jmcastagnetto "jmcastagnetto (55 commits)")[![ffflabs](https://avatars.githubusercontent.com/u/238439?v=4)](https://github.com/ffflabs "ffflabs (48 commits)")[![CloCkWeRX](https://avatars.githubusercontent.com/u/365751?v=4)](https://github.com/CloCkWeRX "CloCkWeRX (9 commits)")[![till](https://avatars.githubusercontent.com/u/27003?v=4)](https://github.com/till "till (5 commits)")[![mj](https://avatars.githubusercontent.com/u/5277?v=4)](https://github.com/mj "mj (4 commits)")[![fossabot](https://avatars.githubusercontent.com/u/29791463?v=4)](https://github.com/fossabot "fossabot (1 commits)")[![derickr](https://avatars.githubusercontent.com/u/208074?v=4)](https://github.com/derickr "derickr (1 commits)")[![codacy-badger](https://avatars.githubusercontent.com/u/23704769?v=4)](https://github.com/codacy-badger "codacy-badger (1 commits)")

---

Tags

math-histogrammath-statsnumeric-arrayspearphp

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/huasofoundries-math-histogram/health.svg)

```
[![Health](https://phpackages.com/badges/huasofoundries-math-histogram/health.svg)](https://phpackages.com/packages/huasofoundries-math-histogram)
```

###  Alternatives

[pear/pear-core-minimal

Minimal set of PEAR core files to be used as composer dependency

8073.0M69](/packages/pear-pear-core-minimal)

PHPackages © 2026

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