# 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.

- Many variables in biology have log-normal distributions, meaning that after log-transformation, the values are normally distributed.
- If the data shows outliers at the high end, a logarithmic transformation can sometimes help.

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).

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'=log_{10}(x)

Backtransformed number = 10^{x'}

Note

- The backtransformed mean is named the Geometric mean.
- Backtransformed confidence intervals are not symmetrical.

## 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:

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