Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Excel or Perl for simple statistics?

by tangent (Vicar)
on Jan 20, 2018 at 17:53 UTC ( #1207591=note: print w/replies, xml ) Need Help??

in reply to Excel or Perl for simple statistics?

There are generally two types of standard deviation calculations, one for when your data represents a sample of the population, and one where it represents the whole population. The former divides the squared deviations by N-1 (the sample count minus 1), whereas the latter divides by N.

As pryrt points out, you can get Statistics::Basic to do both by setting UNBIAS to true, whereas Statistics::Lite gives you two separate functions. Note also that Statistics::Basic defaults to a precision of 2 decimal points - this can be changed by setting IPRES to the desired precision.

Just for fun I did a little comparison table:

Excel STDEV 0.41068873 STDEVP 0.400791162
Open Office STDEV 0.4106887305 STDEVP 0.400791162
Statistics::Lite stddev() 0.410688730467897 stddevp() 0.400791162022762
Statistics::Basic stddev()
0.410688730467897 stddev() 0.400791162022762

  • Comment on Re: Excel or Perl for simple statistics?

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1207591]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2022-05-16 10:07 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (62 votes). Check out past polls.