Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: variance - Function Up: mathematics - Module Previous: mean - Function


moments - Function



Package utility
Module mathematics


Calculate one or more moments for a set of numbers


Synopsis
moments(highest_moment, dots, assumed_mean)


Description
You specify the highest moment you want (0=number,1=mean,2=variance, 3=skew,4=kurtosis).

You can tell it to assume a mean rather than calculating it if desired. NB: The assumed_mean argument must be explicitly indicated as in the example below ('assumed_mean=0', not just '0'); otherwise, the value specified will simply be included in the list of samples.



Arguments

highest_moment   1=mean,...4=kurtosis
dots   The values to perform statistics on
assumed_mean   If numeric, assume the mean is this value rather than calculating it; if used, parameter name must be explicitly specified
    Allowed: numeric scalar
    Default: [=]


Returns
the moments


Example
      - include "statistics.g"
      - moments(2, 1,3,5,7,9)
      [n=5, mean=5, variance=10, stddev=3.16228] 
      + moments(2, 1, 3, 5, 7, 9, assumed_mean=0)
      [n=5, mean=0, note=The mean was supplied - it has not been calculated, variance=41.25, stddev=6.42262]


See Also
mean, variance, stddev, skew, kurtosis



next up previous contents index
Next: variance - Function Up: mathematics - Module Previous: mean - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15