MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / variance

Method variance

libraries/Statistic/Statistic.h:200–204  ·  view source on GitHub ↗

useStdDev must be true to use next three all return NAN if count == zero

Source from the content-addressed store, hash-verified

198 // useStdDev must be true to use next three
199 // all return NAN if count == zero
200 value_type variance() const {
201 if (!_useStdDev) return NaN;
202 if (_cnt == 0) return NaN; // prevent DIV0 error
203 return _extra.ssqdif() / _cnt;
204 }
205
206
207 // Population standard deviation

Callers 1

unittestFunction · 0.80

Calls 1

ssqdifMethod · 0.45

Tested by 1

unittestFunction · 0.64