Weighted PHP Statistics: Calculate statistics on weighted data sets

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 114 All time: 9,225 This week: 273Up
Version License PHP version Categories
weightedstats 1.0.0Freely Distributable5Algorithms, PHP 5, Statistics
Description Author

This class can calculate statistics on weighted data sets.

It can take as parameters one data set array with numeric values and another array with the respective weights for the values in the first parameter array.

The class can calculate several types of common statistics on the data set values considering the weight values, like: the mean, average, standard deviation, percentile and skew.

Innovation Award
PHP Programming Innovation award nominee
May 2019
Number 5


Prize: One subscription to the PDF edition of the PHP Architect magazine
There are many types of statistical functions that can be applied to data sets like the mean, average, standard deviation, etc..

This class implements a variant version of those statistical functions by applying variable weights to each number value in the data set to which it is computing the values of those statistical functions.

Manuel Lemos
Picture of Greg Neyman
  Performance   Level  
Name: Greg Neyman <contact>
Classes: 2 packages by
Country: ???
Age: 43
All time rank: 4128
Week rank: 786 Up
Innovation award
Innovation award
Nominee: 2x

Details
Many datasets have individual points which have differing weights than other points in the set. These datasets will include that information in a Weight column.
Attempting to calculate statistics in a traditional way on such data will give incorrect results.
This class has packaged the modified methods for common stats so they can be reliably performed when needed.
  Files folder image Files  
File Role Description
Accessible without login Plain text file readme Doc. readme
Accessible without login Plain text file weightedexample.php Example Example
Plain text file weightedstats.php Class Source File

 Version Control Unique User Downloads Download Rankings  
 0%
Total:114
This week:0
All time:9,225
This week:273Up

For more information send a message to info at phpclasses dot org.