Coding (Statistics)

Coding in Statistics



In Statistics, coding refers to applying a fixed transformation to the values in a data set. The most common transformation is a linear one of the form:

xax+b x \mapsto a x + b

for some constants aa and bb.


  1. Changing units. For example, if the data is temperature and was originally recorded as Fahrenheit then to adjust it to Centigrade we apply the coding c=59(f32)c = \frac{5}{9} (f - 32).

  2. Simplifying numbers. For example, population might be measured in thousands so is coded as x/1000x/1000.