[SciPy-User] [Numpy-discussion] Fitting a curve on a log-normal distributed data
Gökhan Sever
gokhansever@gmail....
Tue Nov 17 18:36:42 CST 2009
On Tue, Nov 17, 2009 at 6:00 PM, Robert Kern <robert.kern@gmail.com> wrote:
> On Tue, Nov 17, 2009 at 17:52, Gökhan Sever <gokhansever@gmail.com> wrote:
>
> > I asked this in one of my early replies just repeating what is the way to
> > get log-normal sample using scipy.stats? I will use it for a
> demonstrative
> > case.
> > For some reason, this never looks an expected log-normal sample to me:
> >
> > stats.lognorm.rvs(1,size=15)
> >
> > What am I missing here?
>
> Are you expecting that to look like your 15-vector concentration data?
> That's not what you should expect. Instead,
>
> x = stats.lognorm.rvs(1, size=10000)
> h = np.histogram(x, bins=15)
>
> Now, the *histogram* of the samples should look like roughly like the
> shapes that you are expecting. .rvs() produces the samples themselves.
> I.e. pretend like each element is the size of an individual particle,
> not the concentration of a size class of particles. Taking the
> histogram "simulates" what your instrument does: it finds the amont of
> particles in each size class.
>
Now, I see it better. Makes much more sense now.
>
> > Thanks for your time and explanations Robert. I really appreciate your
> help.
> > Probably I will include you in the acknowledgements part of my
> presentation.
>
> Entirely unnecessary, of course.
>
Not at all ;)
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
> -- Umberto Eco
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
--
Gökhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20091117/71d6dfe5/attachment-0001.html
More information about the SciPy-User
mailing list