Coding is transforming each data value into a new set of data values, so that statistical calculations can be simplified.
Coding formula
You will usually use the following formula for coding:
y=bx−a
y
Coded value
x
Data value
a,b
Chosen/given constants
Mean
The mean of the coded data is given by:
y=bx−a
Standard deviation
The standard deviation of the coded data can be calculated with the formula:
σy=bσx
Note: You will most likely be asked to find the statistics of the original data, given the statistics for the coded data. This way, the previous formulas can be simplified into:
x=by+a
σx=bσy
Example 1
The average temperature x of a city was measured every day for 30 days. The data was coded using the formula y=4x−3. Given that y=3.6ºC and that Syy=51.8, find the average daily temperature and the standard deviation for the data collected.
Start by finding the mean:
y=4x−3⇔x=4y+3⇔x=4×3.6+3=17.4ºC
Find the standard deviation for the coded value:
σy=nSyy=3051.8=1.31ºC
σx=bσy⇔σx=4×1.31=5.24ºC
Read more
Learn with Basics
Learn the basics with theory units and practise what you learned with exercise sets!
Length:
Unit 1
Coding
Final Test
Test reviewing all units to claim a reward planet.
Create an account to complete the exercises
FAQs - Frequently Asked Questions
How can the mean of a data set be found based on the coded mean?
By multiplying the coded mean by 'b' (a constant) and adding 'a'.
Can the standard deviation of a coded value be found?
Yes.
What is coding?
It is transforming each data value in a set into a new one, to simplify statistical calculations.