Skip to content
Advertisement

z-Scores(standard deviation and mean) in PHP

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 suggestions on how to do this in PHP?

I am trying to do this in the smallest number of steps.

Advertisement

Answer

to calculate the mean you can do:

JavaScript

standard deviation is like so:

JavaScript

right off this page

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement