PHP Stats Documentation

Demo Contact Documentation Status Home

Function Reference

More to come soon


float percentile( array number_array, int percentile)

This function will return the percentile for the given number_array. the second parameter can be 0 < percentile < 100 or 0 < percentile < 1. if percentile is a decimal then .50 will be assumed to be the 50th percentile. For example

$foo = percentile( $data, .5 );
$bar = percentile( $data, 50 );

foo and bar are the same.


float stat_range( array number_array )

Returns the difference of the largest and smallest elements in number_array. Note: this function should be called range but this function is all ready used as part of the native php function set.


float mid_range( array number_array )