this code below is very useful in calculating mean and quartiles. however, i would really like to translate it to awk without having to write to any external file:
i only want a awk solution. i found the bash script posted in this thread online when i was looking for a solution on how to identify outliers in a range of numbers, which i posted above.
i figured the logic is there in that bash script, i just need to translate that to awk.
It could certainly be reworked in to better shell scripting to not need an intermediate file.
Reworking it in just plain awk is difficult since awk doesn't have it's own sort function.
How about this?
From what I read about quartiles, this should be expanded to take the average of two values if the quarter falls between two. For this data set the answers match.