Finding difference in a number range

This is my problem. I have a scale from 0 to 15 and five different
elements with their own position on that scale. How can I understand if
they are spread all over the scale, have different positions on the
scale, or if they are close and nearby each-other?

These are close: 2,3,4,3,2

These are not so close: 2,4,3,12,15

These are spread: 0,5,8,12,15

2009/9/14 Pål Bergström [email protected]:

This is my problem. I have a scale from 0 to 15 and five different
elements with their own position on that scale. How can I understand if
they are spread all over the scale, have different positions on the
scale, or if they are close and nearby each-other?

These are close: 2,3,4,3,2

These are not so close: 2,4,3,12,15

These are spread: 0,5,8,12,15

Sounds like a use case for
http://en.wikipedia.org/wiki/Standard_deviation

Kind regards

robert

Robert K. wrote:

Sounds like a use case for
http://en.wikipedia.org/wiki/Standard_deviation

Kind regards

robert

Never heard of that term. Great to know. Thanks. Still need to solve my
problem, but now I know what to search for.

Pål Bergström wrote:

Never heard of that term. Great to know. Thanks. Still need to solve my
problem, but now I know what to search for.

Found the answer:

http://samdorr.net/blog/2008/10/standard-deviation/

http://warrenseen.com/blog/2006/03/13/how-to-calculate-standard-deviation/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs