what is linear on a log log plot

What's Linear on a Log-Log Plot?

By Daniel Thompson
AD

In the realm of data visualisation and statistical analysis, there are times when we encounter unique graphical representations that serve specific purposes. One of these is the log-log plot, a graphical display that aids in observing the relationship between two variables when both are exponential or power-law in nature. But what exactly does it mean when we say something is 'linear on a log-log plot'?

The log-log plot is a type of graph where both the x-axis and y-axis are scaled with a logarithmic scale. This can be incredibly useful for visualising data that spans many orders of magnitude, without losing the details that might otherwise be lost on a linear plot. For instance, if you plotted the growth of a company's revenue on a logarithmic scale, you could clearly see when it doubled, tripled, etc.

The Concept of Linearity in Log-Log Plots

Linear on a log-log plot refers to a relationship between two variables where a change in one variable is proportional to the change in the other. In simpler terms, if the graph of these two variables on a log-log plot is a straight line, we say the relationship is linear. This means that if you increased the independent variable by a certain factor, the dependent variable would consistently increase by the same factor.

AD
Log log plot linear regression
Log log plot linear regression
Bitcoin’s natural long-term power-law corridor of growth
Bitcoin’s natural long-term power-law corridor of growth
Log Definition Explained | Easy Logarithms & Exponents Algebra Guide
Log Definition Explained | Easy Logarithms & Exponents Algebra Guide

For example, if you plotted the growth of a population on a log-log plot, and the graph formed a straight line, you'd know that the population is consistently doubling every fixed number of years. More technically, this means that the function describing this relationship is a power-law: y = k * x^n, where k is a constant and n is the power or slope of the line.

Understanding the Slope

The slope of a line on a log-log plot is of particular importance. It represents the exponent in the underlying power-law function. A slope of 1 indicates a direct proportionality - if x changes by a factor, y will change by the same factor. A slope of 2 suggests that if x doubles, y will not just double but quadruple, and so on. Understanding these slopes is particularly crucial in data analysis.

a diagram showing the location of different locations
a diagram showing the location of different locations
Plotting Log Log Plots In Base R – Steve’s Data Tips and Tricks
Plotting Log Log Plots In Base R – Steve’s Data Tips and Tricks
Linear Regression
Linear Regression

For example, say we're studying the correlation between word count and time spent reading a webpage. If a log-log plot shows a linear relationship with a slope of 0.5, it indicates that for every 10 words added, we only increase read time by 5 seconds instead of 10 seconds. This is likely due to a phenomenon called "cognitive load" - more text means more time needed to process the information.

Real-World Applications

The log-log plot's ability to illustrate power-law relationships makes it an invaluable tool in various scientific fields. In physics, it's used to model phenomena like earthquakes, where the number of earthquakes scales with their magnitude according to the Gutenberg-Richter law. In seismology, it helps predict the likelihood of major earthquakes based on the frequency of minor ones.

AD

In social sciences and economics, log-log plots help understand phenomena such as income inequality, wealth distribution, and urban scaling laws. For instance, in Zipf's law, the rank-size distribution of cities follows a power-law, indicating that a city's population is approximately proportional to the inverse of its ranking.

the worksheet for reading line plots is shown in black and white, with two chess
the worksheet for reading line plots is shown in black and white, with two chess
the formula for log and log functions is shown in black ink on a white background
the formula for log and log functions is shown in black ink on a white background
Logarithm Rules | ChiliMath
Logarithm Rules | ChiliMath
Linear Regression Cheat sheet — Get all our FREE data science cheat sheets in high resolution by...
Linear Regression Cheat sheet — Get all our FREE data science cheat sheets in high resolution by...
Line Plot Worksheets
Line Plot Worksheets
Log-log lmplot with seaborn
Log-log lmplot with seaborn

Beyond Linearity: Power Law Distributions

While linearity on a log-log plot is a common pattern, it's not the only one. Nonlinear log-log plots can reveal just as intriguing insights. For example, a common pattern in many complex systems is the power-law distribution. This occurs when the probability of an event is inversely proportional to its magnitude raised to some power. These heavy-tailed distributions appear in many phenomena, like the size of cities, the number of followers on social media, or the frequency and magnitude of financial market crashes.

The fact that such diverse phenomena share this kind of behaviour has led to the development of the 'scale invariant' or 'self-similar' models. These models suggest that many complex systems are essentially 'fractal' in nature, meaning they exhibit similar structures at different scales.

AD

Potential Pitfalls

While log-log plots are powerful tools, they're not without their pitfalls. The logarithmic scale can make it difficult to assess the absolute size of values on the axes. Also, not all data that appears linear on a normal plot actually becomes linear on a log-log plot. Some relationships may look linear on a linear scale but may show complex curvature when plotted logarithmically.

Creating Simple Well Log Plots Using the Matplotlib Library in Python | Towards Data Science
Creating Simple Well Log Plots Using the Matplotlib Library in Python | Towards Data Science

Moreover, log-log plots do not handle data that includes zero or negative values well. This is because of the nature of logarithms - they're not defined for non-positive numbers. In such cases, it might be worth considering a different type of plot, or applying a transformation to the data to 'shift' the problematic values out of the negative or zero range.

However, with a solid grasp of how to interpret log-log plots, the insights they provide can prove incomparable. They allow for the visualisation of data that might otherwise be impractical or even impossible, and can uncover relationships hidden within the noise of a linear plot. They're a testament to the incredible power of mathematics to help us understand the world around us.

AD
AD