Re: from lognormal to normal distribution



"Tom Lane" <tlane@xxxxxxxxxxxxx> wrote in message <gc5g0t$822$1@xxxxxxxxxxxxxxxxxx>...
I wanted to test this by making a lognormal distribution of a variable t
with mu=0, sigma = 1 and the transform it into a normal distribution. I
expected to get a normal distribution centered around 0 and with sigma =1.
But this does not happen. I must be making a simple mistake.. but I cannot
find it..

Bastiaan, I don't quite understand what you are trying to do.

I believe Biastiaan numerically integrates pdf log(lognpdf) by changing the variable.

Here's a
demonstration that the mean of the normal distribution is 0, and the mean of
the lognormal is exp(1/2):

lognstat(0,1)
ans =
1.6487
quadl(@(x) x.*lognpdf(x,0,1),0,50)
ans =
1.6458
quadl(@(x) x.*normpdf(x,0,1),-5,5)
ans =
0


This is not what Biastiaan is worrying, because there is no using of 'log'.

Here's a demonstration that the means of a lognormal sample and the log of
such a sample are about as expected:

mean(lognrnd(0,1,10000,1))
ans =
1.6287
mean(log(lognrnd(0,1,10000,1)))
ans =
0.0100


The above is also not helping him.

I read through his code, and it looks all right at sight. Unfortunately I do not have statistic toolbox to make a test with his code. I agree that what he shows seems to contradict with the documentation.

Bruno
.



Relevant Pages