commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject Re: [math]plot distribution
Date Thu, 18 Jun 2015 15:06:53 GMT
On 6/18/15 6:31 AM, narjes saraie wrote:
> Hi All.
> I am beginner in java and have some data.I want to guess a distribution for
> my data then calculate goodness of fit (gof).
> I find distribution commons math and use it ,if i want plot my distribution
> or CDF or probability (X>x), how do it?
> is it any example for distribution and plotting it.

We don't have graphical exploratory data analysis tools in Commons
Math.  You would do best to start with a package that supports
generation of histograms if you have no idea what distribution might
fit the data.  If you do have an idea of what the distribution is,
depending on what it is, you may be able to estimate the parameters
of the distribution from the data.  For example, if you think that
the data are normally distributed, you can use SummaryStatistics in
the stat package to get the standard statistical estimators of the
mean and standard deviation, which together determine a normal
distribution. Then you could do a Kolmogorov-Smirnov test (or group
the data and use a G- or ChiSquare test) to assess goodness of fit. 
Other distributions have different parameters and different
statistical estimators.

We don't currently support plotting distributions in Commons Math,
but the user guide code contains an example showing how to do it
with some external tools.  Have a look at the plots in the user
guide section on probability distributions [1] and the source for
the code that generates those plots [2].



> thanks.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message