I am trying to calculate the median of a column of numbers if they match an ID type on a different column. The input file has 3 columns. The column that has the ID is column 1 and the column with the values I'd like to find the median for is column 3. The file does not need to be sorted.
What I have so far is this:
the input looks like this :
the output should look like this:
Moderator's Comments:
Please use CODE tags (not QUOTE tags) to mark input and output samples as well as code samples.
Last edited by Don Cragun; 03-19-2014 at 05:12 PM..
Reason: Change QUOTE tags to CODE tags.
Hi ,
I have a requirement to split the record based on particular match using UNIX.
Case1:
Input Record :
10.44.48.63;"Personals/Dating;sports";1441
Output Records :
10.44.48.63;Personals/Dating;1441;Original
10.44.48.63;sports;1441;Dummy
Case2:
Input Record : ... (5 Replies)
Hi All,
I have some data like below.
Step1,Param1,Param2,Param3
1,2,3,4
2,3,4,5
2,4,5,6
3,0,1,2
3,0,0,0
3,2,1,3
........
so on
Where I need to find the median(arithmetic) of each column from Param1...to..Param3 for each set of Step1 values.
(Sort each specific column, if the... (5 Replies)
I have input file like this
update tablename set column1='ABC',column2='BBC' where columnx=1 and columny=100 and columnz='10000001'
update tablename set column1='ABC',column2='BBC',column3='CBC' where columnx=1 and columny=100 and columnz='10000002'
update tablename set column1='ABC' where... (1 Reply)
Trying to match $2 in original_targets with $2 of new_targets . If the two numbers match exactly then a match.txt file is outputted using the information in the new_targets in the beginning 4 fields $1, $2, $3, $4 and value of $4 in the original_targets . If there is "No Match" then a no... (2 Replies)
Trying to match $1 of target.txt to $5 of file.txt. If there is a match then in an output.txt file $1,$1 (row underneath),$6,$4,$7 from file.txt are printed on the same line as $1 of target.txt. The input is from excel and the output should be tab-deliminated. Thank you :).
target.txt... (2 Replies)
I am trying to merge two lines to one based on some matching condition.
The file is as follows:
Matches filter:
'request ', timestamp, <HTTPFlow
request=<GET:
Matches filter:
'request ', timestamp, <HTTPFlow
request=<GET:
Matches filter:
'request ', timestamp, <HTTPFlow
... (8 Replies)
I am trying to create a cronjob that will run on startup that will look at a list.txt file to see if there is a later version of a database using database.txt as the source. The matching lines are written to output.
$1 in database.txt will be in list.txt as a partial match. $2 of database.txt... (2 Replies)
Hi,
i have 2 files , the data i need to match is in masterfile and i need to pull out column 3 from master if column 1 and 2 match and output entire row to new file
I have tried with join and awk and i keep getting blank outputs or same file
is there an easier way than what i am... (4 Replies)
Discussion started by: axis88
4 Replies
LEARN ABOUT DEBIAN
ministat
MINISTAT(1) BSD General Commands Manual MINISTAT(1)NAME
ministat -- statistics utility
SYNOPSIS
ministat [-ns] [-C column] [-c confidence_level] [-d delimiter] [-w [width]] [file ...]
DESCRIPTION
The ministat command calculates fundamental statistical properties of numeric data in the specified files or, if no file is specified, stan-
dard input.
The options are as follows:
-n Just report the raw statistics of the input, suppress the ASCII-art plot and the relative comparisons.
-s Print the average/median/stddev bars on separate lines in the ASCII-art plot, to avoid overlap.
-C column Specify which column of data to use. By default the first column in the input file(s) are used.
-c confidence_level
Specify desired confidence level for Student's T analysis. Possible values are 80, 90, 95, 98, 99 and 99.5 %
-d delimiter
Specifies the column delimiter characters, default is SPACE and TAB. See strtok(3) for details.
-w width Width of ASCII-art plot in characters, default is 74.
A sample output could look like this:
$ 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
If ministat tells you, as in the example above, that there is no difference proven at 95% confidence, the two data sets you gave it are for
all statistical purposes identical.
You have the option of lowering your standards by specifying a lower confidence level:
$ 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)
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 sta-
tistical difference is proven according to Student's T method.
SEE ALSO
Any mathematics text on basic statistics, for instances Larry Gonicks excellent "Cartoon Guide to Statistics" which supplied the above exam-
ple.
HISTORY
The ministat command was written by Poul-Henning Kamp out of frustration over all the bogus benchmark claims made by people with no under-
standing of the importance of uncertainty and statistics.
From FreeBSD 5.2 it has lived in the source tree as a developer tool, graduating to the installed system from FreeBSD 8.0.
BSD June 28, 2010 BSD