org.spaceroots.mantissa.random
Class ScalarSampleStatistics

java.lang.Object
  extended byorg.spaceroots.mantissa.random.ScalarSampleStatistics

public class ScalarSampleStatistics
extends Object

This class compute basic statistics on a scalar sample.

Version:
$Id: ScalarSampleStatistics.java 1666 2005-12-15 16:37:55Z luc $
Author:
L. Maisonobe

Constructor Summary
ScalarSampleStatistics()
          Simple constructor.
 
Method Summary
 void add(double x)
          Add one point to the instance.
 void add(double[] points)
          Add all points of an array to the instance.
 void add(ScalarSampleStatistics s)
          Add all the points of another sample to the instance.
 double getMax()
          Get the maximal value in the sample.
 double getMean()
          Get the mean value of the sample.
 double getMin()
          Get the minimal value in the sample.
 double getStandardDeviation()
          Get the standard deviation of the underlying probability law.
 int size()
          Get the number of points in the sample.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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


Copyright © 2001-2007 Luc Maisonobe. All Rights Reserved.