Download the PHP package happyr/normal-distribution-bundle without Composer
On this page you can find all versions of the php package happyr/normal-distribution-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download happyr/normal-distribution-bundle
More information about happyr/normal-distribution-bundle
Files in happyr/normal-distribution-bundle
Package normal-distribution-bundle
Short Description A bundle to calculate normal distribution and other related stuff
License MIT
Informations about the package normal-distribution-bundle
Happyr Normal Distribution Bundle
A bundle to calculate distributions and some statistical important values with those distributions.
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
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
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 => $frequency). See example below.
StatisticsHelper
The StatisticsHelper
is used when you want to get values from a pre-calcuated normal distribution.
getPercentile
: Fetch the percentile for a given valuegetZTransform
: Perform a Z-transformation to get a normalized value given your normal distribution.getStanine
: Get the stanine value for a given valuegetStanineForPercentile
: Get the stanine value for a given percentile. This is useful when your distribution isn't a standard distribution.
Installation
Install it with Composer!
After the dependencies are downloaded, then register the bundle in the AppKernel.
Update the database
The bundle contains two entities. You should update your database with a migration script or (if you are in a pure dev environment) run the following command:
All versions of normal-distribution-bundle with dependencies
symfony/config Version ^4.4 || ^5.1
symfony/dependency-injection Version ^4.4 || ^5.1
symfony/http-kernel Version ^4.4 || ^5.1