topic badge
AustraliaVIC
VCE 11 General 2023

9.07 Data transformations

Lesson

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$x2 transformation, the reciprocal $\frac{1}{x}$1x transformation, and the logarithmic (base $10$10) transformation.

 

The square transformation

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

Exploration

Consider the following data set:

$x$x $0$0 $1$1 $2$2 $3$3 $4$4 $5$5 $6$6
$y$y $1$1 $2$2 $5$5 $10$10 $17$17 $26$26 $37$37

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

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

$x$x $0$0 $1$1 $2$2 $3$3 $4$4 $5$5 $6$6
$x^2$x2 $0$0 $1$1 $4$4 $9$9 $16$16 $25$25 $26$26
$y$y $1$1 $2$2 $5$5 $10$10 $17$17 $26$26 $37$37

If we plot the resulting $y$y and $x^2$x2 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$x for $x^2$x2.

 

The reciprocal transformation

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

Exploration

Consider in this case the following data set:

$x$x $\frac{1}{8}$18 $\frac{1}{4}$14 $\frac{1}{2}$12 $1$1 $2$2
$y$y $2$2 $1$1 $\frac{1}{2}$12 $\frac{1}{4}$14 $\frac{1}{8}$18

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

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

$x$x $\frac{1}{8}$18 $\frac{1}{4}$14 $\frac{1}{2}$12 $1$1 $2$2
$\frac{1}{x}$1x $8$8 $4$4 $2$2 $1$1 $\frac{1}{2}$12
$y$y $2$2 $1$1 $\frac{1}{2}$12 $\frac{1}{4}$14 $\frac{1}{8}$18

If we plot the resulting $y$y and $\frac{1}{x}$1x 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.

 

The logarithmic transformation

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

Exploration

Consider the following data set:

$x$x $1$1 $10$10 $100$100 $1000$1000
$y$y $1$1 $3$3 $5$5 $7$7

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

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

$x$x $1$1 $10$10 $100$100 $1000$1000
$\log_{10}x$log10x $0$0 $1$1 $2$2 $3$3
$y$y $1$1 $3$3 $5$5 $7$7

If we plot the resulting $y$y and $\log_{10}x$log10x 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$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.

Practice questions

question 1

Consider the following points shown below.

Loading Graph...

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

    $x^2$x2 $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
    $y$y $-5$5 $-3$3 $3$3 $13$13
  2. Plot the $y$y-values against the $x^2$x2-values.

    Loading Graph...

  3. Hence, draw the line that passes through the points.

    Loading Graph...

QUESTION 2

Consider the following table of values.

$x$x $\frac{1}{6}$16 $\frac{1}{4}$14 $\frac{1}{2}$12 $1$1
$y$y $-5$5 $-4$4 $-3$3 $-2\frac{1}{2}$212
  1. Complete the data transformation by filling in the table of values.

    $\frac{1}{x}$1x $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
    $y$y $-5$5 $-4$4 $-3$3 $-2\frac{1}{2}$212
  2. Plot the $y$y-values against the $\frac{1}{x}$1x-values.

    Loading Graph...

  3. Hence, draw the line that passes through the points.

    Loading Graph...

QUESTION 3

Consider the following table of values.

$x$x $1$1 $2$2 $4$4 $5$5
$y$y $-5.75$5.75 $-5.875$5.875 $-5.9375$5.9375 $-5.95$5.95
  1. Complete the two different data transformations by filling in the table of values.

    Round your answers to three decimal places.

    $\frac{1}{x}$1x $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
    $\log_{10}x$log10x $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
    $y$y $-5.75$5.75 $-5.875$5.875 $-5.9375$5.9375 $-5.95$5.95
  2. Using technology or otherwise, draw the graphs of the transformed data and state which transformation linearises the data.

    $\frac{1}{x}$1x

    A

    $\log_{10}x$log10x

    B

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