Sponsored Content
Full Discussion: Help with Median
Top Forums UNIX for Dummies Questions & Answers Help with Median Post 302334713 by zajtat on Thursday 16th of July 2009 09:14:33 AM
Old 07-16-2009
Unofrtunately, I'm new to Unix and don't know how the head and tail can calculate the median, but I thought that the dollar sign is a trick. This is why I asked the question in the first place.
Does anyone know how to calculate the mean, then?

---------- Post updated at 08:14 AM ---------- Previous update was at 08:10 AM ----------

sorry, I meant how to calculate the median
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk to median

hi! i have a file like the attachement. you can see on the last column, there is a marker from 1 to 64 for each time. I'd like to have the median for each marker: i want to get a median every 128 values the result is : for an hour and marker x, i have the median value thank you for... (5 Replies)
Discussion started by: riderman
5 Replies

2. Shell Programming and Scripting

Compute the median of a set of numbers with AWK?

Is there a way in awk to compute the median of a set of numbers in a file in the following format. 34 67 78 100 23 45 67 (3 Replies)
Discussion started by: Lucky Ali
3 Replies

3. Shell Programming and Scripting

Awk based script to find the median of all individual columns in a data file

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)
Discussion started by: ks_reddy
5 Replies

4. Shell Programming and Scripting

Median and max of duplicate rows

Hi all, plz help me with this, I want to to extract the duplicate rows (column 1) in a file which at least repeat 4 times. then I want to summarize them by getting the max , mean, median and min. The file is sorted by column 1, all the repeated rows appear together. If number of elements is... (5 Replies)
Discussion started by: ritakadm
5 Replies

5. UNIX for Dummies Questions & Answers

Median calculator based on id match

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... (9 Replies)
Discussion started by: verse123
9 Replies

6. Shell Programming and Scripting

How to print median values of matrix -awk?

I use the following script to print the sum and how could I extend this to print medians instead? thanks name s1 s2 s3 s4 g1 2 8 6 5 g1 5 7 9 9 g1 6 7 8 9 g2 8 8 8 8 g2 7 7 7 7 g2 10 10 10 10 g3 3 12 1 24 g3 5 5 24 48 g3 12 3 12 12 g3 2 3 3 3 output name s1 s2 s3 s4 g1 5 7 8 9... (5 Replies)
Discussion started by: quincyjones
5 Replies
..::lib::Smokeping::matchers::Median(3) 			     SmokePing				   ..::lib::Smokeping::matchers::Median(3)

NAME
Smokeping::matchers::Median - Find persistant changes in latency OVERVIEW
The idea behind this matcher is to find sustained changes in latency. The median matcher takes a number of past median latencies. It splits the latencies into two groups (old and new) and again finds the median for each groups. If the difference between the two medians is bigger than a certain value, it will give a match. DESCRIPTION
Call the matcher with the following sequence: type = matcher pattern = Median(old=>x,new=>y,diff=>z) This will create a matcher which consumes x+y latency-datapoints, builds the two medians and the matches if the difference between the median latency is larger than z seconds. COPYRIGHT
Copyright (c) 2004 by OETIKER+PARTNER AG. All rights reserved. LICENSE
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. AUTHOR
Tobias Oetiker <tobi@oetiker.ch> 2.6.8 2012-02-26 ..::lib::Smokeping::matchers::Median(3)
All times are GMT -4. The time now is 05:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy