Mean value and standard deviation of a column using awk
In order to get the mean value of column 1 (or any other) you type: $ awk ‘BEGIN{s=0;}{s=s+$1;}END{print s/NR;}’ file In order to get the standard deviation of column 1 you type: $ awk ‘{sum+=$1; sumsq+=$1*$1} END {print sqrt(sumsq/NR – (sum/NR)^2)}’ file or $ awk ‘{delta = $1 – avg; …