Box-Cox Transformation Explorer

Find optimal transformations to normalize skewed data

Input Data

Enter positive numeric data (one value per line or comma-separated)

Help

How to Use
  1. Enter positive numeric data (Box-Cox requires positive values)
  2. Or generate sample skewed data for demonstration
  3. Click "Find Optimal Lambda" to calculate the best transformation
  4. Use the slider to manually explore different lambda values
  5. Compare before/after distributions and Q-Q plots
  6. Use common lambda buttons for standard transformations
Understanding Lambda (λ)
  • λ = 2: Square transformation (y²)
  • λ = 1: No transformation (y)
  • λ = 0.5: Square root transformation (√y)
  • λ = 0: Natural log transformation (ln(y))
  • λ = -1: Inverse transformation (1/y)
  • Other values: Power transformations (y^λ)
Box-Cox Formula

The Box-Cox transformation is defined as:

  • If λ ≠ 0: y(λ) = (y^λ - 1) / λ
  • If λ = 0: y(λ) = ln(y)

The optimal λ is found by maximizing the log-likelihood function.

When to Use Box-Cox
  • Data is positively skewed (long right tail)
  • Need to meet normality assumptions for statistical tests
  • Want to stabilize variance across groups
  • Preparing data for linear regression
  • All values must be positive (add constant if needed)