Ero sivun ”Widget:Test4” versioiden välillä
Järvi-meriwikistä
Rivi 710: | Rivi 710: | ||
devx = 0; | devx = 0; | ||
for (var vi in memo.avgWA[w].values ) { | for (var vi in memo.avgWA[w].values ) { | ||
− | + | devx += Math.pow( (memo.avgWA[w].values[vi] - memo.avgWA[w].avg), 2 ); | |
− | |||
− | |||
− | |||
− | |||
} | } | ||
+ | memo.avgWA[w].dev = Math.sqrt( devx/memo.avgWA[w].count ); | ||
+ | devSum += memo.avgWA[w].dev; | ||
+ | devMax = Math.max( memo.avgWA[w].dev, devMax ); | ||
} | } | ||