Interview Q&A / Data Science

IntermediateQuick answer1 min readUpdated 3 Oct 2026

Why are incomes and prices right-skewed, and why does a log transform help?

SHORT ANSWER

Such values grow by percentages rather than fixed amounts, so many small effects multiply and produce a long right tail (log-normal shape). Taking the log turns multiplication into addition and usually makes the data close to symmetric.

Explain it simply

Salaries rise by 10% hikes, not by Rs 10,000 hikes. Repeated percentage changes multiply. Multiplied effects give a bunch of modest values and a few very large ones: a long right tail. A variable whose logarithm is normal is called log-normal.

Logs also compress big gaps. On a log scale, going from 10,000 to 100,000 looks the same as going from 1 lakh to 10 lakh: each is a tenfold step.

Example

python
import numpy as np
price = np.array([100, 1000, 10000, 100000])
print(np.log10(price))  # [2. 3. 4. 5.]

The raw values span a 1000x range, while the logs sit in an even 2 to 5 range. For modelling, that matters: linear regression assumes errors with roughly constant spread, and house prices on a raw scale violate that. A model on log(price) often fits better, and its coefficients read as approximate percentage effects.

Use np.log1p(x) when the data contains zeros, since log(0) is undefined.

What to say in the interview

"Quantities driven by multiplicative growth, like income, house prices or city populations, are right-skewed and often log-normal. A log transform reduces skew, tames outliers and stabilises variance, which helps linear models and makes histograms readable. Remember to transform predictions back with exp, and the data must be positive."

Common mistakes

  • Taking log of zero or negative values without adding a shift or using log1p.

#log-transform#skewness#distributions

Related questions

Practise more Data Science questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Data Science quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.