Class Statistics

java.lang.Object
  extended by Statistics

public class Statistics
extends java.lang.Object

Author:
sameh This class is used to compute the average and standard deviation of the values contained in an array of long values.

Constructor Summary
Statistics()
           
 
Method Summary
static double average(long[] array)
          This method computes the average of the values in the specified array.
static double standardDeviation(long[] array)
          This method computes the standard deviation of the values in the specified array.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Statistics

public Statistics()
Method Detail

average

public static double average(long[] array)
This method computes the average of the values in the specified array.

Parameters:
array - The array for which we want to compute the average.
Returns:
the average of all the entries in the specified array.

standardDeviation

public static double standardDeviation(long[] array)
This method computes the standard deviation of the values in the specified array.

Parameters:
array - The array for which we want to compute the standard deviation.
Returns:
the deviation of all the entries in the specified array.