Page 1 of 1

Formula of "mean dist" and "standard deviation"

Posted: Wed Feb 12, 2014 7:45 am
by MarkusM
Hi there,

I could not figure out how the computation of "mean distance" and "standard deviation" for Cloud/Cloud or Cloud/Mesh Distances work.

Is it something like:

mean dist = sum ( distances ) / n
std deviation = sqrt ( sum ( Xi - Xm )) / n

n: number of all distances
Xi: distance from Point i to its next neighbour
Xm: mean distance

It would be nice if anybody could help me out.

Thanks and Greets
MarkusM

Re: Formula of "mean dist" and "standard deviation"

Posted: Wed Feb 12, 2014 8:08 am
by daniel
The mean distance is what you suggested:

Code: Select all

mean dist = sum ( distances ) / n
But you forgot a "square" power in the std. deviation equation, and the division is done before the square root:

Code: Select all

std deviation = sqrt ( sum ( Xi - Xm )^2  / n )
Which simplifies in:

Code: Select all

std deviation = sqrt( sum ( Xi )^2 / n - mean^2 ) 
(well at least it's faster to compute ;)

Re: Formula of "mean dist" and "standard deviation"

Posted: Wed Feb 12, 2014 8:23 am
by MarkusM
Thank you for the quick response!