STATISTICS

WEIGHTS

 Syntax: STATISTICS\WEIGHTS w x { s1\keyword { s2\keyword ... }}

 If a weight vector, w, is entered, the \WEIGHTS qualifier must be used.
 Weights cannot be applied to matrix data. These weights, w[i] >= 0, could
 be the frequency, the probability, the mass, the reliability, or some
 other multiplier. The minimum of the lengths of w and x will be used.  If
 they are different, a warning message to that effect will be displayed.

extrema

   keyword   output value
   ------------------------------------------------------------
   \MAX   --  maximum value of the variable
   \IMAX  --  index of the maximum if x is a vector
              row index of the maximum if x is a matrix
   \JMAX  --  column index of the maximum if x is a matrix
   \MIN   --  minimum value of the variable
   \IMIN  --  index of the minimum if x is a vector
              row index of the minimum if x is a matrix
   \JMIN  --  column index of the minimum if x is a matrix

central_measures

   keyword   output value
   ------------------------------------------------------------
   \SUM     --  sum  ( unweighted )
   \MEAN    --  mean value
   \GMEAN   --  geometric mean
   \MEDIAN  --  median value
   \RMS     --  root mean square

Additional Information on:

  • geometric_mean
  • dispersion_and_skewness

       keyword   output value
       ------------------------------------------------------------
       \VARIANCE  --  variance
       \SDEV      --  standard deviation
       \ADEV      --  average deviation
       \KURTOSIS  --  kurtosis
       \SKEWNESS  --  skewness
    

    Additional Information on:

  • variance
  • standard_deviation
  • average_deviation
  • skewness
  • kurtosis
  • NOMESSAGES

     If the \NOMESSAGES qualifier is used, and if at least one output scalar
     is entered, then the values of the maximum, minimum, and so on, will not
     be displayed.
    

    MOMENTS

     Syntax: STATISTICS\MOMENT w x n { sout }
    
     If the \MOMENTS qualifier is used, the n_th moment, of vector x with weight
     w is calculated and optionally stored in scalar sout. Suppose the length of
     x and w is k.  Let:    W = sum from i=1 to k of w[i]
                            S = sum from i=1 to k of w[i]*x[i]^n
     then  sout = S/W.  The moment number, n, can be any integer > 0. If x and w
     have different lengths, a warning message is displayed, and the minimum
     length is used.
    

    1_example

     Suppose you have a vector X = [ 1.2; 2.1; 3.2; 4.5; 5; 6; 7 ]. Enter: 
    
     STATISTICS X
     Minimum =            1.2               | Maximum =           7
     Index of minimum =  [1]                | Index of maximum = [7]
     Mean =               4.142857          | Geometric mean =    4.13629
     Median not requested                   | Variance =          4.36619
     Standard deviation = 2.089543          | Average deviation = 1.693878
     Skewness =           -0.06961349       | Kurtosis =          -1.708838
    

    2_example

     Suppose you have a vector X = [ 1.2; 2.1; 3.2; 4.5; 5; 6; 7 ].
     If you want the values for the maximum, minimum and mean of X, enter:
    
     STATISTICS X XMAX\MAX XMIN\MIN XMEAN\MEAN
    
     and scalar XMAX will be equal to 7, XMIN will be equal to 1.2, and
     XMEAN will be equal to 4.142857
    

    PEARSON

     Syntax: STATISTICS\PEARSON x y r prob
    
     Given two vectors, x and y, the STATISTICS\PEARSON command calculates
     their correlation coefficient, r, and the significance level at which
     the null hypothesis of zero correlation is disproved. A small value of
     prob indicates a significant correlation.