|
Posted by Manuel Lemos on 10/21/09 11:25
Hello,
on 08/30/2005 11:09 PM Christopher Pomasl said the following:
> Also Note there are two calculations for standard deviation.
> The first as shown above is called the "population" deviation and implies
> that the sample used to calculate the deviation is the entire sample.
>
> This is defined as sqrt( sum ((x - mean(x))**2) / N)
>
> There is a weighted "sample" deviation calculation which implies that the
> sample used is just that, a sample and NOT the entire population.
>
> This is defined as sqrt( sum ((x - mean(2))**2) / N - 1)
>
> In this case, the code shown above should subtract 1 from $nbelement
> before the sqtr() function near the bottom.
You may also want to take a look at this class that computes standard
deviation:
http://www.phpclasses.org/probabilistic
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Navigation:
[Reply to this message]
|