xref: /freebsd/usr.bin/ministat/ministat.1 (revision e8d8bef961a50d4dc22501cde4fb9fb0be1b2532)
1.\"
2.\" Copyright (c) 2007 Poul-Henning Kamp
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
28.Dd November 10, 2012
29.Dt MINISTAT 1
30.Os
31.Sh NAME
32.Nm ministat
33.Nd statistics utility
34.Sh SYNOPSIS
35.Nm
36.Op Fl Ans
37.Op Fl C Ar column
38.Op Fl c Ar confidence_level
39.Op Fl d Ar delimiter
40.Op Fl w Op width
41.Op Ar
42.Sh DESCRIPTION
43The
44.Nm
45command calculates fundamental statistical properties of numeric data
46in the specified files or, if no file is specified, standard input.
47.Pp
48The options are as follows:
49.Bl -tag -width Fl
50.It Fl A
51Just report the statistics of the input and relative comparisons,
52suppress the ASCII-art plot.
53.It Fl n
54Just report the raw statistics of the input, suppress the ASCII-art plot
55and the relative comparisons.
56.It Fl s
57Print the average/median/stddev bars on separate lines in the ASCII-art
58plot, to avoid overlap.
59.It Fl C Ar column
60Specify which column of data to use.
61By default the first column in the input file(s) are used.
62.It Fl c Ar confidence_level
63Specify desired confidence level for Student's T analysis.
64Possible values are 80, 90, 95, 98, 99 and 99.5 %
65.It Fl d Ar delimiter
66Specifies the column delimiter characters, default is SPACE and TAB.
67See
68.Xr strtok 3
69for details.
70.It Fl w Ar width
71Width of ASCII-art plot in characters.
72The default is the terminal width, or 74 if standard output is not a
73terminal.
74.El
75.Pp
76A sample output could look like this:
77.Bd -literal -offset indent
78  $ ministat -s -w 60 iguana chameleon
79  x iguana
80  + chameleon
81  +------------------------------------------------------------+
82  |x      *  x            *      +              + x           +|
83  | |________M______A_______________|                          |
84  |             |________________M__A___________________|      |
85  +------------------------------------------------------------+
86      N        Min        Max     Median        Avg       Stddev
87  x   7         50        750        200        300    238.04761
88  +   5        150        930        500        540    299.08193
89  No difference proven at 95.0% confidence
90.Ed
91.Pp
92If
93.Nm
94tells you, as in the example above, that there is no difference
95proven at 95% confidence, the two data sets you gave it are for
96all statistical purposes identical.
97.Pp
98You have the option of lowering your standards by specifying a
99lower confidence level:
100.Bd -literal -offset indent
101  $ ministat -s -w 60 -c 80 iguana chameleon
102  x iguana
103  + chameleon
104  +------------------------------------------------------------+
105  |x      *  x            *      +              + x           +|
106  | |________M______A_______________|                          |
107  |             |________________M__A___________________|      |
108  +------------------------------------------------------------+
109      N        Min        Max     Median        Avg       Stddev
110  x   7         50        750        200        300    238.04761
111  +   5        150        930        500        540    299.08193
112  Difference at 80.0% confidence
113        240 +/- 212.215
114        80% +/- 70.7384%
115        (Student's t, pooled s = 264.159)
116.Ed
117.Pp
118But a lower standard does not make your data any better, and the
119example is only included here to show the format of the output when
120a statistical difference is proven according to Student's T method.
121.Sh SEE ALSO
122Any mathematics text on basic statistics, for instances Larry Gonicks
123excellent "Cartoon Guide to Statistics" which supplied the above example.
124.Sh HISTORY
125The
126.Nm
127command was written by Poul-Henning Kamp out of frustration
128over all the bogus benchmark claims made by people with no
129understanding of the importance of uncertainty and statistics.
130.Pp
131From
132.Fx 5.2
133it has lived in the source tree as a developer tool, graduating
134to the installed system from
135.Fx 8.0 .
136