|
Search Forums:
|
|||||||
| Forums | Register | Forum Rules | Linux and Unix Links | Man Pages | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Calculate the Median, first quartile and third quartile using AWK
Hi all,
I have a data range as follow: 28 33 42 12 9 68 81 55 6 47 Since I want to create Box & Whisker Plot, I need to calculate the median, first quartile and third quartile of above data using AWK.( so far I can only writing a code for determine smallest value & largest value using AWK) Anyone can help me...Please.. ![]() Thanks |
| Sponsored Links | |
|
|
|
#2
|
|||
|
|||
|
unix calculator
Hi,
I would like to know how can I calculate mean, median and standard deviation of some numbers in a file. Example file: a 102 abc b 301 adc c 222 adc I would like to calculate the mean, median and standard deviation of the numbers in the 2nd column of the example file. Thanks in advance |
| Sponsored Links | ||
|
|
|
#3
|
||||
|
||||
|
Maybe you should use awk instead of calculator to get the results. It would be much easier to grab the 2nd field an do the math on those.
|
|
#4
|
||||
|
||||
|
this will find the mean of numbers Code:
awk '{mean += $2}END{print "mean ="mean/NR}' filenameLast edited by otheus; 01-30-2009 at 04:25 AM.. Reason: Corrected equation for mean |
| Sponsored Links | |
|
![]() |
| Tags |
| average, median, statistical calculator |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How To Calculate | krishna_sicsr | Shell Programming and Scripting | 3 | 03-21-2009 12:49 PM |
| calculate the space | za_7565 | Shell Programming and Scripting | 8 | 05-04-2008 07:22 AM |
| calculate time | itik | AIX | 2 | 02-15-2008 01:08 AM |
| calculate from three files | koti_rama | Shell Programming and Scripting | 5 | 01-08-2008 08:27 AM |
| How to calculate with awk | whatisthis | Shell Programming and Scripting | 4 | 11-09-2005 11:39 AM |
|
|