topic badge
AustraliaVIC
VCE 11 General 2023

9.07 Data transformations

Lesson

Introduction

Recall that when one quantity varies directly with another, the resulting graph is linear. However, data isn't always linear. When this is the case, a transformation can be used to attempt to linearise it, or make it more "linear", so that a linear model can be used. Three common approaches are the square (or parabolic) x^2 transformation, the reciprocal \dfrac{1}{x} transformation, and the logarithmic (base 10) transformation.

Square transformation

When a relationship between two variables is quadratic, say y and x, then we can instead look at the relationship between y and x^2. This effectively transforms the horizontal axis such that the relationship between y and x^2 is linear.

Consider the following data set:

x0123456
y12510172637
1
2
3
4
5
6
7
x
5
10
15
20
25
30
35
y

We can see that the relationship between y and x is quadratic by plotting the points on the xy-plane.

x0123456
x^20149162536
y12510172637

Let's now create a table of values relating y and x^2 instead.

5
10
15
20
25
30
35
x^2
5
10
15
20
25
30
35
y

If we plot the resulting y and x^2 pairs, we get the following set of points.

Note that we've effectively stretched and squished the horizontal axis in the right places so that resulting points now fall on a straight line. This is what happens when we replace x for x^2.

Examples

Example 1

Consider the following points shown below.

1
2
3
4
5
6
7
x
-4
-2
2
4
6
8
10
12
y
a

Complete the data transformation by filling in the table of values for the points shown on the graph:

x^{2}
y-5-3313
Worked Solution
Create a strategy

Consider the x-coordinate of each point on the graph, then square it.

Apply the idea

From the graph, we have the points (0,-5), \, (2,-3), \, (4,3), and (6, 13).

For (2,-3). The x-coordinate is 2. Squaring the x-coordinate, we get 4.

Similarly, by squaring the x-coordinate of the remaining points we get:

x^{2}041636
y-5-3313
b

Plot the y-values against the x^2-values.

Worked Solution
Create a strategy

Plot the points from the completed table in part (a).

Apply the idea
4
8
12
16
20
24
28
32
x^{2}
-4
-2
2
4
6
8
10
12
y

The ordered pairs of points to be plotted on the coordinate plane are (0,-5), (4,-3), (16,3), and (36,13), which are plotted on the graph.

c

Hence, draw the line that passes through the points.

Worked Solution
Create a strategy

Draw a line through the plotted points on the coordinate plane from part (b).

Apply the idea
4
8
12
16
20
24
28
32
x^{2}
-4
-2
2
4
6
8
10
12
y
Idea summary

When a relationship between the variables y and x, is quadratic, then we may look at the relationship between y and x^2. This effectively transforms the horizontal axis such that the relationship between y and x^2 is linear.

Reciprocal transformation

If the relationship between two variables vary inversely, say y and x, then we can instead look at the relationship between y and \dfrac{1}{x}. This effectively transforms the horizontal axis such that the relationship between y and \dfrac{1}{x} is linear.

Consider in this case the following data set:

x\dfrac{1}{8}\dfrac{1}{4}\dfrac{1}{2}12
y21\dfrac{1}{2}\dfrac{1}{4}\dfrac{1}{8}
\frac{1}{4}
\frac{1}{2}
\frac{3}{4}
1
\frac{5}{4}
\frac{3}{2}
\frac{7}{4}
2
x
\frac{1}{4}
\frac{1}{2}
\frac{3}{4}
1
\frac{5}{4}
\frac{3}{2}
\frac{7}{4}
2
y

We can see that there is a reciprocal (inverse) relationship between y and xby plotting the points on the xy-plane.

x\dfrac{1}{8}\dfrac{1}{4}\dfrac{1}{2}12
\dfrac{1}{x}8421\dfrac{1}{2}
y21\dfrac{1}{2}\dfrac{1}{4}\dfrac{1}{8}

Let's now create a table of values relating y and \dfrac{1}{x} instead.

1
2
3
4
5
6
7
\dfrac{1}{x}
\frac{1}{4}
\frac{1}{2}
\frac{3}{4}
1
\frac{5}{4}
\frac{3}{2}
\frac{7}{4}
2
y

If we plot the resulting y and \dfrac{1}{x} pairs, we get the following set of points.

Just as in the square transformation, the horizontal axis has been transformed so that the resulting relationship is now linear.

Examples

Example 2

Consider the following table of values.

x\dfrac{1}{6}\dfrac{1}{4}\dfrac{1}{2}1
y-5-4-3- 2\dfrac{1}{2}
a

Complete the data transformation by filling in the table of values.

\dfrac{1}{x}
\log_{10} x
y-5.75-5.875-5.9375-5.95
Worked Solution
Create a strategy

Consider each x-value in the given table of values, then find its reciprocal.

Apply the idea

For x=\dfrac{1}{6}, its reciprocal is 6.

Similarly, by getting the reciprocal of the remaining x-values we get:

\dfrac{1}{x}6421
y-5-4-3- 2\dfrac{1}{2}
b

Plot the y-values againgst the \dfrac{1}{x}-values.

Worked Solution
Create a strategy

Plot the points from the completed table in part (a).

Apply the idea
1
2
3
4
5
6
\dfrac{1}{x}
-5
-4
-3
-2
-1
y

The ordered pairs of points to be plotted on the coordinate plane are (6,-5), (4,-4), (2,-3), and (1,- 2\dfrac{1}{2}), which are plotted on the graph.

c

Hence, draw the line that passes through the points.

Worked Solution
Create a strategy

Draw a line through the plotted points on the coordinate plane from part (b).

Apply the idea
1
2
3
4
5
6
1/x
-5
-4
-3
-2
-1
y
Idea summary

When a relationship between the variables y and x, varies inversely, we may look at the relationship between y and \dfrac{1}{x} as transforming the horizontal axis such that the relationship between y and \dfrac{1}{x} is linear.

Logarithmic transformation

If the relationship between two variables, say y and x, have a logarithmic relationship, then we can instead look at the relationship between y and \log_{10} x. As we have before in the previous transformations, we will explore another example.

Consider in this case the following data set:

x1101001000
y1357
100
200
300
400
500
600
700
800
900
1000
x
1
2
3
4
5
6
7
y

We can see that there is a a logarithmic relationship between y and x by plotting the points on the xy-plane.

x1101001000
\log_{10} x0123
y1357

Let's now create a table of values relating y and \log_{10} x instead.

1
2
3
4
5
6
\log_{10} x
1
2
3
4
5
6
7
y

If we plot the resulting y and \log_{10} x pairs, we get the following set of points.

Just as in the square transformation and reciprocal transformation, the horizontal axis has been transformed so that the resulting relationship is now linear.

Note that in general, creating a second table of values isn't a necessary step, it's just helpful to see how each of the x-values change as we apply a transformation to them. In saying that, it can be difficult to identify whether a reciprocal or logarithmic transformation is required, so it's worth creating a second table of values. It's hard to see, but a reciprocal relationship will always plateau eventually, while a logarithmic relationship will continue to increase or decrease, just very slowly.

Examples

Example 3

Consider the following table of values.

x1245
y-5.75-5.875-5.9375-5.95
a

Complete the data transformation by filling in the table of values.

\dfrac{1}{x}
\log_{10} x
y-5.75-5.875-5.9375-5.95
Worked Solution
Create a strategy

Consider each x-value in the given table of values, then find its reciprocal and logarithm.

Apply the idea

For x=1, its reciprocal is 1, and \log_{10} 1 = 0.

Similarly, by getting the reciprocal and the logarithm of the remaining x-values we get:

\dfrac{1}{x}10.50.250.2
log_{10} x00.3010.6020.699
y-5.75-5.875-5.9375-5.95
b

Using technology or otherwise, draw the graphs of the transformed data and state which transformation linearises the data.

A
\dfrac{1}{x}
B
\log_{10} x
Worked Solution
Create a strategy

Draw the graph for each transformation.

Apply the idea
0.2
0.4
0.6
0.8
\dfrac{1}{x}
-5.7
-5.8
-5.9
y

Here is the graph of the reciprocal transformation of x. We can see that the resulting relationship is now linear.

0.1
0.2
0.3
0.4
0.5
0.6
0.7
\log_{10} x
-5.7
-5.8
-5.9
y

Here is the graph of the logarithmic transformation of x. We can see that the resulting relationship is not linear.

So the correct answer is option A.

Idea summary

When a relationship between the variables y and x, have a logarithmic relationship, the horizontal axis is transformed so that the resulting relationship between y and \log_{10} x is linear.

Outcomes

U2.AoS3.2

the methods of transforming data

U2.AoS3.5

model non-linear data by using suitable transformations

What is Mathspace

About Mathspace