how to obtain error in slope