Straightening Data with Logarithmic Graphs
Take logarithms of a model to make it linear: y = axⁿ gives a straight line for log y against log x, and y = abˣ gives one for log y against x. The gradient and intercept then return the constants.
What a learner can do afterwards
- Choose the axes that straighten a given model
- Recover a and n from the gradient and intercept of a log-log plot
- Say what a straight log-linear plot tells you about the data
1 · Read
Some curves turn straight when you plot their logs. If data follow y = a x^n, take logs to get log y = log a + n log x. Plot log y against log x and you get a line with gradient n and intercept log a. Plain y against x stays curved, so it cannot straighten a power law.
Read a base 10 log-log plot this way. An intercept of 2 means log a = 2, so a = 10^2 = 100, and an intercept of 3 gives a = 1000. A line through (log x = 2, log y = 1) and (log x = 4, log y = 7) rises 6 over a run of 2, so the gradient is 3 and the power is 3. A gradient of 1/2 with intercept 0 means y = sqrt(x), since a = 1.
If data follow y = a b^x, log only the y values. Logs give log y = log a + x log b, which is a line in plain x with gradient log b and intercept log a. Read the intercept first to get a, then the gradient to get b. With base 10 logs a gradient of 2 means b = 10^2 = 100.
Let the slope tell the story before you compute. A rising log-linear line means growth with b above 1, while a falling one has a negative gradient, so log b is negative and b sits below 1. Changing a only shifts the intercept, never the gradient. Keep one base through the whole question and convert back with powers of 10.
Log both axes to read powers, log only y to read exponentials, and let gradient and intercept hand back the constants.
2 · Watch
Take it off screen
Where it sits
Where this leads
Jobs that lean on this skill. Follow one to see everything it is built on.
8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.