1. Right-skewed distributions

Income, wealth, city populations, firm sizes — these distributions all share a long right tail of very large values. The tail pulls the mean far above the median and makes the histogram unreadable. A log transformation rescales the data so that multiplicative differences become additive, and a lognormal distribution becomes a clean, symmetric bell.

How to read the pictures below. We simulate the income of n households. Each blue dot is one household; its position on the x-axis is that household's income. The small vertical scatter has no meaning — it just keeps dots from piling up on top of each other. Where the dots cluster densely, many households earn near that income; where the dots are sparse, few households do. The solid red line marks the mean; the dashed green line marks the median. When the two lines sit on top of each other, the distribution is symmetric; when the red line sits to the right of the green line, the distribution is right-skewed.
Higher μ shifts the whole distribution to higher incomes.
Higher σ means more inequality and a heavier right tail.
Start small to see individual households; slide right for a denser cloud.
Log base
Quick scenarios

Every household as a dot

Raw income, x ~ Lognormal(μ, σ). Each dot is one household. Notice how the dots cluster densely at low incomes but spread out into a sparse tail of high earners on the right — that long tail pulls the mean (red) far above the median (green).

On the raw scale the dots cluster on the left and spread into a long sparse tail to the right; the mean line sits well above the median line.

Log income, log(x). Same households, plotted on a log scale. The cluster is now roughly symmetric, and the mean and median lines sit on top of each other.

On the log scale the cloud of dots is roughly symmetric and the mean and median lines essentially coincide.

The same households, summarized as a box plot

How to read a box plot. The shaded box covers the middle 50% of households (from the 25th percentile, Q1, to the 75th percentile, Q3). The vertical line inside the box is the median. The thin whiskers reach out to the typical range (Tukey's rule: 1.5 × the box width). Any household beyond the whiskers shows up as an individual red dot — those are the outliers per the rule. For a right-skewed distribution, look for: median sitting low in the box, an upper whisker much longer than the lower whisker, and upper outlier dots.
Raw scale. The classic signature of right-skewness: median line low in the box, long upper whisker, and several upper outlier dots in red.
Log scale. A symmetric box: median in the middle, whiskers of roughly equal length, and few or no outlier dots.
StatisticRaw scaleLog scale
Mean
Median
Mean − median gap
Sample skewness

Takeaway

A right-skewed lognormal becomes a symmetric bell on the log scale. Mean and median coincide; skewness collapses to ≈ 0. This is why log-income, log-wealth, and log-population are the standard objects of analysis whenever the underlying quantity is multiplicative.

2. Outliers and the mean–median gap

When a distribution is right-skewed because of outliers, the mean is pulled above the median by those extreme values: the median barely notices an outlier, but every extreme observation drags the mean up. (This is why news outlets report median household income, not mean.) A log transformation compresses the upper tail and reduces the influence of those outliers, so the distribution becomes more nearly normal and the mean and median move back together. The shrinking gap between them is the visible signature that the transformation worked.

The chain to watch: symmetric bulk → inject outliers → mean > median (right-skew) → apply log → mean ≈ median (approximately normal again). Drag the "number of outliers" slider and watch the mean line slide away from the median line on the raw histogram, while staying put on the log histogram.
Start narrow so injected outliers stand out.
Small samples make individual outliers easy to spot.
Watch the mean line move on the raw histogram.
Inject on
 

Where does each household sit? Where are the mean and median?

Raw scale. Each dot is one household at its raw value. With outliers = 0 the dots form a tight cluster and the mean (red) sits on top of the median (green). As you inject outliers, isolated dots appear far to the right and pull the mean line away from the median.
Log scale. Same households, plotted with ln(value) on the x-axis. The injected outliers — same dots — sit much closer to the bulk on this scale, so the mean line barely shifts and stays on top of the median.

The outlier rule — which households does it flag?

How the outlier rule works. We draw the same households as dots, but now we color each one according to a standard rule. The faint shaded rectangle marks the typical range: it covers the middle 50% of the sample, stretched outward by 1.5 box-widths on each side (this is Tukey's 1.5 × IQR rule). Two dashed gray lines mark the edges. Households whose value sits inside the typical range are small blue dots; any household that falls outside is a larger red dot — that is the household the rule flags as an outlier. To compare scales, just count the red dots.
Raw scale. As you inject outliers, dots that previously sat inside the typical range push way to the right and turn red. The typical range itself barely moves, because its width is set by the bulk's quartiles.
Log scale. Most of the dots that were red on the raw scale are now blue — the log transformation has pulled them back inside the typical range. Far fewer households get flagged.

The same households, summarized as a box plot

The same box-plot convention as Section 1: the shaded box covers the middle 50% of households, the line inside is the median, and red dots beyond the whiskers are the outliers per Tukey's rule. Watch the box stay anchored on the bulk while red outlier dots stretch out as you inject outliers.

Raw scale. With outliers injected, the box stays small (Q1 and Q3 hardly budge with a few extreme values added to ~100 households), and red dots stretch far to the right beyond the upper whisker.
Log scale. The box opens up and the red outlier dots, though still flagged, sit much closer to the upper whisker — the log transformation has compressed the extremes.
Headline — mean vs medianRaw scaleLog scale
Mean
Median
Mean − median gap
Companion diagnosticsRaw scaleLog scale
Sample skewness
Outliers (Tukey 1.5·IQR rule)
Spread of the sample

Takeaway

When a distribution is right-skewed because of outliers, the mean is dragged above the median. The log transformation compresses the upper tail and reduces the influence of those outliers, so the distribution becomes approximately normal and the mean and median move back together. The shrinking mean–median gap is the diagnostic that the transformation worked. Caveats: the transformation is asymmetric, so very small values close to zero can become more extreme on the log scale; and log(0) is undefined — use log1p or filter zeros before transforming.

3. The hockey stick: log of a time series

U.S. GDP per capita over the last two centuries looks like a hockey stick on a linear axis: nearly flat for a hundred years, then sharply curving up. That shape is misleading — the country has been growing at roughly the same percentage each year. On a log axis, constant percentage growth is a straight line. The slope of log-GDP is the continuous growth rate, and the stability of that slope tells you whether the growth rate itself is steady or shifting.

A subtle distinction: in sections 1 and 2 we transform the data (we compute log(x) and histogram the result). Here we keep the data in dollars and transform the axis (yaxis.type = "log") — so hover values stay readable as currency. For a strictly positive series the picture is the same either way.
Y-axis scale
Countries
Overlays
GDP per capita (2011 US$, Maddison Project Database 2020)

CountryAnnualized growth (1820–2020)R² of log-linear fit

Takeaway

On a linear axis, a hockey stick can mean either an exploding growth rate or a steady percentage rate that just compounds for long enough. The log axis disambiguates: a straight line means a stable growth rate, and the slope itself is that rate. When the line bends, the rate is changing — Argentina bends downward (the divergence story), Japan bends from very steep catch-up to flat (post-1990 stagnation), the United States stays remarkably straight.