PHPackages                             happyr/normal-distribution-bundle - 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. happyr/normal-distribution-bundle

ActiveSymfony-bundle

happyr/normal-distribution-bundle
=================================

A bundle to calculate normal distribution and other related stuff

0.5.0(5y ago)01.1kMITPHPPHP ^7.2

Since Jul 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Happyr/NormalDistributionBundle)[ Packagist](https://packagist.org/packages/happyr/normal-distribution-bundle)[ GitHub Sponsors](https://github.com/Nyholm)[ RSS](/packages/happyr-normal-distribution-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (8)Versions (9)Used By (0)

Happyr Normal Distribution Bundle
=================================

[](#happyr-normal-distribution-bundle)

[![Latest Version](https://camo.githubusercontent.com/7d65dae848f09b872685dc438cc7c9c1351e07c03a5b616b60d50df0e1e72f61/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f4861707079722f4e6f726d616c446973747269627574696f6e42756e646c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/Happyr/NormalDistributionBundle/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![SensioLabsInsight](https://camo.githubusercontent.com/48626d07a5aa345122816bfdf49c4e311a6fb226d26a7e349427d5e799e725a3/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f39356338653164312d326235332d343564622d613439642d6165373732633566323730642f6d696e692e706e67)](https://insight.sensiolabs.com/projects/95c8e1d1-2b53-45db-a49d-ae772c5f270d)[![Total Downloads](https://camo.githubusercontent.com/5a3ce3edb685f62ce3d2ff15244c103f87efbf11f40de8b2bd18a7d189a52502/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6861707079722f6e6f726d616c2d646973747269627574696f6e2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/happyr/normal-distribution-bundle)

A bundle to calculate distributions and some statistical important values with those distributions.

The API
-------

[](#the-api)

This bundle has three services that helps you with your distribution. Each service and function has comments that describes how to use them and why. This is a brief overview.

### Calculator

[](#calculator)

Use this service when you want to calculate a normal distribution. This service has two functions `normalDistribution`and `standardDistribution`. The later calculates the unit normal distribution where `meanValue = 0`and the `standardDistribution = 1`.

The input to both functions is an array with values like array(3,6,2,6,4,2,3,6,8, ... );

### DistributionManager

[](#distributionmanager)

This service builds a distribution of any type and saves some data in the database. The public functions to this service are `addDistribution`, `getPercentile` and `createValueFrequencyArray`.

`DistributionManager::addDistribution` takes an identifier name and an array with the values and frequency as arguments. The array must be on the form ($value =&gt; $frequency). See example below.

```
