I am trying to calculate Z-scores using PHP. Essentially, I am looking for the most efficient way to calculate the mean and standard deviation of a data set (PHP array). Any
The topic is pretty old, but actually I guess you can get the substitute of STDEV.P function from Excel easily using the function like below.
function stdev_p($arr) { $arr2 = array(); $mean = array_sum($arr)/count($arr); for ($x = 0; $x