Computes signal to noise ratio.