org.spaceroots.mantissa.random
Class ScalarSampleStatistics
- java.lang.Object
-
- org.spaceroots.mantissa.random.ScalarSampleStatistics
-
public class ScalarSampleStatistics extends java.lang.ObjectThis class compute basic statistics on a scalar sample.
-
-
Constructor Summary
Constructors Constructor and Description ScalarSampleStatistics()Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(double x)Add one point to the instance.voidadd(double[] points)Add all points of an array to the instance.voidadd(ScalarSampleStatistics s)Add all the points of another sample to the instance.doublegetMax()Get the maximal value in the sample.doublegetMean()Get the mean value of the sample.doublegetMin()Get the minimal value in the sample.doublegetStandardDeviation()Get the standard deviation of the underlying probability law.intsize()Get the number of points in the sample.
-
-
-
Constructor Detail
-
ScalarSampleStatistics
public ScalarSampleStatistics()
Simple constructor. Build a new empty instance
-
-
Method Detail
-
add
public void add(double x)
Add one point to the instance.- Parameters:
x- value of the sample point
-
add
public void add(double[] points)
Add all points of an array to the instance.- Parameters:
points- array of points
-
add
public void add(ScalarSampleStatistics s)
Add all the points of another sample to the instance.- Parameters:
s- sample to add
-
size
public int size()
Get the number of points in the sample.- Returns:
- number of points in the sample
-
getMin
public double getMin()
Get the minimal value in the sample.- Returns:
- minimal value in the sample
-
getMax
public double getMax()
Get the maximal value in the sample.- Returns:
- maximal value in the sample
-
getMean
public double getMean()
Get the mean value of the sample.- Returns:
- mean value of the sample
-
getStandardDeviation
public double getStandardDeviation()
Get the standard deviation of the underlying probability law. This method estimate the standard deviation considering that the data available are only a sample of all possible values. This value is often called the sample standard deviation (as opposed to the population standard deviation).- Returns:
- standard deviation of the underlying probability law
-
-
DataMelt 3.0 © DataMelt by jWork.ORG