Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Topic: Smoothhistogram and log-log scaling; Fitting of a
Replies: 1   Last Post: Mar 19, 2013 12:05 AM

 Search Thread: Advanced Search

 Ernst H.K. Stelzer Posts: 10 Registered: 2/14/12
Re: Smoothhistogram and log-log scaling; Fitting of a
Posted: Mar 19, 2013 12:05 AM
 Plain Text Reply

SmoothHistogram[RandomVariate[ExponentialDistribution[1/2], 500],
PlotRange -> {{0.01, 25}, Automatic},
ScalingFunctions -> {{Log, Exp}, None}]

The option ScalingFunctions is not documented for this function but for a number of others and is not outrightly rejected for SmoothHistogram. It has an effect, but it still does not work in this case in my hands. It thin Wolfram should implement it correctly and with all *Plot2D* and *Plot3D* functions.

Greetings

Ernst

(+49 (69) 798 42547, ernst.stelzer@physikalischebiologie.de)

-----Original Message-----
From: Stefano Ugliano [mailto:northerndream@gmail.com]
Sent: Monday, 18 March, 2013 10:35 AM
Subject: Smoothhistogram and log-log scaling; Fitting of a power-law

Hi all again,

Two questions in one this time, I hope this won't create any confusion: alt hough these questions sound pretty simple I haven't been able to answer them myself!

I am currently working on degree distributions on networks, and

1) I need to produce histograms of these degrees (a list of positive integers) vs their frequency. Their distribution often follows a power law, so that I am required to scale these histograms in a log-log scale.

The problem is: I really love SmoothHistogram for the clarity of its output and for automatically normalising everything, but so far I have not managed to do the log-log scaling in it, which is instead pretty straightforward with a normal Histogram... Is there any solution that joins the two worlds profitably?

2) Finally, it is important to find the "slope" of the (log-scaled) distribution, i.e. the exponent of the distribution itself. I am still not really used to fit non-polynomial functions, and I'm quite confused by the many possible approaches, which is in your opinion the best (simpler and tidier) way to proceed?

Thank you all.

© Drexel University 1994-2013. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.