2
$\begingroup$

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

$\endgroup$
1
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

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
a=pd.read_csv('your_data_file.csv')
p=sp.stats.mstats.normaltest(a, axis=0).pvalue
if p<0.01:
   print 'distribution is not normal'
p=sp.stats.mstats.normaltest(a.apply(lambda x:np.exp(x)), axis=0).pvalue
if p<0.01:
   print 'distribution is not log-normal'
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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