commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles <>
Subject Re: [math]plot distribution
Date Thu, 18 Jun 2015 14:38:32 GMT

On Thu, 18 Jun 2015 06:31:00 -0700, 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.
> thanks.

Perhaps it would be clearer to see what you mean with a code example.

If you want to plot a distribution implemented in Commons Math, you'd
call one the methods defined in the "RealDistribution" interface
(e.g. "density(double x)").

But maybe that the functionality which you are looking for is defined
in package "org.apache.commons.math3.stat.inference".

If you need to fit data to a model (e.g. find the parameters of an
assumed distribution), it is perhaps the least-squares fitting which
you are looking for.  For a univariate function, there is a utility
implemented as "org.apache.commons.math3.fitting.SimpleCurveFitter".


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

View raw message