PHP Classes
elePHPant
Icontem

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    
Last Updated Ratings Unique User Downloads Download Rankings
2019-05-24 (6 months ago) RSS 2.0 feedNot enough user ratingsTotal: 111 All time: 9,155 This week: 359Up
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
  Performance   Level  
Name: Greg Neyman <contact>
Classes: 2 packages by
Country: United States United States
Age: 42
All time rank: 4112467 in United States United States
Week rank: 68 Up4 in United States United States 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:111
This week:0
All time:9,155
This week:359Up