Skip to the workspace
Pebellslearn by building
Mathematics for Framing Questions  ›  Capstone Project

Logarithms for Skew and Growth

Mathematics 12 minA logarithm turns multiplication into addition, so skewed values spread out evenly, steady percentage growth becomes a straight line, and ratios become differences.

ai data scientist / Logarithms for Skew and Growth

Explore each scene at your own pace.

01 · The rule

The rule

Logarithms for Skew and Growth

Most Pantry baskets cost between ₹300 and ₹800. A handful of office pantries order ₹40,000 of snacks at once. Plot order values on an ordinary axis and you get one tall spike near zero and a long, empty tail. Plot the monthly orders of a fast-growing new delivery zone and the early months look flat. Both pictures are fixed by the same tool.

The rule

Logs turn multiplying into adding: equal ratios become equal steps.

The base-10 logarithm asks "10 to what power gives this number?"

Value ₹40 ₹400 ₹4,000 ₹40,000
log10 1.6 2.6 3.6 4.6

Each step of ×10 in value is a step of +1 in the log. On a log axis, ₹400 and ₹4,000 sit as far apart as ₹4,000 and ₹40,000, so both ordinary baskets and office orders become visible on one chart.

Three reasons data scientists reach for logs:

  • Skewed data such as order values, incomes and page views spreads out evenly.
  • Growth at a steady percentage rate draws a straight line on a log scale, so a bend means the growth rate itself changed.
  • Ratios become differences: log⁡(a/b)=log⁡a−log⁡b\log(a/b) = \log a - \log b. Doubling is always +0.301 in log10 and halving is always −0.301, which makes rises and falls symmetric, unlike percentages.

The natural log (written ln, base ee) has a handy extra: for small changes, a rise of 0.05 in ln is close to a 5% rise in the value. That is why models often predict the log of spend, and why their coefficients read as percentages.

One catch: the log of zero does not exist. For a column with zeros, such as spend in a week with no orders, use log⁡(1+x)\log(1 + x), which keeps zeros at zero.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.