[SciPy-User] [Numpy-discussion] Fitting a curve on a log-normal distributed data
Tue Nov 17 18:36:42 CST 2009
On Tue, Nov 17, 2009 at 6:00 PM, Robert Kern <email@example.com> wrote:
> On Tue, Nov 17, 2009 at 17:52, Gökhan Sever <firstname.lastname@example.org> 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
> > 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
> > Probably I will include you in the acknowledgements part of my
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User