Terrier IR Platform
2.2.1

uk.ac.gla.terrier.utility
Class StaTools

java.lang.Object
  extended by uk.ac.gla.terrier.utility.StaTools

public class StaTools
extends java.lang.Object

This class implements a series of basic statistical functions.


Constructor Summary
StaTools()
           
 
Method Summary
static double mean(double[] data)
          The mean of an array of double values.
static double mean(double[] data, int start, int length, boolean ascending)
          The mean of a sub-array of an array of double values.
static double mean(int[] data)
          The mean of an array of integers.
static double median(double[] data)
          The median of an array of double values.
static double standardDeviation(double[] data)
          The standard deviation of an array of double values.
static double stdErrorOfTheMean(double[] data)
          This method returns the standard error of the mean for an array of data.
static double stirlingPower(double n, double m)
          This method provides the contract for implementing the Stirling formula for the power series.
static int sum(int[] data)
          The sum of an array of integers.
static double variance(double[] data)
          The variance of an array of double values.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaTools

public StaTools()
Method Detail

stirlingPower

public static double stirlingPower(double n,
                                   double m)
This method provides the contract for implementing the Stirling formula for the power series.

Parameters:
n - The parameter of the Stirling formula.
m - The parameter of the Stirling formula.
Returns:
the approximation of the power series

stdErrorOfTheMean

public static double stdErrorOfTheMean(double[] data)
This method returns the standard error of the mean for an array of data.

Parameters:
data - The sampled data.
Returns:
The standard error of the mean.

sum

public static int sum(int[] data)
The sum of an array of integers.

Parameters:
data - The integers.
Returns:
The sum.

mean

public static double mean(double[] data)
The mean of an array of double values.

Parameters:
data - The double values.
Returns:
The mean.

mean

public static double mean(double[] data,
                          int start,
                          int length,
                          boolean ascending)
The mean of a sub-array of an array of double values.

Parameters:
data - The array of double values.
start - The starting index of the sub-array.
length - The length of the sub-array.
ascending - Is the starting index the left (true) or right (false) end of the sub-array?
Returns:
The mean of the sub-array.

mean

public static double mean(int[] data)
The mean of an array of integers.

Parameters:
data - The array of integers.
Returns:
The mean.

median

public static double median(double[] data)
The median of an array of double values.

Parameters:
data - The array of double values.
Returns:
The median.

standardDeviation

public static double standardDeviation(double[] data)
The standard deviation of an array of double values.

Parameters:
data - The array of double values.
Returns:
The standrad deviation.

variance

public static double variance(double[] data)
The variance of an array of double values.

Parameters:
data - The array of double values.
Returns:
The variance.

Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow