I would like to write a script to extend this command to a general case:
BEGIN {s_0=0;n_0=0}{n_0++;s_0+=($51-$1)^2}END {print sqrt(s_0/n_0)}
i.e. so that
BEGIN {s_0=0;n_0=0}{n_0++;s_0+=($51-$1)^2}END {print sqrt(s_0/n_0)}
BEGIN {s_1=0;n_1=0}{n_1++;s_1+=($51-$2)^2}END {print sqrt(s_1/n_1)}
BEGIN {s_2=0;n_2=0}{n_2++;s_2+=($51-$3)^2}END {print sqrt(s_2/n_2)}
...
BEGIN {s_50=0;n_50=0}{n_50++;s_50+=($51-$51)^2}END {print sqrt(s_50/n_50)}
I already have a script that could loop over the variable s and n,
any ideas?