numtools

perform numerical operations on vectors and matrices in unix pipes
git clone git://src.adamsgaard.dk/numtools # fast
git clone https://src.adamsgaard.dk/numtools.git # slow
Log | Files | Refs | README | LICENSE Back to index

stdvar.1 (1320B)


      1 .Dd $Mdocdate$
      2 .Dt STDVAR 1
      3 .Os
      4 .Sh NAME
      5 .Nm stdvar
      6 .Nd returns the standard variance for each input column
      7 .Sh SYNOPSIS
      8 .Nm
      9 .Op Fl d Ar delimstr
     10 .Op Fl n
     11 .Op Fl p Ar prec
     12 .Op Fl u
     13 .Sh DESCRIPTION
     14 .Nm
     15 returns the corrected sample standard variance (s²) for each column
     16 of standard input.
     17 Input fields must be tab-separated and each line most contain the same
     18 number of fields.
     19 The output is always in full double precision.
     20 .Pp
     21 The options are as follows:
     22 .Bl -tag -width Ds
     23 .It Fl d Ar delimstr
     24 Separate output values by
     25 .Ar delimstr .
     26 The default delimiter is tab characters.
     27 .It Fl n
     28 Do not print a newline after the final value.
     29 .It Fl p Ar prec
     30 Print the output values with
     31 .Ar prec
     32 digits of precision.
     33 By default, the output is printed with 17 digits of precision, which is
     34 full double precision on 64-bit systems.
     35 .It Fl u
     36 Return the uncorrected sample standard deviation instead.
     37 .El
     38 .Sh EXAMPLES
     39 Compute the corrected standard variance for some input numbers:
     40 .Dl $ printf '10\en8\en10\en8\en8\en4\en' | stdvar
     41 .Dl 4.7999999999999998
     42 .Pp
     43 Same as the previous example, but return the uncorrected standard
     44 variance:
     45 .Dl $ printf '10\en8\en10\en8\en8\en4\en' | stdvar -u
     46 .Dl 4
     47 .Sh SEE ALSO
     48 .Xr max 1 ,
     49 .Xr mean 1 ,
     50 .Xr min 1 ,
     51 .Xr stddev 1 ,
     52 .Xr sum 1
     53 .Sh AUTHORS
     54 .An Anders Damsgaard Aq Mt anders@adamsgaard.dk