MedCalc
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
working
Skip to main content
Show menu

Logarithmic transformation

Some variables are not normally distributed and therefore do not meet the assumptions of parametric statistical tests. Using parametric statistical tests (such as a t-test, ANOVA or linear regression) on such data may give misleading results. In some cases, transforming the data will make it fit the assumptions better.

The logarithm function tends to squeeze together the larger values in your data set and stretches out the smaller values.

The following illustration shows the histogram of a log-normal distribution (left side) and the histogram after logarithmic transformation (right side).

Effect of logarithmic transformation

When you select logarithmic transformation, MedCalc computes the base-10 logarithm of each data value and then analyses the resulting data. For ease of interpretation, the results of calculations and tests are backtransformed to their original scale.

Original number = x

Transformed number x'=log10(x)

Backtransformed number = 10x'

Note

Zeros and negative numbers

If you have zeros or negative numbers, you can't take the log; you should add a constant to each number to make them positive and non-zero.

In MedCalc you can easily do so by adding a number to the variable. For example if the variable 'Concentration' contains zero values, you add the constant 1 by entering the following for the variable in any of the variable selection boxes:

Add a constant to a variable

Next, you will have to subtract the constant from the results. If, for example, the program shows the geometric mean for Concentration+1 to be 16.5, you can report the Geometric mean as 16.5 - 1 = 15.5

External links

This site uses cookies to store information on your computer. More info...