3
$\begingroup$

Suppose a variable is transformed, and a statistical test is applied to the transformed variable. Do the results of the test (specifically, p-value) apply to the original variable?

For example, suppose I have a variable which does not appear normal - but it does appear normal after log-transformation. So I apply log to the variable, and perform a statistical test (for example a t-test, or an Anova with a post-hoc test).

If the statistical test gives a pvalue < 0.05 can I declare that the original variable is statistically significant between conditions?

If the answer is yes, then why so? If the answer is no, then what is the use of data transformation?

$\endgroup$
2
  • $\begingroup$ What is the use of data transformation? is a good question -- with many answers here. $\endgroup$
    – Nick Cox
    Commented Mar 28, 2021 at 15:32
  • $\begingroup$ Answers here will depend on the context, can you provide some? $\endgroup$ Commented Mar 30, 2021 at 16:43

1 Answer 1

3
$\begingroup$

If the statistical test gives a $p$ value < 0.05 can I declare that the original variable is statistically significant between conditions?

No.

Assuming you are using a linear regression model, and you log-transformed the predictor (although the same applies when you log-transformed the response): the $p$ value tests the null hypothesis of no linear association between predictor and response. With a $p$ value < 0.05 (assuming an $\alpha$ level of 0.05) you would reject the null hypothesis of no linear association. If you have log-transformed the original predictor variable, then you would thus reject the null hypothesis of no linear association between the log-transformed predictor and the response. This tells us little if anything about the statistical significance of a linear association between the original predictor and the response.

The answer to your question would be yes only for linear transformations of the predictor (and/or response). Then you would obtain the exact same $p$ value before and after transformations.

Transformation of the predictor(s) can be helpful, for example, if you do not expect a linear association between the original predictor and response, but a different shape of association. This is the underlying idea of generalized additive models. Note that linear regression with normally distributed errors does not assume the response variable to be normally distributed; only the residuals. Transforming the response might complicate interpretability of the resulting model, and might not be necessary.

$\endgroup$
6
  • 2
    $\begingroup$ This omits an important case. Results based on ranks of original data and on ranks of monotonically transformed data are the same, as the ranks are the same. This may seem trivially obvious, but I've seen questions on CV about whether that is true. $\endgroup$
    – Nick Cox
    Commented Mar 28, 2021 at 15:07
  • $\begingroup$ @NickCox True. That's why I specified 'assuming you are using a linear regression model'. As the question referred to a variable that did not appear to follow a normal distribution, as well as ANOVA and t-tests, I assumed this is not about computing rank correlations. $\endgroup$ Commented Mar 28, 2021 at 15:14
  • 1
    $\begingroup$ Indeed, but the question made no such restriction. And you generalised beyond linear models in your last paragraph, which was fine, but inevitably not comprehensive. $\endgroup$
    – Nick Cox
    Commented Mar 28, 2021 at 15:31
  • 1
    $\begingroup$ @nickcox I agree. I am making some assumptions pending further info; will leave it to question asker if this is helpful or not. $\endgroup$ Commented Mar 28, 2021 at 15:47
  • $\begingroup$ The answer could still need some reservations, for instance for a two groups t-test of null of no difference in means, a log transformation (of both groups) would (at least approximately) preserve that hypothesis. Exactly if the null is identical distributions. $\endgroup$ Commented Mar 30, 2021 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.