balintlaczko / VideoAnalysis

Non-realtime video analysis, exporting motiongrams and various quantitative features of movement in the video file.
https://www.uio.no/ritmo/english/research/labs/fourms/downloads/software/VideoAnalysis/
1 stars 0 forks source link

Calculating standard deviation in [j.stats] is not precise? #2

Closed balintlaczko closed 4 years ago

balintlaczko commented 4 years ago

While implementing the [mtg.stats] to replace [j.stats] we noticed that the standard deviation in [j.stats] is not accurate(?). To test this, you can feed 2 samples into [j.stats]: "1, 2". The standard deviation of this should be 0.5, but [j.stats] says it's around 0.7. In our implementation the std. dev. of "1, 2" is (correctly) 0.5. This might be a minor compatibility break.

balintlaczko commented 4 years ago

This is not a bug, just another typical way of calculating standard deviation. Some calculate it as sqrt(S/n) and others (including jamoma) as sqrt(S/n-1) - so we keep this in the implementation to avoid compatibility breaks.