Hi all,
I'm just beginning to verse myself with arrays and writing my own functions and was hoping someone could walk me through the following function. Not so much the formula for stdDev, but sytax such as mean(k,Arr)....what is that doing. I'm still a bit uncomfortable with arrays.
Function StdDev(k as long, arr() as double)
Dim i as Long
Dim avg as Double, Sumsq as Double
avg = mean(k, arr)
For i = 1 to k
SumSq = SumSq + (arr(i) - avg) ^2
Next i
StdDev = sqr(sumsq/(k))
Thanks!!!!
AC
I'm just beginning to verse myself with arrays and writing my own functions and was hoping someone could walk me through the following function. Not so much the formula for stdDev, but sytax such as mean(k,Arr)....what is that doing. I'm still a bit uncomfortable with arrays.
Function StdDev(k as long, arr() as double)
Dim i as Long
Dim avg as Double, Sumsq as Double
avg = mean(k, arr)
For i = 1 to k
SumSq = SumSq + (arr(i) - avg) ^2
Next i
StdDev = sqr(sumsq/(k))
Thanks!!!!
AC