Why Back-Transforming Summaries Matters
Log transformations can make a strongly right-skewed group easier to describe or compare. But a summary such as a median of 2.4 on the log scale is not a median of 2.4 in the original measurement units. To communicate what that summary means in context, it is often useful to convert it back to the scale on which the observations were measured.
The conversion is straightforward: undo the logarithm. The interpretation still requires care. Back-transform each quartile or median separately, use the correct units, and do not treat a difference between log-scale summaries as if it were a difference in original units.
The observations must be positive to take their logarithms. Also, the logarithm must refer to the numerical value measured in a stated unit. For example, if a cost is recorded in dollars, the transformed value is the logarithm of its numerical amount in dollars; changing the unit to cents changes the numerical log values. When back-transforming, keep the original unit consistent with the one used to define the transformation.
Back-Transform Each Quartile Separately
The first quartile \(Q_1\), median \(Q_2\), and third quartile \(Q_3\) mark the 25th, 50th, and 75th percentiles, respectively. If these summaries were calculated on the natural-log scale, back-transform each one by exponentiating it. The converted quartiles are on the original scale and can be reported with the original units.
These converted values give cut points in the original measurement scale. For example, a converted median of 8 milligrams per liter says that the median cut point is 8 milligrams per liter, not 2.08 or some other value obtained by treating the logged median as though it were already in milligrams per liter. The converted quartiles also let us calculate the original-scale interquartile range by subtracting the converted lower quartile from the converted upper quartile.
Worked Example: Converting Three Log-Scale Quartiles
Suppose a hypothetical group of positive concentration measurements, recorded in milligrams per liter, has natural-log quartiles \(Q_{1,Z}=1.1\), \(Q_{2,Z}=1.7\), and \(Q_{3,Z}=2.2\). Assume the logged summaries were calculated from values measured in milligrams per liter. Find and interpret the back-transformed quartiles.
The observations are positive, so their natural logarithms are defined. Exponentiating the three summaries reverses the natural-log transformation:
The approximate quartiles are 3.004, 5.474, and 9.025 milligrams per liter. About one quarter of the measurements are at or below the first-quartile cut point, the median is about 5.474 milligrams per liter, and about three quarters are at or below the third-quartile cut point. The middle half of the group lies between the first and third quartiles, subject to the usual conventions for quartiles and tied values.
The original-scale interquartile range is found using the converted quartiles:
This is an original-scale spread in milligrams per liter. It is not obtained by exponentiating the difference \(2.2-1.1\) and then calling the result an interquartile range.
Why Exponentiating Gives the Corresponding Quantiles
The reason the conversion works is that the exponential function is strictly increasing: if \(z_1<z_2\), then \(e^{z_1}<e^{z_2}\). Therefore, taking logarithms does not change the order of positive observations. The smallest observation remains the smallest after logging, the next-smallest remains the next-smallest, and so on. Exponentiating a cut point returns it to the corresponding original-scale cut point when the same quantile definition is used.
For population quantiles, this can be shown directly. Define the \(p\)-quantile of \(Y\) by \(Q_Y(p)=\inf\{y:F_Y(y)\ge p\}\), where \(F_Y(y)=P(Y\le y)\). For \(Z=\ln(Y)\), the event \(Z\le z\) is exactly the event \(Y\le e^z\). Thus \(F_Z(z)=F_Y(e^z)\), so the \(p\)-quantile on the log scale corresponds, after exponentiation, to the \(p\)-quantile on the original scale:
This result assumes the quantiles are defined consistently, as in the population definition above. Sample software may use interpolation rules to estimate quartiles. Because exponentiation is nonlinear, a quartile calculated by interpolating between logged observations and then exponentiating need not equal a quartile calculated by interpolating between the original observations. Report which scale the summaries were calculated on when that distinction matters.
Sample Medians Need a Convention Check
For an odd-sized sample, the sample median is the middle ordered observation. Since logging preserves order, exponentiating that middle observation’s log returns the original middle observation. For an even-sized sample, a common convention is to define the sample median as the arithmetic mean of the two middle observations. Applying that convention after logging and then exponentiating does not, in general, give the arithmetic mean of the two original observations.
Worked Example: An Even-Sized Sample Median
Consider the hypothetical positive observations 2 and 8 units. Their conventional original-scale sample median is the arithmetic mean of the two values:
On the natural-log scale, the two observations are \(\ln(2)\) and \(\ln(8)\). The log-scale sample median, defined as the average of the two middle logged values, is
Back-transforming gives \(e^{\ln(4)}=4\) units, not the conventional original-scale median of 5 units. The back-transformed log-scale median is the geometric mean of these two middle observations; the conventional original-scale median is their arithmetic mean. Therefore, state how a sample median was calculated when an exact match between scales is important. For population quantiles, or sample quantiles defined by corresponding order positions without this arithmetic-averaging issue, the monotone-quantile result applies directly.
Differences on the Log Scale Are Not Original-Unit Differences
A log-scale median is a transformed quantity. Subtracting two log-scale medians gives a difference in log units, not a difference in dollars, minutes, concentration units, or any other original measurement unit. To report an absolute difference between two back-transformed medians, first exponentiate each median and then subtract the resulting original-scale values.
A difference between natural-log values can also be interpreted through a ratio: if two log-scale summaries differ by \(d\), their back-transformed values have ratio \(e^d\). This is not the same as saying that the original values differ by \(d\) units.
Worked Example: Comparing Two Back-Transformed Medians
Suppose two hypothetical groups have natural-log medians of 3.1 and 2.8, with the original measurement recorded in dollars. Assume both groups used the same positive-dollar measurement convention and the same natural-log transformation. Back-transform the medians and find their original-scale difference.
The back-transformed medians are approximately
Calculate the difference before rounding the individual values:
The back-transformed medians are about \$22.20 and \$16.44, and their difference is about \$5.75. The log-scale difference is \(3.1-2.8=0.3\), which is not a difference of \$0.30. Instead, the ratio of the back-transformed medians is \(e^{0.3}\approx1.350\), so the first back-transformed median is about 1.35 times the second. Subtracting only the displayed rounded medians gives \$22.20-\$16.44=\$5.76; that is an approximation based on rounded values, not the difference calculated from the unrounded back-transformed medians.
Do Not Exponentiate the Log-Scale IQR to Get an IQR
The interquartile range on the log scale is \(Q_{3,Z}-Q_{1,Z}\). Exponentiating this difference gives \(e^{Q_{3,Z}-Q_{1,Z}}=Q_{3,Y}/Q_{1,Y}\), a ratio of quartiles. The original-scale interquartile range is instead \(Q_{3,Y}-Q_{1,Y}\), a difference measured in the original units. These are different summaries and answer different questions.
Worked Example: Converting Quartiles Before Finding the IQR
Suppose a hypothetical group has natural-log quartiles \(\ln(6)\), \(\ln(10)\), and \(\ln(18)\), for measurements in a stated original unit. The values are positive, and the same unit was used when taking all three logarithms. Back-transform each quartile:
The original-scale IQR is \(18-6=12\) original units. By contrast, the log-scale IQR is \(\ln(18)-\ln(6)=\ln(3)\). Exponentiating it gives \(e^{\ln(3)}=3\), which is the ratio \(18/6\), not the original-scale IQR of 12 units.
A Reliable Back-Transformation Procedure
Before reporting converted summaries, check the measurement scale, the transformation, and the arithmetic. A compact process helps prevent scale and interpretation errors.
Check that the observations are positive, identify the log base, and identify the original measurement unit used when taking the logarithm.
For natural logs, calculate \(e^{Q_1}\), \(e^{Q_2}\), and \(e^{Q_3}\) separately; for another log base, use its corresponding inverse.
Subtract the back-transformed quartiles to obtain the original-scale IQR, or subtract the back-transformed group medians to obtain their original-unit difference.
State the converted values and their units, and identify them as summaries obtained by back-transforming the log-scale summaries.
Common Mistakes
- Reporting a log-scale summary as an original-scale value. A median of 2.4 on the natural-log scale is not a median of 2.4 original units. Apply the exponential function before interpreting it in original units.
- Calling a log-scale difference an original-unit difference. A difference of 0.3 between natural-log medians is 0.3 log units; it is not a difference of 0.3 dollars or other measurement units. Back-transform the medians before finding their absolute difference.
- Exponentiating the log-scale IQR and calling it the original IQR. This gives the ratio \(Q_{3,Y}/Q_{1,Y}\). The original-scale IQR is \(Q_{3,Y}-Q_{1,Y}\).
- Assuming every sample median convention behaves identically under transformation. With an even sample and the arithmetic-mean convention, averaging the logged middle observations and then exponentiating does not generally produce the arithmetic mean of the original middle observations.
- Rounding too early. Calculate a difference using unrounded back-transformed values, then round the result. If you subtract displayed rounded summaries instead, label the result as an approximation based on those rounded values.
Check Your Understanding
For each question, pay attention to the scale and the units.
- A natural-log median is 1.5 for positive measurements recorded in centimeters. What calculation gives its back-transformed value, and what units should the result have?
- Log-scale quartiles are \(\ln(4)\) and \(\ln(15)\). Find the original-scale IQR and explain why exponentiating their difference does not give that IQR.
- Two groups have natural-log medians that differ by 0.2. Is their difference in original units 0.2? What does the log-scale difference imply about the ratio of their back-transformed medians?
- For an even sample, explain why the exponential of the average of the two middle logged values can differ from the conventional sample median calculated on the original scale.
- A report gives a back-transformed median of 12.4 units. Write a sentence that identifies this as a median summary without claiming that the log-scale median itself was 12.4 units.