Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Excel or Perl for simple statistics?

by tangent (Parson)
on Jan 20, 2018 at 17:53 UTC ( [id://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()
UNBIAS true
0.410688730467897 stddev() 0.400791162022762

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-25 17:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found