PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

stats_stat_binomial_coef> <stats_skew
Last updated: Fri, 22 Aug 2008

view this page in

stats_standard_deviation

(PECL stats:1.0.0-1.0.2)

stats_standard_deviationReturns the standard deviation

Descrição

float stats_standard_deviation ( array $a [, bool $sample ] )
Aviso

Esta função não está documentada; somente a lista de argumentos está disponível.

Parâmetros

a

sample

Valor Retornado



add a note add a note User Contributed Notes
stats_standard_deviation
kotecky O hotmail o com
24-Oct-2006 11:50
Missing standard deviation calculated from a population (division by N or by N-1): http://en.wikipedia.org/wiki/Standard_deviation
mightymrj at hotmail dot com
23-May-2006 02:52
Here's a couple functions I made that easily calculate the standard deviation. 

function average($array){
    $sum   = array_sum($array);
    $count = count($array);
    return $sum/$count;
}

//The average function can be use independantly but the deviation function uses the average function.

function deviation ($array){
   
    $avg = average($array);
    foreach ($array as $value) {
        $variance[] = pow($value-$avg, 2);
    }
    $deviation = sqrt(average($variance));
    return $deviation;
}

I hope this is useful

stats_stat_binomial_coef> <stats_skew
Last updated: Fri, 22 Aug 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites