On Fri, Jul 6, 2012 at 12:31 PM, David Mertens <[email protected]> wrote: > ...snip... > > That is the so-called population standard deviation, which assumes that you > got the average value from the population, not the sample. For large data > sets, the discrepancy is not important. For small data sets, this is only > accurate if you have the entire population of interest. If you only have a > subset of the population, then the statistically correct value comes by > dividing instead by the number of elements minus 1, i.e. > > my $st_dev = sqrt( $sq_diff_sum / ($sq_diff_sum->nelem - 1) ); > > In this case---finding the mean and standard deviation of the elements along > the diagonal---either method is acceptable, and you should report which > value you calculated when you show your results. For sample-based > statistical calculations, where you only take a sample of your whole > population, the latter calculation is correct. > > I say all of this just to point out that the second return value of the > stats and statsover methods is the sample RMS deviation from the mean, i.e. > it divides by N-1. (The docs call this the population RMS deviation for > reasons not clear to me.) If you want to use the population RMS, you should > get the 7th argument, like so:
This seems like a documentation problem to me. In fact, I would prefer that the RMS be the second value and have the sample RMS one at the end. --Chris _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
