standardized difference calculation