#!/usr/bin/awk -f

{ xSum += $1; xSquaredSum += $1 * $1; xySum += $1 * $2; ySum += $2; ySquaredSum += $2 * $2 }
END { print (xySum - xSum * ySum / NR) / sqrt((xSquaredSum - xSum * xSum / NR) * (ySquaredSum - ySum * ySum / NR)) }