Standard deviation

Hi How do I work out the standard deviation for an x and y array.
[72 byte] By [Rob111a] at [2007-10-3 8:41:14]
# 1

Hi

It's not clear, from your question, if you want to know how to calculate Standard Deviation from a formula or if you are looking for something more "pragmatic".

If you need a formula from which you can create code, then the formula for Standard Deviation may be found here:

http://mathworld.wolfram.com/StandardDeviation.html

If you are looking for an API, then the Jakarta Commons project has a statistics package, which contains a DescriptiveMaths class, with a getStandardDeviation method:

http://jakarta.apache.org/commons/math/apidocs/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.html

(I've not used the Jakata Commons stats package so can't really comment on its quality or ease of use.)

smarsha at 2007-7-15 3:49:31 > top of Java-index,Other Topics,Algorithms...
# 2
To add to what smarsh said, since you talk about two arrays make surethat it's standard deviation you are after and not something like covariance.
pbrockway2a at 2007-7-15 3:49:31 > top of Java-index,Other Topics,Algorithms...