Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Is there a formula that is capable of operating on streaming inputs and approximating standard deviation of the set of numbers?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You can use the formula $\sigma = \sqrt{\bar{x^2}-(\bar x)^2}=\sqrt{\frac {\sum x^2}N-\left(\frac {\sum x}N\right)^2}$ Each sum can be accumulated as the data comes in. The disadvantage compared to averaging the data first and subtracting the average from each item is you are more prone to overflow and loss of significance, but mathematically it is equivalent.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.