Example #1
0
 /**
  * Calculates the standard deviation of the specified elements. If the 
  * given elements is a population then the population standard deviation 
  * is calculated otherwise the sample standard deviation.
  *
  * @param array $elements list of element from a sample or population 
  * distribution.
  * @param boolean $population true if the element list is a population 
  * distribution.
  *
  * @return the variance of the specified elements.
  */
 public static function standardDeviation($elements, $population = FALSE)
 {
     return Math::stdv($elements, $population);
 }