I disagree.  If you have (x -1) * (x - 1) you get
x*x -2x +1

To get x*x -1 you would have to do (x-1) * (x+1)

Sasha Pachev wrote:

> Looking at the code, i'm not sure they are even calculating the standard deviation correctly. They are using this formula:

> dev = sqrt(  (E (sqr(x)))/N - sqr( (E(x))/N))

> standard deviation is defined as
> sqrt( 1 / (N) * E sqr((x - E(x)/N) ))

Derek:

The two methods will give you the same result - you can verify it with a short algebraic exercise. The advantage of the first method is that you can do it in one pass through the data array.

.===================================.
| This has been a P.L.U.G. mailing. |
|      Don't Fear the Penguin.      |
|  IRC: #utah at irc.freenode.net   |
`==================================='

Reply via email to