jhplot.stat
Class Statistics
- java.lang.Object
- 
- jhplot.stat.Statistics
 
- 
 
 public class Statistics extends java.lang.ObjectA static class for statistical calculations.
- 
- 
Constructor SummaryConstructors Constructor and Description Statistics()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static double[][]correlation(double[][] v)Correlationstatic double[][]correlation(double[][] v1, double[][] v2)Correlation coefficient, covariance(v1, v2) / Math.sqrt(variance(v1) * variance(v2)static doublecorrelation(double[] v1, double[] v2)Correlation coefficient, covariance(v1, v2) / Math.sqrt(variance(v1) * variance(v2)static double[][]covariance(double[][] v)Covariancestatic double[][]covariance(double[][] v1, double[][] v2)Covariancestatic doublecovariance(double[] v1, double[] v2)Covariancevoiddoc()Show online documentation.static doubleFProbability(double F, int df1, int df2)Computes probability of F-ratio.static doublegamma(double x)Returns the Gamma function of the argument.static doubleincompleteBeta(double aa, double bb, double xx)Returns the Incomplete Beta Function evaluated from zero to xx.static doubleincompleteBetaFraction1(double a, double b, double x)Continued fraction expansion #1 for incomplete beta integral.static doubleincompleteBetaFraction2(double a, double b, double x)Continued fraction expansion #2 for incomplete beta integral.static doublelnGamma(double x)Returns natural logarithm of gamma function.static doublemean(double[] v)Get mean valuestatic double[]mean(double[][] v)Get meanstatic doublep1evl(double x, double[] coef, int N)Evaluates the given polynomial of degree N at x.static doublepolevl(double x, double[] coef, int N)Evaluates the given polynomial of degree N at x.static doublepowerSeries(double a, double b, double x)Power series for incomplete beta integral.static doublestddeviation(double[] v)Standard deviationstatic double[]stddeviation(double[][] v)Standard deviationstatic doublestirlingFormula(double x)Returns the Gamma function computed by Stirling's formula.static doublevariance(double[] v)Variancestatic double[]variance(double[][] v)Variance
 
- 
- 
- 
Method Detail- 
meanpublic static double mean(double[] v) Get mean value- Parameters:
- v- vector
 
 - 
meanpublic static double[] mean(double[][] v) Get mean- Parameters:
- v- 2D array
- Returns:
 
 - 
stddeviationpublic static double stddeviation(double[] v) Standard deviation- Parameters:
- v- vector
- Returns:
 
 - 
variancepublic static double variance(double[] v) Variance- Parameters:
- v-
- Returns:
- vector
 
 - 
stddeviationpublic static double[] stddeviation(double[][] v) Standard deviation- Parameters:
- v-
- Returns:
 
 - 
variancepublic static double[] variance(double[][] v) Variance- Parameters:
- v- vector
- Returns:
 
 - 
covariancepublic static double covariance(double[] v1, double[] v2)Covariance- Parameters:
- v1- first vector
- v2- second vector
- Returns:
 
 - 
covariancepublic static double[][] covariance(double[][] v1, double[][] v2)Covariance- Parameters:
- v1- first 2D array
- v2- second 2D array
- Returns:
 
 - 
covariancepublic static double[][] covariance(double[][] v) Covariance- Parameters:
- v-
- Returns:
 
 - 
correlationpublic static double correlation(double[] v1, double[] v2)Correlation coefficient, covariance(v1, v2) / Math.sqrt(variance(v1) * variance(v2)- Parameters:
- v1- first vector
- v2- second vector
- Returns:
 
 - 
correlationpublic static double[][] correlation(double[][] v1, double[][] v2)Correlation coefficient, covariance(v1, v2) / Math.sqrt(variance(v1) * variance(v2)- Parameters:
- v1- first vector
- v2- second vector
- Returns:
 
 - 
correlationpublic static double[][] correlation(double[][] v) Correlation- Parameters:
- v-
- Returns:
 
 - 
FProbabilitypublic static double FProbability(double F, int df1, int df2)Computes probability of F-ratio.- 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.
 
 - 
incompleteBetapublic static double incompleteBeta(double aa, double bb, double xx)Returns the Incomplete Beta Function evaluated from zero to xx.- Parameters:
- aa- the alpha parameter of the beta distribution.
- bb- the beta parameter of the beta distribution.
- xx- the integration end point.
 
 - 
powerSeriespublic static double powerSeries(double a, double b, double x)Power series for incomplete beta integral. Use when b*x is small and x not too close to 1.
 - 
lnGammapublic static double lnGamma(double x) Returns natural logarithm of gamma function.- Parameters:
- x- the value
- Returns:
- natural logarithm of gamma function
 
 - 
p1evlpublic static double p1evl(double x, double[] coef, int N)Evaluates the given polynomial of degree N at x. Evaluates polynomial when coefficient of N is 1.0. Otherwise same as polevl().2 N y = C + C x + C x +...+ C x 0 1 2 N Coefficients are stored in reverse order: coef[0] = C , ..., coef[N] = C . N 0The function p1evl() assumes that coef[N] = 1.0 and is omitted from the array. Its calling arguments are otherwise the same as polevl().In the interest of speed, there are no checks for out of bounds arithmetic. - Parameters:
- x- argument to the polynomial.
- coef- the coefficients of the polynomial.
- N- the degree of the polynomial.
 
 - 
gammapublic static double gamma(double x) Returns the Gamma function of the argument.
 - 
stirlingFormulapublic static double stirlingFormula(double x) Returns the Gamma function computed by Stirling's formula. The polynomial STIR is valid for 33 <= x <= 172.
 - 
polevlpublic static double polevl(double x, double[] coef, int N)Evaluates the given polynomial of degree N at x.2 N y = C + C x + C x +...+ C x 0 1 2 N Coefficients are stored in reverse order: coef[0] = C , ..., coef[N] = C . N 0In the interest of speed, there are no checks for out of bounds arithmetic.- Parameters:
- x- argument to the polynomial.
- coef- the coefficients of the polynomial.
- N- the degree of the polynomial.
 
 - 
incompleteBetaFraction1public static double incompleteBetaFraction1(double a, double b, double x)Continued fraction expansion #1 for incomplete beta integral.
 - 
incompleteBetaFraction2public static double incompleteBetaFraction2(double a, double b, double x)Continued fraction expansion #2 for incomplete beta integral.
 - 
docpublic void doc() Show online documentation.
 
- 
 
- 
DMelt 3.0 © DataMelt by jWork.ORG