Dear ferret users,
I have 2 questions regarding computing variance.
1. sample and population based variance ( equivalently standard deviation):
I have noticed that stat command gives standard deviation based on a sample where as var command gives variance based on a population. My assumption is its customary to calculate sample based variance unless otherwise stated but why does ferret compute variance based on population with var command? I think it is possible to get sample based variance e.g. for my 1-D data with l=140
list/precision=6 v1[l=@var]*v1[l=@ngd]/(v1[l=@ngd]-1) ! = 7005.65 (this
is still slightly different from sample based variance computed from other method e.g. excel gave 7002.42 )
Isn't there a way to compute sample based variance in more straight forward manner and why its not the default option (with var)?
2. Computing running variance:
I am using boxcar smoother transformation (e.g. v1[l=1:140@sbx:31]) to compute running mean but I can't think of a way to compute running variance (standard deviation) in similar manner. My guess is this would involve looping over time but I am not able to work out a way.
Please advice. Thanks in advance.
Best regards,
Jagadish