2.10 Logarithmic scaling and linearizing data

2.10 Logarithmic scaling and linearizing data

IB Maths: Applications and Interpretation HL: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • A log⁡10\log_{10} scale: each rise of 1 multiplies the quantity by 10.
  • Exponential y=abxy=ab^x: plot ln⁡y\ln y against xx; gradient ln⁡b\ln b, intercept ln⁡a\ln a (semi-log).
  • Power y=kxny=kx^n: plot ln⁡y\ln y against ln⁡x\ln x; gradient nn, intercept ln⁡k\ln k (log-log).
  • A straight line on a semi-log graph means exponential; on a log-log graph, power.
  • Use rr for the transformed data to judge the fit.
  • Predictions outside the data are extrapolation and may be unreliable.

Scaling with logarithms

Logarithms turn multiplying into adding, so very large or small numbers fit on one manageable scale.

On a log⁡10\log_{10} scale, +1 multiplies the quantity by 10 and +3 by 1000.

Example: N=3 000 000N=3\,000\,000 gives log⁡10N=log⁡103+6=6.48\log_{10}N=\log_{10}3+6=6.48. To go back, N=104.5=3.16×104N=10^{4.5}=3.16\times10^{4}.

The laws: log⁡(xy)=log⁡x+log⁡y\log(xy)=\log x+\log y, log⁡xy=log⁡x−log⁡y\log\frac xy=\log x-\log y and log⁡(xm)=mlog⁡x\log(x^m)=m\log x, in base 10 or ee (written ln⁡\ln).

01234110100100010000Nlog₁₀ N
Each step of 1 on a log scale multiplies the quantity by 10.

A quantity rises from log⁡10N=3\log_{10}N=3 to log⁡10N=5\log_{10}N=5. By what factor does NN change?

Linearizing exponential data

Take logarithms of y=abxy=ab^x: ln⁡y\ln y against xx is a straight line with gradient ln⁡b\ln b and intercept ln⁡a\ln a.

This is a semi-log relationship (one variable logged).

Example: ln⁡N=4.2+0.35t\ln N=4.2+0.35t gives a=e4.2=66.7a=e^{4.2}=66.7 and b=e0.35=1.42b=e^{0.35}=1.42.

Use your GDC to find the regression line of ln⁡y\ln y on xx, then undo the logarithm to get aa and bb.

1234567891012345678xy(0, 4.2): ln aln N = 4.2 + 0.35t
A semi-log graph of an exponential model is a straight line: gradient ln b, intercept ln a.
  • y=abxy=ab^xln⁡y=ln⁡a+xln⁡b\ln y=\ln a+x\ln b

A line of best fit gives ln⁡y=1.1+0.2x\ln y=1.1+0.2x. Find aa and bb in y=abxy=ab^x.

Linearizing power data

Take logarithms of y=kxny=kx^n: ln⁡y\ln y against ln⁡x\ln x is a straight line whose gradient is the exponent nn.

This is a log-log relationship (both variables logged), with intercept ln⁡k\ln k.

Example: for planets, log⁡10T=1.5log⁡10d−0.70\log_{10}T=1.5\log_{10}d-0.70 gives n=1.5n=1.5 and k=10−0.70=0.200k=10^{-0.70}=0.200, so T=0.200d1.5T=0.200d^{1.5}.

Any base works, as long as you use the same base to undo it.

0.511.522.533.54−1123456xy(0, −0.70): log klog T = 1.5 log d − 0.70
A log-log graph of a power model is a straight line: gradient n, intercept ln k.
  • y=kxny=kx^nln⁡y=ln⁡k+nln⁡x\ln y=\ln k+n\ln x

A log-log line has equation ln⁡y=2+3ln⁡x\ln y=2+3\ln x. Which power model is this?

Interpreting log graphs

A straight line on a semi-log graph means an exponential model; on a log-log graph it means a power model.

You will not be asked to draw these graphs, but you must interpret them. If neither is straight, try another model.

Use Pearson's product-moment correlation coefficient rr for the transformed data: close to ±1\pm1 supports the model, close to 0 means a poor fit.

A log scale suits data over a wide range, or a focus on the rate of growth rather than the absolute change.

0.511.522.53246810xy(0, ln 2)semi-log: ln y = ln 2 + x ln 3log-log: ln y = ln 2 + 3 ln x
Straight lines show a model fits. Semi-log (ln y against x): gradient ln b. Log-log (ln y against ln x): gradient n. Illustrative: y = 2·3ˣ and y = 2x³.

ln⁡y\ln y against xx (semi-log)

  • Straight line: exponential y=abxy=ab^x
  • Gradient ln⁡b\ln b, intercept ln⁡a\ln a

ln⁡y\ln y against ln⁡x\ln x (log-log)

  • Straight line: power y=kxny=kx^n
  • Gradient nn, intercept ln⁡k\ln k

A graph of ln⁡y\ln y against xx is a straight line. Which model is suggested?

Finding parameters and predicting

Fit a straight line to the transformed data, compare it with the log equation, then undo the logarithms.

Example: cases CC against days tt gives ln⁡C=2.09+0.526t\ln C=2.09+0.526t with r=1.00r=1.00, so C=8.05×1.69tC=8.05\times1.69^{t}. At t=12t=12, C≈4440C\approx4440; C=10 000C=10\,000 when t=13.5t=13.5.

Always comment: rr close to 1 supports the model, but predictions outside the data range are extrapolation, and real growth cannot continue forever.

  1. 1

    Choose the transformation

    ln⁡y\ln y against xx, or against ln⁡x\ln x

  2. 2

    Line of best fit

    use the GDC

  3. 3

    Compare

    with ln⁡y=ln⁡a+xln⁡b\ln y=\ln a+x\ln b or ln⁡y=ln⁡k+nln⁡x\ln y=\ln k+n\ln x

  4. 4

    Undo the logarithms

    to get the model

Fitting a model from transformed data.

Worked example

A line of best fit for ln⁡y\ln y against xx is ln⁡y=1.6+0.4x\ln y=1.6+0.4x. Find the model y=abxy=ab^x and yy when x=5x=5.

The model fits the data with r=0.99r=0.99. Why is a prediction far outside the data range still unreliable?

Try an exam question

A line of best fit for ln⁡y\ln y against xx is ln⁡y=2.3+0.5x\ln y=2.3+0.5x. Find the model y=abxy=ab^x, and find yy when x=4x=4.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Find log⁡10N\log_{10}N when N=3 000 000N=3\,000\,000.

1 mark, marked against the mark scheme

Revision notes