Maths4UBETA

Coded data, scale changes and unknown observations

Undo a coding in the correct direction and use separate moment equations to recover missing information.

Try the quick check →
Lesson 2 of 5

Section 1 of 5 · Core · about 7 min

What does subtracting an origin change?

Coding applies one rule to every numerical observation, often making large values easier to calculate with. The mean describes location. Standard deviation describes spread, and variance is the square of standard deviation.

When coded records or totals are supplied, calculate their summaries first. Descriptive variance is the mean squared distance from the mean, and uses divisor nn:

uˉ=∑un,σu2=∑u2n−uˉ 2,σu=σu2.\bar{u}=\frac{\sum u}{n},\qquad\sigma_u^2=\frac{\sum u^2}{n}-\bar{u}^{\,2},\qquad\sigma_u=\sqrt{\sigma_u^2}.

Here ∑u2\sum u^2 means square each coded value before adding.

Worked example

Translate the data without changing its spread

Five numerical heights xx, in centimetres, are 44,45,46,47,4844,45,46,47,48. Code them using u=x−45u=x-45. Calculate the coded mean and descriptive standard deviation, then restore the original total, mean and standard deviation.

  1. u:−1,0,1,2,3,∑u=5,uˉ=55=1.u:\quad-1,0,1,2,3,\qquad\sum u=5,\qquad\bar{u}=\frac{5}{5}=1.
  2. ∑u2=(−1)2+02+12+22+32=15.\sum u^2=(-1)^2+0^2+1^2+2^2+3^2=15.σu2=155−12=2,σu=2.\sigma_u^2=\frac{15}{5}-1^2=2,\qquad\sigma_u=\sqrt{2}.
  3. The inverse rule is x=45+ux=45+u. Add the origin once for every record:

    ∑x=5(45)+5=230 cm.\sum x=5(45)+5=230\,\mathrm{cm}.
  4. xˉ=45+1=46 cm.\bar{x}=45+1=46\,\mathrm{cm}.
  5. Every pairwise difference is unchanged by adding 4545, so

    σx=σu=2 cm.\sigma_x=\sigma_u=\sqrt{2}\,\mathrm{cm}.

    The chosen origin 4545 is not the original mean 4646.

Your turn

Seven numerical heights xx, measured in centimetres, are coded by u=x−30u=x-30. The coded sum is ∑u=−21\sum u=-21, and the coded standard deviation is 33. Find the original total, mean and standard deviation.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Section 2 of 5 · Core · about 8 min

How do I undo a change of scale?

A general code subtracts an origin and divides by a nonzero scale. Reverse it before deciding whether to multiply or divide a summary:

u=x−ab⟺x=a+bu,b≠0.u=\frac{x-a}{b}\quad\Longleftrightarrow\quad x=a+bu,\qquad b\ne0.

The translation yields values 44 to 48. A positive scale of four yields 41, 45, 49, 53 and 57. A negative scale of four yields 33, 37, 41, 45 and 49 in increasing order.

Decoding ruleMean (cm)Variance (cm²)SD (cm)
x=45+ux=45+u4622\sqrt2
x=45+4ux=45+4u4932424\sqrt2
x=45−4ux=45-4u4132424\sqrt2

The five codes are −1,0,1,2,3-1,0,1,2,3 with mean 11 and variance 22. A negative scale reverses the order of the decoded records. Reorder before reading positions.

Translation moves every value equally. With x=45+4ux=45+4u, the coded mean 11 becomes 4949, while coded SD 2\sqrt{2} becomes 424\sqrt{2}. A negative scale reverses order but keeps spread nonnegative.

Worked example

Reverse a code with a positive scale

A different set of numerical heights xx, in centimetres, is coded by

u=x−454.u=\frac{x-45}{4}.

The coded observations are −1,0,1,2,3-1,0,1,2,3, with mean 11, variance 22 and SD 2\sqrt{2}. Find the original observations, mean, variance and SD.

  1. 4u=x−45⟹x=45+4u.4u=x-45\Longrightarrow x=45+4u.
  2. x:41,45,49,53,57.x:\quad41,45,49,53,57.
  3. xˉ=45+4(1)=49 cm.\bar{x}=45+4(1)=49\,\mathrm{cm}.
  4. σx2=42(2)=32 cm2,σx=42 cm.\sigma_x^2=4^2(2)=32\,\mathrm{cm}^2,\qquad\sigma_x=4\sqrt{2}\,\mathrm{cm}.

    The shift changes location; the scale multiplies distances from the mean.

Your turn

Numerical masses xx, in grams, are coded by

u=x−1003.u=\frac{x-100}{3}.

The coded mean is −2-2 and coded standard deviation is 52\frac{5}{2}. Find the original mean, variance and standard deviation.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

Section 3 of 5 · Core · about 8 min

What changes when the multiplier is negative?

For x=a+bux=a+bu with b<0b<0, a larger coded value gives a smaller original value. Decode each observation and reorder before using ranked positions. The mean follows the signed multiplier; SD follows its absolute value.

Worked example

Decode a negative scale and restore the order

Five coded numerical heights are −1,0,1,2,3-1,0,1,2,3, with coded mean 11 and SD 2\sqrt{2}. The coding rule is

u=45−x4,u=\frac{45-x}{4},

where xx is the numerical height in centimetres. Find the original values in increasing order, the mean and the SD.

  1. 4u=45−x⟹x=45−4u.4u=45-x\Longrightarrow x=45-4u.
  2. Following the coded values in their given order gives

    49,45,41,37,33.49,45,41,37,33.

    The negative multiplier reverses the order. The increasing original list is

    33,37,41,45,49.33,37,41,45,49.
  3. xˉ=45−4(1)=41 cm.\bar{x}=45-4(1)=41\,\mathrm{cm}.
  4. σx=∣−4∣2=42 cm.\sigma_x=|-4|\sqrt{2}=4\sqrt{2}\,\mathrm{cm}.

    Its variance is 32 cm232\,\mathrm{cm}^2. A standard deviation cannot become negative because the code reverses order.

Your turn

Original and coded numerical observations are related by x=a+bux=a+bu, where b≠0b\ne0. Their summaries are

uˉ=2,σu=3,xˉ=10,σx=6.\bar{u}=2,\quad\sigma_u=3,\qquad\bar{x}=10,\quad\sigma_x=6.

Find every ordered pair (a,b)(a,b). No sign restriction on bb is given.

Enter each pair in the order shown. Separate complete pairs with commas or semicolons.

Section 4 of 5 · Core · about 7 min

How can two coded totals reveal the count?

Two different origins can give independent equations for the same count and raw total. The summaries must describe the same observations.

Worked example

Use two origins to recover the same sample size

The same dataset of numerical heights xx, in centimetres, gives

∑(x−20)=84,∑(x−23)=60.\sum(x-20)=84,\qquad\sum(x-23)=60.

Find its number of observations and original mean.

  1. Write the two equations using the same raw total TT and count nn:

    T−20n=84,T−23n=60.T-20n=84,\qquad T-23n=60.
  2. Subtract the second equation from the first:

    3n=24⟹n=8.3n=24\Longrightarrow n=8.
  3. T=84+20(8)=244 cm,xˉ=2448=612 cm.T=84+20(8)=244\,\mathrm{cm},\qquad\bar{x}=\frac{244}{8}=\frac{61}{2}\,\mathrm{cm}.
  4. The count is a positive integer, and the second equation checks:

    244−23(8)=60.244-23(8)=60.

    These two first-moment totals determine the count and mean, but do not determine the standard deviation.

Your turn

The same numerical heights xx, in centimetres, satisfy

∑(x−8)=63,∑(x−13)=28.\sum(x-8)=63,\qquad\sum(x-13)=28.

Find the number of observations and their mean. A separate proposed dataset instead has the two totals 6262 and 2828 at those same origins. Could that second proposal describe a dataset?

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Feasibility of the separate proposal

Identical origins do not provide a new count equation: matching totals repeat the same information, while different totals are inconsistent. First-moment totals alone generally leave spread undetermined.

Section 5 of 5 · Further applications · about 12 min

How can two totals recover missing observations?

Exam application: use two separate totals: the sum of values and the sum of their squares. The variation chapter develops variance in detail; here its descriptive formula supports coded-total problems, using divisor nn. For coded summaries Su=∑uiS_u=\sum u_i and Qu=∑ui2Q_u=\sum u_i^2,

uˉ=Sun,σu2=Qun−(Sun)2.\bar{u}=\frac{S_u}{n},\qquad\sigma_u^2=\frac{Q_u}{n}-\left(\frac{S_u}{n}\right)^2.

For any real dataset with n>0n>0, a necessary check is Qu≥Su2nQ_u\ge\frac{S_u^2}{n}. A negative variance is impossible. For a single observation, variance must be zero.

Five coded observations have ∑u=5\sum u=5 and ∑u2=15\sum u^2=15. Decode using x=45+4ux=45+4u.

∑x=5(45)+4(5)=245,xˉ=2455=49 cm.\sum x=5(45)+4(5)=245,\qquad \bar x=\frac{245}{5}=49\,\mathrm{cm}.x2=(45+4u)2=452+2(45)(4)u+42u2.x^2=(45+4u)^2=45^2+2(45)(4)u+4^2u^2.
ContributionWorkingTotal
Constant5(45)25(45)^210125
Cross term2(45)(4)(5)2(45)(4)(5)1800
Squared codes42(15)4^2(15)240
∑x2=10125+1800+240=12165.\sum x^2=10125+1800+240=12165.σx2=121655−492=32 cm2,σx=42 cm.\sigma_x^2=\frac{12165}{5}-49^2=32\,\mathrm{cm}^2,\qquad\sigma_x=4\sqrt2\,\mathrm{cm}.

Square the individual observations before summing. The square of their total is 2452=60025245^2=60025.

With n=5n=5, ∑u=5\sum u=5, ∑u2=15\sum u^2=15 and x=45+4ux=45+4u, the original totals are ∑x=245\sum x=245 and ∑x2=12165\sum x^2=12165. They give mean 4949 and variance 3232.

Subtract the known records from both raw totals. If the remaining observations satisfy p+q=Tp+q=T and p2+q2=Rp^2+q^2=R, then

pq=T2−R2,z2−Tz+pq=0.pq=\frac{T^2-R}{2},\qquad z^2-Tz+pq=0.

The quadratic gives the two values. Keep both labelled assignments unless an order or other restriction selects one. The check

(p−q)2=2R−T2≥0(p-q)^2=2R-T^2\ge0

is necessary for real values. Equality allows two equal observations unless the question forbids them. A sum alone usually does not determine both observations.

Worked example

Application: use both moments, then keep every permitted pair

Application: five numerical observations are 2,6,10,p,q2,6,10,p,q. Their mean is 88, and their descriptive variance, using divisor 55, is 1414. Find every labelled pair (p,q)(p,q). Then state the answer if the extra condition p<qp<q is imposed.

  1. ∑x=5(8)=40,∑x2=5(14+82)=390.\sum x=5(8)=40,\qquad\sum x^2=5(14+8^2)=390.
  2. Subtract the known contributions from each total separately:

    p+q=40−(2+6+10)=22,p+q=40-(2+6+10)=22,p2+q2=390−(22+62+102)=250.p^2+q^2=390-(2^2+6^2+10^2)=250.
  3. (p+q)2=p2+q2+2pq⟹pq=222−2502=117.(p+q)^2=p^2+q^2+2pq\Longrightarrow pq=\frac{22^2-250}{2}=117.
  4. The two missing values are roots of

    z2−22z+117=(z−9)(z−13)=0.z^2-22z+117=(z-9)(z-13)=0.

    Without an order condition, retain

    (p,q)=(9,13) or (13,9).(p,q)=(9,13)\text{ or }(13,9).
  5. Both labelled pairs give total 4040 and sum of squares 390390, hence

    xˉ=8,σx2=3905−82=14.\bar{x}=8,\qquad\sigma_x^2=\frac{390}{5}-8^2=14.
  6. If p<qp<q is imposed, only (9,13)(9,13) is permitted. Two moments can determine two values without determining which label receives which one.

Your turn

Application: four numerical observations are 3,8,p,q3,8,p,q. Their mean is 77, and their descriptive variance, using divisor 44, is 232\frac{23}{2}. Find p+qp+q and every ordered pair (p,q)(p,q). No order between the labelled records is stated. If the variance had not been supplied, would the mean alone determine the pair?

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter each pair in the order shown. Separate complete pairs with commas or semicolons.

What would the mean alone determine?

Worked examples

Translation, totals and spread

Write the inverse before using summaries

Reversed order and both scale signs

Two origins for the same observations

Sum and sum of squares

Practise the method

Core practice

Question 1 of 4

0 / 4 checked in this collection

Question list

Core practice

Fresh variants

Exam-style

Undo an origin shift

3 marks

For u=x−30u=x-30, n=10, ∑u=20\sum u=20, ∑u2=80\sum u^2=80. Give the original mean, population SD and original sum.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Full answer-format guide

Exact numbers: 3/2, sqrt(5), 2-sqrt(3), pi/6, 3*pi/2. Sets: {1,4}. Intervals: (3,5]; a round bracket excludes the endpoint. Infinity: inf; union: U; no solutions: empty. Separate coordinate pairs or triples with semicolons. Expressions: 2x^2+3x-1; equations: x^2=3x+1 or the polynomial equal to zero. Factors: x-1 ; x+2. Parameter fraction: numerator ; denominator. List integer answers individually.

Review the method

Progress stays in this browser. Create an account to save it or sign in.

Extra practice from this lesson

Undo a translation

Twelve masses xx, measured in grams, are coded by u=x−75u=x-75. The summaries are ∑u=−18\sum u=-18 and ∑u2=99\sum u^2=99. Find the original mean, original total and descriptive standard deviation.

Enter an exact value or round to 3 significant figures.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact value or round to 3 significant figures.

Decode a scale and reconstruct a square-sum

Six lengths xx, in centimetres, are coded by u=x−184u=\frac{x-18}{4}. Given ∑u=9\sum u=9 and ∑u2=25\sum u^2=25, find the original mean, variance and sum of squares. Use descriptive variance with divisor 66.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact value or round to 3 significant figures.

Enter an exact number, for example 3/2 or 2-sqrt(3).

A negative code still gives a positive SD

Eight observations satisfy v=30−2xv=30-2x, with ∑v=40\sum v=40 and ∑v2=232\sum v^2=232. Find the mean and descriptive standard deviation of xx.

Enter an exact value or round to 3 significant figures.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Recover the count from two origins

The same nn observations satisfy

∑(x−12)=56,∑(x−19)=−28.\sum(x-12)=56,\qquad\sum(x-19)=-28.

Find nn, the original total and the exact mean.

Enter the value on its own or write n = … . Fractions and exact square roots are accepted.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Separate impossible information from insufficient information

Report A claims n=5n=5, ∑u=15\sum u=15 and ∑u2=40\sum u^2=40 for real observations. Report B gives only p+q=10p+q=10 for two unknown positive observations. Classify each report.

Report A
Report B

Apply it · original exam-style problems

Show your working on paper and compare it with the worked solution and marking guidance.

Start after this lesson

Recover two missing original measurements 8 marks

Six lengths xx, in centimetres, are coded by u=x−102u=\frac{x-10}{2}. The summaries are ∑u=−6\sum u=-6 and ∑u2=16\sum u^2=16. Four lengths are 4,6,9,114,6,9,11; the other two are aa and bb, where a<ba<b. Find the original total, original sum of squares, both missing lengths and the descriptive standard deviation.

Hint

Use x=10+2ux=10+2u to recover both moments. Subtract the contributions of the four known observations, then solve for the missing pair.

Worked solution
  1. ∑x=6(10)+2(−6)=48 cm.\sum x=6(10)+2(-6)=48\ \text{cm}.
  2. ∑x2=6(100)+40(−6)+4(16)=424 cm2.\sum x^2=6(100)+40(-6)+4(16)=424\ \text{cm}^{2}.
  3. a+b=48−(4+6+9+11)=18,a+b=48-(4+6+9+11)=18,
  4. a2+b2=424−(16+36+81+121)=170.a^2+b^2=424-(16+36+81+121)=170.
  5. 2ab=(a+b)2−(a2+b2)=324−170=154,ab=77.2ab=(a+b)^2-(a^2+b^2)=324-170=154,\quad ab=77.
  6. t2−18t+77=(t−7)(t−11)=0.t^2-18t+77=(t-7)(t-11)=0.
  7. Since a<ba<b, a=7a=7 cm and b=11b=11 cm. A missing observation may equal a known observation; there is no distinctness restriction.

  8. xˉ=8,σx=4246−64=2153 cm.\bar{x}=8,\qquad\sigma_x=\sqrt{\frac{424}{6}-64}=\frac{2\sqrt{15}}{3}\ \text{cm}.
  9. Substitution of all six values into the original code gives ∑u=−6\sum u=-6 and ∑u2=16\sum u^2=16, so both conditions are restored.

Marking guidance
  • 1 mark: invert the coding and recover the original total.
  • 1 mark: expand the square correctly and recover the original square-sum.
  • 1 mark: obtain the sum of the missing values.
  • 1 mark: obtain the sum of their squares.
  • 1 mark: derive their product or an equivalent quadratic.
  • 1 mark: solve and apply the requested ordering.
  • 1 mark: calculate the original descriptive variance.
  • 1 mark: obtain the exact non-negative SD and retain units.
Keep both possible signs of an unknown scale 6 marks

Ten real observations have mean 4545 and descriptive variance 3636. They are coded by v=x−abv=\frac{x-a}{b}, where b≠0b\ne0. The coded summaries are ∑v=20\sum v=20 and ∑v2=80\sum v^2=80. Find the coded standard deviation, ∣b∣|b|, and every possible ordered pair (a,b)(a,b).

Hint

Variance determines b2b^2, not its sign. For each admissible sign, use 45=a+bvˉ45=a+b\bar{v}.

Worked solution
  1. vˉ=2010=2,σv2=8010−22=4,σv=2.\bar{v}=\frac{20}{10}=2,\qquad\sigma_v^2=\frac{80}{10}-2^2=4,\qquad\sigma_v=2.
  2. 36=b2(4),b2=9,∣b∣=3.36=b^2(4),\qquad b^2=9,\qquad|b|=3.
  3. For b=3b=3, 45=a+645=a+6 gives a=39a=39. For b=−3b=-3, 45=a−645=a-6 gives a=51a=51.

  4. (a,b)=(39,3)or(51,−3).(a,b)=(39,3)\quad\text{or}\quad(51,-3).
  5. Both are valid reversible codings and restore the given mean and variance. A requirement b>0b>0 would select the first pair, but no such restriction is given.

Marking guidance
  • 1 mark: calculate the coded mean.
  • 1 mark: calculate the coded variance and SD.
  • 1 mark: relate original and coded variances.
  • 1 mark: retain both possible signs of the scale.
  • 1 mark: calculate the matching origin for each sign.
  • 1 mark: give the complete paired answer and justify admissibility.

Come back to what needs practice

Quick revision sheet (A4)

Your review plan starts after your first check.

Question bank and saved work