# Tests for lognormal distribution

I have some data in the following manner. 10 3 4 5 6 9 ...

I have to check that the difference between returns is log normal by doing ln(return/previous return).

I know some tests for normality if i do (return - previous return) such as chi square test, kolmogorov-smirnov test, qq test.

I was wondering if there are any similar tests for the lognormal, or perhaps if I could apply the normality tests in the same way

• could you do a test for normality on the log of the data? If the data is lognormal the log of the data should be normal. Jan 26, 2015 at 1:49
• @MHH: So it is theoretically accurate to do normality tests on the log of the data, if that is what I am understanding from your comment
– Jim
Jan 26, 2015 at 1:50
• Commandment 1 in statistics is "always plot your data". I would probably plot the data and the log transformed data before doing any tests. Do QQ plots, histograms etc; statistical tests for normality have their pitfalls. I can't think of any reason why log tansformed lognormal data would cause any extra problems on top of the problems that many of the normal tests have with normal data. Jan 26, 2015 at 2:04
• Check the following threads, all of which contain relevant information: 1. hypothesis testing - what's the point if you can't accept 2. What tests do I use to confirm residuals are normally distributed? 3. Is normality testing essentially useless? ... (ctd) Jan 26, 2015 at 7:20
• Jan 26, 2015 at 7:20

The usual way to test for lognormality would be to take logs and test for normality.

Then any suitable test of normality would do; a Shapiro Wilk would be a reasonable choice.

However, this leads to the question "why are you testing that?"

"Check" is not the same as "test". Hypothesis tests are not generally useful as checks of assumptions.

In particular, goodness-of-fit tests are only really useful in a limited set of circumstances -- mostly they're used to answer a question we already know the answer to (and one which is actually not the same one we need an answer to).

Your data aren't lognormal, so there is no point in testing a question you know the answer to. A more relevant question would be 'how badly non-lognormal might it be?' or even better 'how much will this affect my inference?'. Those aren't answered by hypothesis tests. They're more like "effect-size" sorts of problems.

• Some references detailing the check--test dichotomy would be helpful. Dec 7, 2021 at 22:47

If you are using python, normaltest is the function to test if your distribution is normal

import numpy as np
import pandas as pd
import scipy as sp

• shouldn't it be np.log(x) instead of np.exp(x)?
• @UriGoren you are wrong. It should be np.log(x), not np.exp(x). Jan 24, 2021 at 12:27