EasyDeepLearn

When and why do you log-transform a variable?

easy

Answer

  • (1) Right-skewed positive variables (income, prices, response times): log transform pulls in the tail, makes distribution more symmetric, often more Gaussian.
  • (2) Multiplicative relationships become additive after log — foundation of Box-Cox / Yeo-Johnson and log-linear models.
  • (3) Improves linearity for regression.
  • Watch: log(0)\operatorname{log}(0) undefined — use log(1+x)\operatorname{log}(1 + x) or add a small offset.
  • Not helpful for symmetric or already-Gaussian data.
Check yourself — multiple choice
  • Always log
  • Right-skewed positive vars: log makes symmetric / more Gaussian, converts multiplicative to additive; handle zeros with log(1+x)\operatorname{log}(1 + x)
  • Only for negative data
  • Never useful

Log transform: right-skewed positive vars → symmetry + linearity; handle zeros.

#descriptive#eda

Practise Statistics Fundamentals

215 interview questions in this topic.

Related questions