Assume that there are five rows with the IDs A, B, C, D and E, each row containing n different variables (columns). We use record E as an example in the calculations below. The remaining rows are normalized in the same way.
The normalized value of ei for row E in the ith column is calculated as:
where
If all values for row E are identical—so the standard deviation of E (std(E)) is equal to zero—then all values for row E are set to zero.
See also: