Logarithmic scales and linearizing data
In a minute
A spaces values by multiplying factors, so data from to fit on one graph. Taking logs also straightens curved data: a straight line on a means an exponential model, and on a a power model. The line's and intercept give you the model's .
You'll be able to
- Choose a logarithmic scale for data with a very wide range or when growth rates matter, and read values off a log axis.
- Linearize exponential data by plotting against , then find and in from the best-fit line.
- Linearize power data by plotting against , then find and in .
- Interpret the gradient and intercept of semi-log and log-log graphs in context.
- Decide between an exponential and a power model by comparing for the two linearized data sets, and justify the choice.
Before you start3 quick questions on what this builds on
Revise first: 1.1 Standard form, 1.5 Exponents and introductory logarithms, 1.9 Laws of logarithms, 2.1 Straight-line equations, 2.5 Modelling with functions, 2.6 Fitting and testing models and 4.4 Correlation and regression (y on x)
Logarithmic scales
Animal masses run from grams to over tonnes. On an ordinary axis, every small animal piles up at .
A fixes this. Each gridline is times the one before, so equal distances stand for equal multiplying factors, not equal differences.
To read a log axis, use exponents: a point a fraction of the way from to shows .
Try it first, then reveal one step at a time.
- The gridline is at exponent and the gridline at exponent .
- A quarter of the way along adds to the exponent: .
- The value is , so about mm.
- Reading the axis as linear would wrongly give mm.
Try it first, then reveal one step at a time.
- Positions are of the masses, so the gap is .
- By the quotient law this is
- Each power of ten takes cm: , so about cm.
- Interpret: both animals fit on one page.
Log scales also show growth rates. With a log vertical axis and time across, constant percentage growth is a straight line.
A steeper line means faster percentage growth, whatever the size of the numbers.
Exponential data: semi-log graphs
means taking logs so that curved data lie on a straight line. You used the log laws for this in 1.9.
Suppose with and . Taking of both sides gives . So against is a straight line.
A graph of (or ) against is a . If its points lie close to a straight line with gradient and intercept , then and .
With , the model can also be written . With , use and instead.
Try it first, then reveal one step at a time.
- Gradient: . Intercept: . So .
- Undo the logs: .
- So and , giving .
- Interpret: is the model's follower count at the start, about . Each week is multiplied by , a growth of about a week.
Try it first, then reveal one step at a time.
- Take of every value: , , and so on. Enter in one list and in another.
- Linear regression of on gives , with , so the line fits very well.
- Undo the logs: , so and
- So . Interpret: each hour is multiplied by , so it falls by about an hour.
Power data: log-log graphs
Now suppose , with and . Taking of both sides gives . So against is a straight line.
A graph that logs both axes is a . The gradient is the power . The intercept is (or if both axes use base ).
A power model can have any , such as . When is a positive integer it is , and when is a negative integer it is (2.5). means doubling multiplies by .
Try it first, then reveal one step at a time.
- The axes are logged, so find the gradient from the logs of the coordinates:
- At , , so .
- So . For :
- Interpret: , so a kg mammal uses only about times the power of a kg one.
Try it first, then reveal one step at a time.
- Enter and as lists. Power regression fits a straight line to against .
- The GDC gives , with for the log-log line.
- Interpret: , so power is close to proportional to . Doubling the blade length multiplies the power by about .
Exponential or power? Choosing the model
To decide which model fits, linearize the data both ways and see which graph is straighter.
1. Plot against (semi-log). Straight means exponential.
2. Plot against (log-log). Straight means power.
3. Compare , , for the two transformed data sets. Choose the one with closer to , then use its for the .
Find for the transformed data, not the raw data. If neither graph is close to straight, neither model fits well.
Try it first, then reveal one step at a time.
- Graph A has , closer to than Graph B's , so the semi-log graph is straighter.
- So choose the exponential model: .
- Undo the logs: , with and .
- Interpret: about users at launch, and , so users grow by about a month. This can't last, so long-term predictions are unreliable.
Try it first, then reveal one step at a time.
- Semi-log: for against is
- Log-log: for against is , much closer to . So choose the power model .
- Power regression gives .
- At : , so about minutes.
- Interpret: is a little above , so the runner's average pace slows slightly over longer races. km is inside the data, so the estimate is reasonable.
Common mistakes
- Running a linear regression of on when the question asks for on . Take of every value first; a line through the raw data is the wrong model.
- Using the intercept as . On a graph of the intercept is , so ; with it is .
- Rounding the gradient or intercept before you undo the logs. Small changes in an exponent change and predictions a lot, so keep the GDC's full values.
- Choosing a model with no reason. Quote (or ) for both linearized graphs and choose the one closer to .
- Reading a log axis as linear. Halfway between the and gridlines is , not .
Exam tips
- “Find the regression line in the form ”: write that you took of the values, then give the equation with on the left and and to 3 s.f.
- “Justify” a choice of model: state or for both linearized graphs and say which is closer to in size. A choice without a valid reason earns no marks.
- “Interpret” a semi-log gradient through its factor per unit of , (or with ), in context: “the concentration falls by about each hour”.
- You won't be asked to draw or sketch log graphs, but you must read them. First check whether each axis shows the value or its log, and which base.
Key takeaways
Practise this
15 past-paper questions on Non-linear regression and linearizing in the AI HL bank, each with a mark scheme and a worked explanation.