• Skip to secondary menu
  • Skip to main content
  • Skip to primary sidebar
  • My Store
  • Glossary
  • Home
  • About Me
  • Contact Me

Statistics By Jim

Making statistics intuitive

  • Graphs
  • Basics
  • Hypothesis Testing
  • Regression
  • ANOVA
  • Probability
  • Time Series
  • Fun
  • Calculators

Logarithmic Transformation

By Jim Frost

« Back to Glossary Index

What is a Logarithmic Transformation?

A logarithmic transformation, or log transform, applies the natural log (ln) to a variable in your dataset. It changes the scale of the data by compressing large values more than small ones.

For example, suppose a data point has a value of 100. If you apply the natural log, you get:

Example of logarithmic transformation using the natural log.

It’s this transformed value, 4.605, that the analysis uses. The transformation compresses the scale, especially for large values, helping reduce skew and stabilize variation.

Analysts often use logarithmic transformation in linear regression as a last resort when residuals violate key assumptions, such as homoscedasticity or normality. Before transforming a variable, it’s often better to consider more advanced, flexible methods that can address these issues directly, such as generalized linear models or models with non-constant variance structures. However, when those approaches are inadequate or fail to resolve the problem, a log transformation can help by reducing skew, stabilizing variance, or linearizing relationships. It’s especially useful when the effect of a predictor diminishes as its value increases.

Consider log-transforming the dependent variable (outcome) when it’s skewed or when you’re modeling percent changes rather than absolute ones. Log-transforming an independent variable (predictor) is helpful when you expect diminishing effects. Those are cases where the first few units matter more than later ones. In some models, logging both variables improves linearity or makes coefficients easier to interpret on a relative scale. However, you should only apply log transformations to variables with strictly positive values.

Learn more about Independent vs. Dependent Variables.

Interpreting Log Transformations

While it has its advantages, a logarithmic transformation changes how you interpret the results. In regression, when a variable has been logged, coefficients no longer reflect simple unit changes. The interpretation depends on which variable you transform:

  • Outcome: The coefficients indicate percent changes in the outcome for a one-unit increase in the predictor.
  • Predictor: The coefficient shows the change in the outcome (in natural units) for a proportional increase (e.g., 1% or 10%) in that predictor.

Additionally, if you use the model to predict values, you must back-transform the predicted values to return to the original scale.

Example

For example, a model predicting income might use the natural log of income as the outcome because income tends to be right-skewed. If the coefficient for education is 0.08, then each additional year of education corresponds to roughly an 8% increase in income.

Related

Related Articles:
  • Curve Fitting using Linear and Nonlinear Regression
  • Outlier Calculator
« Back to Glossary Index

Primary Sidebar

Meet Jim

I’ll help you intuitively understand statistics by focusing on concepts and using plain English so you can concentrate on understanding your results.

Read More...

Buy My Introduction to Statistics Book!

Cover of my Introduction to Statistics: An Intuitive Guide ebook.

Buy My Hypothesis Testing Book!

Cover image of my Hypothesis Testing: An Intuitive Guide ebook.

Buy My Regression Book!

Cover for my ebook, Regression Analysis: An Intuitive Guide for Using and Interpreting Linear Models.

Subscribe by Email

Enter your email address to receive notifications of new posts by email.

    I won't send you spam. Unsubscribe at any time.

    Buy My Thinking Analytically Book!

    Cover for my book, Thinking Analytically: An Guide for Making Data-Driven Decisions.

    Top Posts

    • F-table
    • Z-table
    • Cronbach’s Alpha: Definition, Calculations & Example
    • How To Interpret R-squared in Regression Analysis
    • Box Plot Explained with Examples
    • How to Interpret P-values and Coefficients in Regression Analysis
    • Multicollinearity in Regression Analysis: Problems, Detection, and Solutions
    • Cohens D: Definition, Using & Examples
    • X and Y Axis in Graphs
    • Interpreting Correlation Coefficients

    Recent Posts

    • Data Collection Methods: Step-By-Step Guide with Examples
    • ANOVA Calculator
    • Positive Predictive Value: Meaning, Formula, and Interpretation
    • Median Absolute Deviation Calculator
    • Median Absolute Deviation: Definition, Finding & Formula
    • Outlier Calculator

    Recent Comments

    • Skata na fas on Comparing Regression Lines with Hypothesis Tests
    • Jim Frost on Comparing Regression Lines with Hypothesis Tests
    • Skata na fas on Comparing Regression Lines with Hypothesis Tests
    • Skata na fas on Comparing Regression Lines with Hypothesis Tests
    • Jim Frost on Pareto Chart: Making, Reading & Examples

    Copyright © 2026 · Jim Frost · Privacy Policy