# Interpreting test results on log-transformed data

I have data that is not normally distributed. I can log-transform it to be normally distributed, and then perform, for example, a t-test.

But how do I interpret the results of the t-test?

Do I have to transform back the p-value, before I can say that the difference between the two means is significant? Anything else I need to do? Or can I just take the results and interpret them as if the test was performed on the original data? I'm confused about this.

The data comes from a device that measures force in Newton and is ratio scaled.

• Exponents for values in [0,1] range are always >1, while probabilities should fit the [0, 1] range, so the answer for you second question is simple: you cannot transform p-values like this. – Tim Jul 28 '15 at 10:27
• Is this RTs? Also, hey what :) – jona Jul 28 '15 at 13:11
• You don't have to untransform anything as you would in a regression model. In order to interpret the result as is, you should consider checking for further normality conditions after logarithmising as well as applying a nonparametric test on the untransformed variables (e.g. Wilcoxon rank sum). – Digio Jul 28 '15 at 13:14
• Consider ordinal regression instead. There is an r package "ordinal" which I've used before. – jona Jul 28 '15 at 13:25
• @gung and jona, I'm sorry, I confused two data sets, this data here is not from Likert scales. See my edit. – user14650 Jul 28 '15 at 19:06

If the logs of the data are really drawn from normally distributed populations with constant variance (but possibly different means), then the original data must have come from lognormal distributions with possibly different scales (due to differences in $\mu$, where adding something to the means on the log-scale has a multiplying effect on the original scale), and hence those populations will also differ in mean.

So a difference in population mean on the log scale will (if the other assumptions of the usual two-sample equal-variance t-test apply) imply a change in mean on the original (untransformed) scale.

You can convert the estimated size of difference on the log scale to a percentage increase on the original scale, and the ends of a confidence interval carry back as well.

So imagine you have an estimated difference in means of about 0.7 ($\hat{\delta}=\hat{\mu}_1-\hat{\mu}_2=0.7$) and (say) a 90% confidence interval for the difference in means of $(0.62, 0.78)$. then the ratio of means of the original populations is estimated to be $\exp(0.7)\approx 2.014$ (i.e. the first group has a mean about twice the size of the second group), and the 90% CI for the ratio of means would be $(e^{0.62}, e^{0.78})\approx (1.86,2.18)$.

Note that p-values carry over directly; we're still performing inference on the parameter $\mu$ (the mean on the log scale).

• Thank you, but how do I interpret the extent or size of the difference? If my test on the transformed data shows a significant difference to a certain alpha (e.g. 0.995), can I assume that the difference between the untransformed means has the same significance, or is it higher or lower? – user14650 Jul 28 '15 at 19:02
• The p-value would be the same either way. However, the phrasing of your question betrays two different misunderstandings. Nobody has an alpha of 0.995. The symbol "alpha" is used to represent the significance level, the type I error rate (something you choose before you even see data). It's always a small number (0.05 is common). However, when you say "the same significance" you seem to be talking about p-values, not alpha. For a p-value to be significant it must be lower than alpha (you might mean a p-value of 0.005, not 0.995). – Glen_b Jul 29 '15 at 1:49
• However, the p-value doesn't directly tell you anything about the size of the difference which is something else again. I'll add some text to my answer. – Glen_b Jul 29 '15 at 1:50
• 0.995 looks like it might be a confidence level, which is the complement of the significance level. If so, the corresponding alpha would be 0.005. – A. Donda Jul 29 '15 at 2:01
• A very clear explanation of how confidence intervals on log-transformed data can be interpreted in terms of ratios of geometric means can be found here. – David Lane May 29 '17 at 3:14

You're on the right track. You can definitely run a t-test on log-transformed data if it's well-behaved after transformation, and it definitely affects how you interpret your results. In short, you can't make statements about the difference of the means because the mean(log(x)) is not the same as the log(mean(x)) -- the means don't transform well. If you're okay with stating a difference in terms of log-transformed means (i.e. richter scale), then you can definitely do that and just state your results in log(mean) terms. Otherwise, your t-test results will be in tearms of medians, because medians are preserved over a log transformation.

If the data are very normal distributions after a log transform, mean(x) is roughly equal to median(x), and the median(log(x)) is the same as log(median(x)).

Thanks to the log property that allows you to coalesce differences of logs into a log of a ratio

(log(X/Y) = log(X) - log(Y))


you can make statements about the difference in log(medians). You can also can back-transform the CI values back into original units and make a statement about the ratio of the medians with no log() attached. Median is a good measure of center in well-behaved, normally distributed data, so your statistical inference should stand.

Here are the steps:

1.  Transform the data (log(x) where x is an array of data in this case)
2.  Perform your t-test if your transformed data meet the assumptions of the t-test.  Check for:
a. departure from normality
b. significantly differing standard deviations
c. lack of independence.
3.  Your CI values will now be in terms of ln(median(X)/median(Y)).
You can back-transform by taking the e-to-the-power-of(confidence interval values)...
This is sometimes written as EXP(<values>).
4.  Now you've gotten rid of your ln(Mx/My) problem,
but your confidence interval is still in terms of the RATIO of medians.
5.  Your p-value will still stand without transformation.
6.  State your conclusions in terms of ratio of medians.
Example:  "The median values of x and y are not the same.
We are 95% confident that X's median is between <lowerCI> and <higherCI> times that of Group B."
(because we're still talking median ratio).


This is a bit clunky, so you can also talk in percentages, like "we are 95% confident that X's median is between and that of group Y"

note: I was reading The Statistical Sleuth 3rd Ed and reviewing slides from SMU Data Science Masters course while I wrote this, so credit where credit is due.

• If the populations variances are indeed equal on the log scale (as already assumed) then the ratio of population means is identical to the ratio of population medians. – Glen_b May 29 '17 at 3:50