summaryrefslogtreecommitdiff
path: root/static/freebsd/man1/ministat.1
blob: 437fd66a1ddc6836debd275e726d3a5363f3536d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
.\"
.\" Copyright (c) 2007 Poul-Henning Kamp. All rights reserved.
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd November 13, 2025
.Dt MINISTAT 1
.Os
.Sh NAME
.Nm ministat
.Nd statistics utility
.Sh SYNOPSIS
.Nm
.Op Fl Anqs
.Op Fl C Ar column
.Op Fl c Ar confidence
.Op Fl d Ar delimiters
.Op Fl w Ar width
.Op Ar
.Sh DESCRIPTION
The
.Nm
command calculates fundamental statistical properties of numeric data
in the specified files or, if no file is specified, standard input.
.Pp
The options are as follows:
.Bl -tag -width "-c confidence"
.It Fl A
Just report the statistics of the input and relative comparisons,
suppress the ASCII-art plot.
.It Fl C Ar column
Specify which column of data to use.
By default the first column in the input file(s) is used.
.It Fl c Ar confidence
Specify desired confidence level for Student's T analysis.
Possible percent values are
.Cm 80 , 90 , 95 , 98 , 99 ,
and
.Cm 99.5 .
.It Fl d Ar delimiters
Specify the column delimiter characters, default is
.Ql \ \et
.Pq i.e., a space and a tab .
See
.Xr strtok 3
for details.
.It Fl n
Just report the raw statistics of the input, suppress the ASCII-art plot
and the relative comparisons.
.It Fl q
Suppress printing of summary statistics and data-set names; typically for use
alongside
.Fl n .
.It Fl s
Print the average/median/stddev bars on separate lines in the ASCII-art
plot, to avoid overlap.
.It Fl w Ar width
Set the width of the ASCII-art plot in characters.
The default is the terminal width, or 74 if standard output is not a
terminal.
.El
.Pp
.Nm
accepts up to seven input files.
.Pp
Each dataset must contain at least three values.
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
Let's consider two input files.
The first one will be
.Dq iguana :
.Bd -literal -offset indent
50
200
150
400
750
400
150
.Ed
.Pp
The second one will be
.Dq chameleon :
.Bd -literal -offset indent
150
400
720
500
930
.Ed
.Pp
A sample output could look like this:
.Bd -literal -offset indent
$ ministat -s -w 60 iguana chameleon
x iguana
+ chameleon
+------------------------------------------------------------+
|x      *  x            *      +              + x           +|
| |________M______A_______________|                          |
|             |________________M__A___________________|      |
+------------------------------------------------------------+
    N        Min        Max     Median        Avg       Stddev
x   7         50        750        200        300    238.04761
+   5        150        930        500        540    299.08193
No difference proven at 95.0% confidence
.Ed
.Pp
If
.Nm
tells you, as in the example above, that there is no difference
proven at 95% confidence, the two datasets you gave it are for
all statistical purposes identical.
.Pp
You have the option of lowering your standards by specifying a
lower confidence level:
.Bd -literal -offset indent
$ ministat -s -w 60 -c 80 iguana chameleon
x iguana
+ chameleon
+------------------------------------------------------------+
|x      *  x            *      +              + x           +|
| |________M______A_______________|                          |
|             |________________M__A___________________|      |
+------------------------------------------------------------+
    N        Min        Max     Median        Avg       Stddev
x   7         50        750        200        300    238.04761
+   5        150        930        500        540    299.08193
Difference at 80.0% confidence
      240 +/- 212.215
      80% +/- 70.7384%
      (Student's t, pooled s = 264.159)
.Ed
.Pp
But a lower standard does not make your data any better, and the
example is only included here to show the format of the output when
a statistical difference is proven according to Student's T method.
.Sh SEE ALSO
Any mathematics text on basic statistics, for instance the following book,
which supplied the above example:
.Rs
.%A Larry Gonick
.%A Woollcott Smith
.%B The Cartoon Guide to Statistics
.%D 1993
.%I HarperPerennial
.%O ISBN 0-06-273102-5
.Re
.Sh HISTORY
The
.Nm
command was written by
.An Poul-Henning Kamp
out of frustration
over all the bogus benchmark claims made by people with no
understanding of the importance of uncertainty and statistics.
.Pp
From
.Fx 5.2
it has lived in the source tree as a developer tool, graduating
to the installed system from
.Fx 8.0 .