Access this content offline
Omniguides
Skip to the reading

1.7 Transformations to Achieve Linearity

Section Overview

  • Example 1.7.1
  • Gallery 1.7.1 - Exp. & Power Reg on Calc
  • Gallery 1.7.2 - Example 1.7.1
  • Pop Quiz 1.7.1

Nonlinear Modeling

So far, we have focused on using linear regression for our data sets. In this section, we will introduce situations where our data, when plotted, turns out to be nonlinear. When this happens, we can sometimes apply logarithmic transformation techniques to our data so it reverts back into the good old linear variety that we know and love!

There are two types of models that result from logarithmic transformations:

  • The Power Model, which takes the form: y=axby=ax^b and transforms into ln⁡y=ln⁡a+bln⁡x\ln y=\ln a+b\ln x
  • The Exponential Model which takes the form: y=abxy=ab^x and transforms into ln⁡y=ln⁡a+xlog⁡b\ln y=\ln a+x\log b,

The model that is most appropriate for your data is the one with which you can best plot your data on a line.

Example 1.7.1

Example 1.7.1

Astronomers have found a solar system remarkably similar to ours and have charted each planet’s distance from this solar system’s sun and its period of revolution relative to the “Earth-like” planet.

a) Find out which logarithmic transformation is most appropriate for this set of data.

b) Astronomers have found a 10th planet near the outer reaches of this solar system. Use your model from part (a) to predict the period of revolution for this planet if it lies 115 AU from this solar system’s sun.

PlanetDistance from Sun (astronomical units)Period of Revolution (Earth Years)
Zornis0.3960.294
Xetu0.9510.779
Midgourn11
Mordein1.8802.079
Plemee6.94513.715
Forsyth11.68632.692
Nubana23.54695.589
Asuber38.441188.597
Nigatu49.456287.181
Example 1.7.1 a) — recorded answer

a) To decide whether a power model or an exponential model is more appropriate, we need to perform find out which model best transforms the dataset into a line. The fastest way we can do this is to use our calculator.

Using our calculator, we can see if the ExpReg function gives a higher correlation coefficient than PwrReg. The two functions are located on the same screen as the LinReg function. Before this is done, however, we can refer to Gallery 1.5.3 to learn how to turn diagnostics on for our calculator and to learn where to access the LinReg function.

After performing both types of regression, it is clear that PwrReg wins out with its r=0.9992r=0.9992 compared to the ExpReg output of r=0.8965r=0.8965. These steps can be found in Gallery 1.7.1. We can also look at Gallery 1.7.2 to see how the power model provides a better linear solution than the exponential transformation.

The displayed regression outputs are transcribed with their source ellipses:

OutputExponential RegressionPower Regression
Modely = a × b^xy = a × x^b
a1.5266….9419…
b1.1351…1.4473…
r².8037….9984…
r.8965….9992…

The models are y=abxy=ab^x and y=axby=ax^b respectively.

Example 1.7.1 b) — recorded answer

b) Since we now know to use the power model, we can use the equation:

ln⁡y=ln⁡a+bln⁡x\ln y=\ln a+b\ln x

When we performed the PwrReg function, we should have also been able to find the intercept to be a=0.941a=0.941 and the slope to be b=1.447b=1.447. Plugging these numbers as well as the new data point x=115x=115 into the equation, we get:

ln⁡y=ln⁡(0.941)+(1.447)ln⁡(115)=6.805\ln y=\ln(0.941)+(1.447)\ln(115)=6.805
ln⁡y=6.805\ln y=6.805
y=e6.805≈902y=e^{6.805}\approx\mathbf{902}

It would take 902 Earth years for this 10th planet to make a full revolution around its sun!

Pop Quiz 1.7.1

Question 1 of 5

Given the following points, which of the following models best fits the data?

Source gap (S0140): The screenshot’s stimulus area is blank. No points, graph, or numerical data are displayed for question 1.
Question 2 of 5

Given the following points, which of the following models best fits the data?

Source gap (S0141): The screenshot’s stimulus area is blank. No points, graph, or numerical data are displayed for question 2.
Question 3 of 5

Given the following points, which of the following models best fits the data?

Source gap (S0142): The screenshot’s stimulus area is blank. No points, graph, or numerical data are displayed for question 3.
Question 4 of 5

Which of the following are the correct “a” values for questions 1, 2, and 3 respectively?

Question 5 of 5

Which of the following are the correct “b” values for questions 1, 2, and 3 respectively?

Source gap: The five captured quiz states S0140–S0144 display no checked answers, grading, or feedback. No answer key was recorded. Questions 4 and 5 depend on the absent stimuli for questions 1–3.
Glossary and deeper reading · 1 refreshers

These editorial refreshers supplement the reading. Definitions and examples are added guidance; original source wording and recorded answers remain in their original context.

  • Least-squares regression

    Least-squares regression fits a line predicting a response from an explanatory variable. The fitted line minimizes the sum of squared vertical residuals between observed and predicted responses. For example, a fitted line can predict a plant’s height from its age, within the range of observed ages.

    Read more: Least-squares regression in the captured Statistics reading →

Search lessons, terms and problems