Data and statistics · cheat sheet

Box-Cox transformation

A method that finds the power (λ) to raise data to, to make it as close to normal as possible: λ = 1 no change, 0.5 square root, 0 logarithm, −1 reciprocal.

Common practice
6 steps
Used by Process Improvement Specialist

What it is

Box-Cox raises each value to a power λ (with λ = 0 meaning the logarithm) and chooses the λ that makes the data most normal.

When to use it

When skewed data needs to be used with tools that assume normal data, such as capability indices, t-tests or regression.

Why it works

Many tools assume normal data. A transformation lets you use them honestly on skewed data, such as times and costs.

Do

  • Transform limits and targets with the same λ.
  • Report results back on the original scale.

Don't

  • Forgetting to transform the limits as well.
  • Trusting the transformed model without checking it against reality.

Step by step

  1. Check data is positive
  2. Find λ
  3. Round it
  4. Transform and recheck
  5. Analyse
  6. Check against reality
Also called: Power transformation, log transformation, data transformationPrint the blank template ↗

Worked example

The situation. Repair costs (euros) for 50 jobs, strongly skewed.

  1. λ = 0.1, rounded to 0: take logs.

The result. On the log scale the costs were normal; capability was calculated on logs, with the limit transformed too.

Box-Cox worksheet Print blank
Common λTransfor­mation
1None
0.5Square root
0Logarithm
−0.51 ÷ square root
−1Reciprocal (1 ÷ y)

Filled in for: Repair costs (euros) for 50 jobs, strongly skewed.

ValueTran­sformed value

Copy this structure, or print the blank version and fill it in by hand. λ found ______ λ used ______ normality before ______ after ______

Before you use it: check these

CheckIf it fails
All values positiveAdd a constant first, and report it
Limits and targets transformed the same wayTransform them before comparing

How to do it with real data

The full calculation, as it happens in the story: the data, every step, how to read the result, and the spreadsheet functions to do it yourself.

Worked example with real data

Box-Cox: making skewed data usable

From Day 40: When the line bends of the Process Improvement Specialist story

The 60 waits are skewed. Augustin (Black Belt) shows how a Box-Cox transformation finds the power that makes them most symmetrical.

Step by step

  1. Box-Coxtries powers λ of the data (y to the power λ; λ = 0 means the logarithm) and picks the most normal
  2. Best λfound by the method= 0.015, so a log
  3. Transformlog of each wait
  4. Shape afterskewness 0.91 before, −0.02 after= tail gone
  5. Normality afterAnderson-Darling p about 0.01: whole-day values create ties= much closer, not perfect
  6. Use it: capabilitylog mean 2.152, log s 0.639; share over 7 = share of logs over ln 7 = 1.946= 63% predicted, 55% observed
RequestWait (days)
R0112
R0213
R0312
R0428
R0511
R0612
R0716
R087
R093
R104
R114
R1210
R134
R1417
R155
R168
R175
R185
R195
R2020
R213
R2215
R235
R249
R255
R265
R2715
R2815
R2914
R3013
R3118
R3216
R333
R345
R3510
R367
R376
R3810
R3910
R405
R415
R424
R435
R446
R457
R4611
R4711
R483
R4913
R5026
R5112
R5222
R5327
R5418
R554
R5614
R5720
R583
R596
R6019

How to read the result

The log removes the skew, which makes many tools usable. But the transformed model predicts 63% of waits over 7 days, while 55% actually are. Always check a transformed model against the real data.

What it led to

Report the observed share for capability. Use the log scale when a test or model needs normal data, and check its predictions against reality.

Do it in a spreadsheet

Log=LN(B2)
Skewness after=SKEW(C2:C61)
Share over 7 from the log model=1-NORM.DIST(LN(7),AVERAGE(C2:C61),STDEV.S(C2:C61),TRUE)
Try it yourself: What does λ = 0.5 mean, and when would Box-Cox choose it?

The square root. Box-Cox picks it when the data is moderately skewed, such as counts; λ = 1 means no change is needed.

In the roles

How a Process Improvement Specialist uses it

Waits: λ = 0.015, so a log. Skew falls from 0.91 to 0; the log model predicts 63% over 7 days against 55% observed.

Questions people ask

Is a transformation cheating?

No, if chosen for the data's shape and checked against reality. It just changes the scale.

Related techniques

← All techniques and tools