Re: from lognormal to normal distribution
- From: "Bruno Luong" <b.luong@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 3 Oct 2008 16:28:01 +0000 (UTC)
"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):
ans =lognstat(0,1)
1.6487
ans =quadl(@(x) x.*lognpdf(x,0,1),0,50)
1.6458
ans =quadl(@(x) x.*normpdf(x,0,1),-5,5)
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:
ans =mean(lognrnd(0,1,10000,1))
1.6287
ans =mean(log(lognrnd(0,1,10000,1)))
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
.
- References:
- from lognormal to normal distribution
- From: Bastiaan
- Re: from lognormal to normal distribution
- From: Tom Lane
- from lognormal to normal distribution
- Prev by Date: Re: Freezing a value in Simulink simulation
- Next by Date: Re: Fast way of finding entries with fixed separation in array
- Previous by thread: Re: from lognormal to normal distribution
- Next by thread: Re: from lognormal to normal distribution
- Index(es):
Relevant Pages
|