Mark R. Diggory wrote: <cut/> > > > I think maybe this should be returning the more generic > StatisticalSummary interface. If you are returning precalculated > results, you do not exactly want to expose the underlying implementation > to modification by the user. > > StatisticalSummary[] sampleStats ...
That's good idea > If your going to be preserving the original/bootstrap values in a > double[][], then the Standard "DescriptiveStatisticsImpl" could be used. > > public interface FullStatisticalSummary { > public abstract double getMean(); > public abstract double getVariance(); > public abstract double getStandardDeviation(); > public abstract double getMax(); > public abstract double getMin(); > public abstract long getN(); > public abstract double getSum(); > public abstract double getPercentile(double p); > ... > } > > or more simply, > > public interface FullStatisticalSummary extends StatisticalSummary{ > public abstract double getPercentile(double p); > ... > } Exactely, but the point is that we have to preserve original/bootstrap values and EmpiricalDistribution is not storing them - internally it keeps data in the array of bins. As I understand this was the aim - we don't have to keep the whole data set in order to get important information about the empirical distribution. If a data set is huge this is a true gain. If, on the other hand, I want to keep the whole data set then I can easily use other tools to calculate any statistics I want so I don't need to use EmpiricalDistribution. Documentation for EmpiricalDistribution gives two example applications of this interface - preparing data for drawing a histogram and provide methods to draw random numbers from such a distribution. I am wondering if making EmpiricalDistribution responsible for other tasks like handling bootstrap samples or even doing bootstrap would not make it to complicated to use. Piotr --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]