Start studying
Module 2 · Maths for Data Module contents
Module 2  ·  Card 2 / 13beginner

Logarithms

A logarithm answers the question of what power a base number must be raised to in order to equal a given value.

For base ten, the logarithm of one hundred is two because ten raised to the power of two equals one hundred.

Natural logarithms use the mathematical constant e as their base, which appears frequently in continuous probability.

Logarithms compress wide ranges of numbers, turning multiplicative scales into manageable additive steps.

In data science, they are used to tame skewed monetary figures, stabilise variance, and measure relative growth.

Learn in depth ↓
Module 02 · Maths for Data · 13 concepts
In depth  /  15 lines

Logarithms, in more detail

Logarithms represent the inverse mathematical operation of exponentiation.

If you multiply a base number by itself repeatedly, a logarithm reveals how many times that multiplication occurred.

Common logarithms use a base of ten, making them intuitive for orders of magnitude.

Natural logarithms use Euler's number e as their base, approximately equal to 2.718.

Natural logarithms appear naturally when modelling continuous compounding and statistical likelihood functions.

A vital property of logarithms is turning multiplication into addition: log of a times b equals log a plus log b.

Similarly, the logarithm of a quotient equals the logarithm of the numerator minus the logarithm of the denominator.

Powers inside a logarithm can be pulled out as plain multipliers, simplifying complex nonlinear relationships.

In data analysis, raw metrics like house prices, incomes, and website traffic often span multiple orders of magnitude.

Applying a logarithmic transformation pulls extreme high values closer to the median while preserving their ordering.

However, the logarithm of zero is undefined and negative numbers do not have real logarithms.

When datasets contain zeros, practitioners frequently add a tiny constant like one before taking the logarithm.

A common pitfall is computing differences between logged values and misinterpreting them as absolute differences.

Differences between natural logarithms approximate percentage changes rather than absolute unit changes.

Logarithms allow algorithms to process wildly skewed numerical values without allowing massive numbers to dominate.

Want the full technical article? Wikipedia ↗
Test yourself

One question on this card. Every option explains itself once you pick, right or wrong.

Question 1
Why do data scientists frequently apply logarithmic transformations to income and house price columns?
Maths for Data

13 concepts in this module, then a graded test with every answer explained.

Study this module →
↑↓ move↵ openesc close