All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.core.Statistics

java.lang.Object
   |
   +----weka.core.Statistics

public class Statistics
extends Object
Class implementing some distributions, tests, etc. Most of the code is adapted from Gary Perlman's unixstat.

Version:
$Revision: 1.2 $
Author:
Eibe Frank (eibe@cs.waikato.ac.nz)

Constructor Index

 o Statistics()

Method Index

 o binomialStandardError(double, int)
Computes standard error for observed values of a binomial random variable.
 o chiSquaredProbability(double, int)
Returns chi-squared probability for given value and degrees of freedom.
 o FCriticalValue(double, int, int)
Critical value for given probability of F-distribution.
 o FProbability(double, int, int)
Computes probability of F-ratio.
 o main(String[])
Main method for testing this class.
 o normalProbability(double)
Returns probability that the standardized normal variate Z (mean = 0, standard deviation = 1) is less than z.
 o studentTConfidenceInterval(int, double, double)
Computes absolute size of half of a student-t confidence interval for given degrees of freedom, probability, and observed value.

Constructors

 o Statistics
 public Statistics()

Methods

 o binomialStandardError
 public static double binomialStandardError(double p,
                                            int n)
Computes standard error for observed values of a binomial random variable.

Parameters:
p - the probability of success
n - the size of the sample
Returns:
the standard error
 o chiSquaredProbability
 public static double chiSquaredProbability(double x,
                                            int df)
Returns chi-squared probability for given value and degrees of freedom. (The probability that the chi-squared variate will be greater than x for the given degrees of freedom.) Adapted from unixstat by Gary Perlman.

Parameters:
x - the value
df - the number of degrees of freedom
 o FCriticalValue
 public static double FCriticalValue(double p,
                                     int df1,
                                     int df2)
Critical value for given probability of F-distribution. Adapted from unixstat by Gary Perlman.

Parameters:
p - the probability
df1 - the first number of degrees of freedom
df2 - the second number of degrees of freedom
Returns:
the critical value for the given probability
 o FProbability
 public static double FProbability(double F,
                                   int df1,
                                   int df2)
Computes probability of F-ratio. Adapted from unixstat by Gary Perlman. Collected Algorithms of the CACM Algorithm 322 Egon Dorrer

Parameters:
F - the F-ratio
df1 - the first number of degrees of freedom
df2 - the second number of degrees of freedom
Returns:
the probability of the F-ratio.
 o normalProbability
 public static double normalProbability(double z)
Returns probability that the standardized normal variate Z (mean = 0, standard deviation = 1) is less than z. Adapted from unixstat by Gary Perlman.

Parameters:
the - z-value
Returns:
the probability of the z value according to the normal pdf
 o studentTConfidenceInterval
 public static double studentTConfidenceInterval(int df,
                                                 double p,
                                                 double se)
Computes absolute size of half of a student-t confidence interval for given degrees of freedom, probability, and observed value.

Parameters:
df - the number of degrees of freedom
p - the probability
se - the observed value
Returns:
absolute size of half of a student-t confidence interval
 o main
 public static void main(String ops[])
Main method for testing this class.


All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home