Transformation Lab
BIOL 200 · Violations of Assumptions

Transformation Lab

Practise exponential and logarithmic transformations, then transform a real-style medical dataset and back-transform the results. The calculator stays beside you the whole time so you can see every number being made.

Why transform data?

A Student's t-test assumes each group is normally distributed and that the groups have equal variance (homogeneity of variance, HOV). When a dataset is badly skewed, one option is to transform it: apply the same mathematical function to every value so the data are rescaled into a more symmetric shape.

  • Linear transformations (add, subtract, multiply or divide by a constant) move or stretch the data but keep its shape. They never fix skew.
  • Non-linear transformations (log, square root, exponential) change the spacing between values, which is what changes the shape.
  • After analysing transformed data, you back-transform results (means, confidence limits) into the original units so they make sense.

See it: what each transformation does to skewed data

These are C-reactive protein (CRP) levels from 400 adults at a large health screening (simulated data). Most people have low CRP and a few have very high values, so the histogram has a long tail to the right: the data are right-skewed. Choose a transformation and watch the bars reshape. The dashed line shows what a normal distribution with the same mean and SD would look like. (In the lab you'll work by hand with a smaller group of 12 patients.)

Linear: changes the numbers, not the shape

Multiply by 2
Every value × 2. A CRP of 3.0 becomes 6.0. Like changing units (e.g. mg/L to mg/dL is ÷ 10).
Add 5
Every value + 5. A CRP of 3.0 becomes 8.0. The whole dataset slides along the axis.

Non-linear: changes the spacing, so the shape changes

√x
Square root. 4 becomes 2, 9 becomes 3, 16 becomes 4.
log₁₀(x)
The power of 10. 10 becomes 1, 100 becomes 2.
ln(x)
The power of e. 2.72 becomes 1, 7.39 becomes 2.
1 / x
The inverse. 2 becomes 0.5, 4 becomes 0.25. Big values become small and small values become big.
Patients per binNormal curve, same mean and SD
n400
Transformationnone
Skewness—
Shape—

Which transformation for which problem?

Problem in the dataTryBack-transform withExcel
Right skew (long tail of large values)ln(x) or log₁₀(x)eˣ or 10ˣ=LN() → =EXP()
=LOG10() → =10^
Mild right skew, counts√xx²=SQRT() → =^2
Severe right skew1 / x1 / x=1/A2
Left skew (long tail of small values)x² or eˣ√x or ln(x)=A2^2, =EXP()
Proportions (0 to 1)logitinverse logitcovered later

Every transformation has an opposite (inverse) that undoes it. ln and eˣ are a pair: eln(x) = x. That is the whole idea behind back-transformation.

For the next tabs

How to use the calculator

There is nothing to calculate on this page. You'll use the calculator in the eˣ, log₁₀ and ln tabs and in the back-transform lab. It sits beside the lesson (on a phone, tap the Calculator button). Read these tips now, or come back to them any time.

1 · Press the function first

Pressing ln types ln(. Then type your number. The bracket closes itself when you press =.

2 · Watch the top line

The grey line shows exactly what is being calculated, like e^(1.5). If it doesn't match what you meant, press C and start again.

3 · Send the answer

Click an answer box first, then press Use this value to drop the result in, rounded to 4 decimal places.

4 · Stuck? Press "Show me"

Every question has a Show me button that presses the keys on the calculator for you, one at a time.