in reply to Re^2: Excel or Perl for simple statistics?
in thread Excel or Perl for simple statistics?

I believe davies was wrong about it also being called the standard error: according to wp, Standard_error, the standard error is the standard deviation divided by the root of the number of samples.

The population standard deviation (Excel: =STDEVP() or =STDEV.P()) assumes you that have data for the entire population; the sample standard deviation (Excel: =STDEV() or =STDEV.S()) assumes that your n data points are just a sample of the population, so it uses a different denominator (n-1) inside the radical, to account for the uncertainty because it's just a sample, not the whole population. Given your set of data, the 0.401791 is the population standard deviation, and the 0.410689 is the sample standard deviation.

  • Population standard deviation: σ = sqrt( Σ{ (xi - xavg)2 } / { n } )
  • Sample standard deviation: s = sqrt( Σ{ (xi - xavg)2 } / { n - 1 } )
  • According to Statistics::Basic, you can set $Statistics::Basic::UNBIAS true to get the sample, or (implied) set it false to get the population. Statistics::Lite directly says that their stddev() function is the unbiased (sample) n-1, which matches the Excel =STDEV() function, and they have the stddevp() for the population n, matching the Excel =STDEVP().