Calculating normalized z-scores with a transformation