Skip to main content
Statistics LibreTexts

16.2: Log Transformations

  • Page ID
    2181
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Learning Objectives

    • State how a log transformation can help make a relationship clear
    • Describe the relationship between logs and the geometric mean

    The log transformation can be used to make highly skewed distributions less skewed. This can be valuable both for making patterns in the data more interpretable and for helping to meet the assumptions of inferential statistics. Figure \(\PageIndex{1}\) shows an example of how a log transformation can make patterns more visible. Both graphs plot the brain weight of animals as a function of their body weight. The raw weights are shown in the upper panel; the log-transformed weights are plotted in the lower panel.

    log_animals[1].jpg
    Figure \(\PageIndex{1}\): Scatter plots of brain weight as a function of body weight in terms of both raw data (upper panel) and log-transformed data (lower panel)

    It is hard to discern a pattern in the upper panel whereas the strong relationship is shown clearly in the right panel. The comparison of the means of log-transformed data is actually a comparison of geometric means. This occurs because, as shown below, the anti-log of the arithmetic mean of log-transformed values is the geometric mean.

    Table \(\PageIndex{1}\) shows the logs (base \(10\)) of the numbers \(1\), \(10\), and \(100\). The arithmetic mean of the three logs is

    \[(0 + 1 + 2)/3 = 1\]

    The anti-log of this arithmetic mean of \(1\) is

    \[10^1 = 10\]

    which is the geometric mean:

    \[(1 \times 10 \times 100)^{0.3333} = 10\]

    Table \(\PageIndex{1}\): Logarithms
    X \(\log_{10}(X)\)
    1 0
    10 2
    100 3
    1,000 4
    10,000 5

    Therefore, if the arithmetic means of two sets of log-transformed data are equal, then the geometric means are equal.


    This page titled 16.2: Log Transformations is shared under a Public Domain license and was authored, remixed, and/or curated by David Lane via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.