Distributions and heavy tails

Power-law scaling relations and log-binned means

When two positive observables track each other across several orders of magnitude—such as event dissipated energy E against stress drop or size S, fracture velocity against burst duration, or cluster mass against radius—a power-law scaling relation writes E=ASγ. Fitting that exponent in log–log coordinates requires deciding whether every individual observation carries equal weight or whether conditional means across uniform log10S decades should anchor the line.

Updated · 7 min read

On this page
  1. When a power-law scaling relation applies
  2. How log-log regression weights raw clouds vs log-binned means
  3. Choosing between raw pairs, log-binned means, and range cutoffs
  4. What log-log R² does and does not prove
  5. Running Scaling Relation in Autoplot
  6. Frequently asked questions

When a power-law scaling relation applies

Unlike univariate tail analysis, which models how frequently events of size S occur (P(S)∼S−τ), a scaling relation describes how one positive observable E scales conditionally with a paired observable S measured on the same event:

E=ASγ

Taking base-10 logarithms turns the power law into an affine relation with slope γ and intercept log10A:

log10E=log10A+γlog10S

Across scientific fields, power-law scaling relations capture how two positive observables co-vary across decades—from allometric metabolic rate versus body mass in biology (West, Brown, and Enquist, 1997) to avalanche size, energy, and duration in crackling-noise systems (Sethna, Dahmen, and Myers, 2001). Together with finite-size scaling and data collapse, scaling relations give complementary checks: data collapse tests whether size-indexed distributions share one universal scaling function, whereas a scaling relation directly quantifies the power-law dependence between paired observables within events.

Notice also how the error structure affects regression choice: Xiao et al. (2011) show that ordinary least squares in log10-log10 coordinates is well matched when fluctuations around E=ASγ are multiplicative (lognormal scatter in E at fixed S), whereas arithmetic errors require nonlinear regression on untransformed variables in how to fit a curve to data. Always verify that both columns span two to three decades, remain strictly positive where scaling holds, and stay row-aligned event by event.

How log-log regression weights raw clouds vs log-binned means

Autoplot's Scaling Relation engine turns paired observables (Si,Ei) into an ordinary least-squares fit in base-10 log coordinates:

  1. Filter positive row-aligned pairs: keep only rows where both Si>0 and Ei>0, then transform to log coordinates xi=log10Si and yi=log10Ei.
  2. Optionally aggregate into uniform log10S bins: when binning is enabled (Do Binning), divide [minxi,maxxi] into nbins equal-width intervals [eb,eb+1). For each non-empty bin, compute the linear midpoint cb=(eb+eb+1)/2 and conditional mean log response y¯b=1mb∑i∈byi along with the within-bin spread sb. Unlike density estimates in log binning, conditional means are not divided by bin width because E is an event observable rather than a probability density.
  3. Apply optional range cutoffs after binning: if lower or upper bounds (log₁₀ sMin, log₁₀ sMax) are provided, filter the active fit points (non-empty bin centers cb when binning is active, or raw pairs xi otherwise) to log10smin≤x≤log10smax, requiring at least n≥2 points.
  4. Fit unweighted OLS and slope error: minimize ∑j=1n(yj−(γxj+b))2 over the retained points (xj,yj) to compute slope γ, prefactor A=10b, coefficient of determination R2 in log10 space, and (for n>2) the OLS standard error of the slope: SE(γ)=MSE/Sxx where Sxx=∑j=1n(xj−x¯)2 and MSE=1n−2∑j=1n(yj−yˆj)2.
Autoplot E-S scaling layer card named Cloud + binned..., showing Source (event_size / event_energy), closed Range & binning (24 bins), and expanded Mark & stroke with independent Cloud (#0433FF circle) and Binned (#FF2600 diamond) styling controls and Y offset 0.0
Autoplot's Scaling Relation card keeps variable pairing, log10 binning and range controls, and separate cloud vs binned-mean markers cleanly separated.

Choosing between raw pairs, log-binned means, and range cutoffs

Because heavy-tailed observables pack orders of magnitude more points at small S than at large S, raw regression and binned-mean regression answer slightly different weighting questions:

Regression setupWhat drives the slope γWatch out for
Raw positive pairs (Binning unchecked)Every observed pair (Si,Ei) carries weight 1/nWhen S follows a heavy tail, dense low-S noise dominates and large rare events barely move γ
Equal-width log10S bin means (Binning checked)Every non-empty log10S bin carries weight 1/nbinsSparse upper bins containing only 1–2 events get equal leverage to dense lower bins
Narrower log₁₀ sMin / log₁₀ sMax windowIsolates an intermediate inertial range free of threshold rolloffOver-trimming noisy ends manufactures artificially clean lines; report bounds alongside γ
Comparing raw vs binned fits on the same dataChecks whether scatter is symmetric around a single global slopeLarge divergence between raw γ and binned γ flags curvature, heteroscedastic spread, or asymmetric tails

On a heavy-tailed synthetic ensemble of 1,500 paired (S,E) events (γtrue=1.38, A=0.65, multiplicative scatter σlogE=0.16) in Autoplot, both methods recover the underlying slope consistently (γ=1.367±0.006 raw vs γ=1.364±0.008 across 24 log bins), while raw point scatter keeps unbinned R2=0.9737 whereas bin-averaging lifts binned R2 to 0.9993.

Autoplot X&Y Plot displaying 1,500 synthetic log10(S) vs log10(E) raw cloud points in translucent blue, 24 red diamond log-binned means, and a dashed E = A S^gamma fit line alongside Figure Inspector Results showing gamma 1.364 ± 0.008, A 6.78e-01, r2 0.9993, nPoints 24, sRange 1.588 .. 2386, binned 24 bins
Raw event cloud (blue circles) density drops steeply toward large S; 24 uniform log10(S) bin means (red diamonds) prevent small-event crowding from concealing high-decade alignment.

What log-log R² does and does not prove

A linear regression line across three or more orders of magnitude will look impressive under R2 even when a true physical power law fails. Three checks keep a scaling exponent defensible:

  1. Do not confuse log-space R2 with a scaling-law proof: r2 is evaluated directly on (log10S,log10E) residuals—and on bin means when binning is checked—so averaging out within-bin variance can push R2 above 0.99 even when raw points scatter widely or curve gently.
  2. Audit systematic curvature across decades: compare binned means against the fitted line visually and inspect local deviations as described in how to interpret residual plots. Consistent S-shaped bowing across bins points to crossover scales or non-power-law behavior rather than random error.
  3. Run cutoff and bin-count sensitivity sweeps: re-run with nearby Bins counts (for example 16, 24, 36) and plausible log₁₀ sMin/log₁₀ sMax boundaries, and verify univariate tail behavior first using how to fit a power law to data. Note also that log-log OLS optimizes errors in log10E assuming exact S; errors-in-variables attenuation occurs if S itself carries large measurement noise.
In Autoplot

Running Scaling Relation in Autoplot

Autoplot's Scaling Relation layer (Run Analysis → Scaling Relation in an X&Y Plot figure, Plus) computes row filtering, optional log10S binning, and log–log regression locally on your Mac:

  • Paired variables (Source): select row-aligned numeric columns S and E (>= 2 paired rows; rows with S≤0 or E≤0 are dropped before taking log10).
  • Binning and domain bounds (Range & binning): toggle Binning, set Bins (1–1000), and optionally restrict the fit window in base-10 log units using log₁₀ sMin and log₁₀ sMax (applied after binning, falling back to raw pairs if <= 1 non-empty bin exists).
  • Plot styling and results (Mark & stroke, Figure Inspector → Results): customize the fit line (Color, Stroke, Width) independently from Cloud (display cloud sampled up to 5,000 positive raw rows) and Binned (Cloud color/size vs Binned color/size), click the orange gear button, and inspect gamma, A, r2, nPoints, sRange, and binned count in Figure Inspector → Results (E‑S Scaling). Autoplot computes OLS log-space R² and slope standard error directly; run custom weighted fits or residual normality diagnostics separately if needed.

See features and pricing.

Frequently asked questions

Frequently asked questions
Why do unbinned and log-binned fits give different γ or R² on the same dataset?Raw OLS weights every (S, E) row equally, so a heavily skewed sample size distribution concentrates leverage near small S. Checking Binning averages log10E inside uniform log10S bins first so each decade contributes evenly, and removing within-bin scatter increases binned R2 relative to raw-cloud R2.
Should I enter natural numbers or base-10 logarithms in log₁₀ sMin and log₁₀ sMax?Enter base-10 logarithms of your variable S (for example 1.0 for S=10, 3.0 for S=1000). Autoplot converts both bounds via 10value and filters the binned centers (or raw points when unbinned) to lie inside [sMin, sMax].
What happens if one of my variables contains zeros or negative values?Scaling Relation keeps only paired rows where both S>0 and E>0; zero or negative entries are omitted before taking log10. If zeros or negative values carry signal rather than invalid rows, fit on linear axes in how to fit a curve to data instead.
Does Autoplot plot residual diagnostics or curvature tests for Scaling Relation automatically?No. Autoplot displays the raw cloud, optional binned means, fitted power-law line, and scalar summary metrics (gamma ± SE, A, log-space r2, nPoints, sRange, binned count) under Figure Inspector → Results. Check curvature visually against the plotted binned means and run formal weighted or residual checks across varying Bins and log₁₀ sMin/sMax cutoffs.

Sources

Algorithm details (es_scaling_fit positive filtering, left-closed right-open log10S bins, post-binning range filter, manual OLS slope standard error, and log-space r2) and UI labels (Source, Range & binning, Mark & stroke, Label & legend, E‑S Scaling results block) were verified directly against Autoplot's Python engine (math_logic.py), ESScalingFitCardEditor, and live Autoplot 2.1.1 captures on 18 November 2026. Cross-disciplinary scaling examples and log-transformation regression trade-offs draw on G. B. West, J. H. Brown, and B. J. Enquist, "A General Model for the Origin of Allometric Scaling Laws in Biology," *Science* 276(5309), 122–126 (1997), DOI `10.1126/science.276.5309.122`; J. P. Sethna, K. A. Dahmen, and C. R. Myers, "Crackling noise," *Nature* 410, 242–250 (2001), DOI `10.1038/35065675`; and X. Xiao, E. P. White, M. B. Hooten, and S. L. Durham, "On the use of log-transformation vs. nonlinear regression for analyzing biological power laws," *Ecology* (2011), DOI `10.1890/11-0538.1`.

Try it on your own data.

Autoplot's Scaling Relation card pairs positive (S, E) columns, compares raw clouds against equal-width log10(S) bin means, and fits γ, A, and log-space R² locally on your Mac. Part of Plus (free for 30 days).

Run finite-size scaling →
Download free for Mac

Apple silicon · macOS 15 or later · Free plan · Plus free for 30 days

Send to my Mac

Autoplot runs on a Mac. Send the link to yourself, or open it in the Mac App Store.