public class Statistics
extends java.lang.Object
Constructor and Description |
---|
Statistics() |
Modifier and Type | Method and Description |
---|---|
static double |
betainv(double x,
double p,
double q)
returns the inverse beta, ALGORITHM AS 63 APPL.
|
static double |
binomialCoeff(int choose,
int total)
returns the binomial coefficient which reports the number of ways n items can be sampled from among
a larger group without replacement and where the order is not important (i.e., dog = god)
|
static double |
binomialStandardError(double p,
int n)
Computes standard error for observed values of a binomial
random variable.
|
static double |
factorial(int aNumber)
Returns the factorial of a number
|
static double |
getBinomial(int k,
int N,
double p)
returns the binomial probability for k outcomes out of N trials
where the probability of getting that outcome is p
|
static double |
getBinomialApproxProbability(int k,
int N,
double p)
returns the one-tailed pobability for a binomial of k outcomes out of N trials
where the probability of getting that outcome is p
|
static double |
getBinomialProbability(int k,
int N,
double p)
returns the one-tailed pobability for a binomial of k outcomes out of N trials
where the probability of getting that outcome is p
|
static double |
getBinomialProbability2Tail(int k,
int N,
double p)
returns the one-tailed pobability for a binomial of k outcomes out of N trials
where the probability of getting that outcome is p
|
static double |
getChiSquaredCriticalValue(double p,
int df)
Returns chi-squared probability for given value and degrees
of freedom.
|
static double |
getChiSquaredProbability(double x,
int df)
Returns chi-squared probability for given value and degrees
of freedom.
|
static int[][] |
getCombinations(int nWay,
int nMainTerms)
returns the possible combinations
|
static double |
getFCriticalValue(double p,
int df1,
int df2)
Critical value for given probability of F-distribution.
|
static double |
getFProbability(double F,
int df1,
int df2)
Computes probability of F-ratio.
|
static double |
getK(double vStrength)
returns K for the Watson-Williams Test
|
static double |
getMannWhitneyUProbability(double U,
int n1,
int n2)
returns the probability for a given Mann Whitney U statistic
|
static int |
getNInteractionTerms(int nMainEffects)
returns the number of interaction terms that are part of the factorial model
|
static double |
getNormalCriticalValue(double p)
Returns the critical value for a given probability
|
static double |
getNormalProbability(double z)
Returns the probability that the standardized normal variate Z (mean = 0, standard
deviation = 1) is greater than z.
|
static double |
getTCriticalValue(double p,
int df)
Critical value for given probability of F-distribution.
|
static double |
getTProbability(double t,
double df)
returns the one-tailed probability for a t value such as this or greater under the
normal Curve (t Distribution) starting at positive infinity with a mean of zero and
a variance or 1 in Algorithn AS 3 Appl.
|
static double |
getTProbability2Tail(double t,
double df)
returns the two-tailed probability for a t value such as this or greater under the
normal Curve (t Distribution) starting at positive infinity with a mean of zero and
a variance of 1 in Algorithn AS 3 Appl.
|
static double |
getWatsonU2Probability(double U2,
int n1,
int n2)
returns the probability for a given Watson U2 statistic
|
static double |
lnFactorial(double x)
Returns natural logarithm of factorial using gamma function.
|
static double |
lnfbeta(double a,
double b)
returns the beta
|
static double |
lnGamma(double x)
Returns natural logarithm of gamma function.
|
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.
|
public static int getNInteractionTerms(int nMainEffects) throws java.lang.Exception
nMainEffects
- the number of main effectsjava.lang.Exception
public static int[][] getCombinations(int nWay, int nMainTerms) throws java.lang.Exception
nWay
- nMainTerms
- java.lang.Exception
public static double factorial(int aNumber) throws java.lang.Exception
aNumber
- the integer value to examinejava.lang.Exception
public static double binomialCoeff(int choose, int total) throws java.lang.Exception
choose
- the number of items to choosetotal
- the total number of items availablejava.lang.Exception
public static double getNormalProbability(double z)
z
- the z-valuepublic static double getNormalCriticalValue(double p) throws java.lang.Exception
p
- the probabilityjava.lang.Exception
public static double getBinomial(int k, int N, double p) throws java.lang.Exception
k
- selected outcomesN
- total trialsp
- probabilityjava.lang.Exception
public static double getBinomialProbability(int k, int N, double p) throws java.lang.Exception
k
- selected outcomesN
- total trialsp
- probabilityjava.lang.Exception
public static double getBinomialProbability2Tail(int k, int N, double p) throws java.lang.Exception
k
- selected outcomesN
- total trialsp
- probabilityjava.lang.Exception
public static double getBinomialApproxProbability(int k, int N, double p) throws java.lang.Exception
k
- selected outcomesN
- total trialsp
- probabilityjava.lang.Exception
public static double getTProbability(double t, double df)
t
- valuedf
- the degrees of freedompublic static double getTProbability2Tail(double t, double df)
t
- valuedf
- the degrees of freedompublic static double getTCriticalValue(double p, int df)
p
- the probabilitydf
- the number of degrees of freedompublic static double getFProbability(double F, int df1, int df2)
F
- the F-ratiodf1
- the first number of degrees of freedomdf2
- the second number of degrees of freedompublic static double getFCriticalValue(double p, int df1, int df2)
p
- the probabilitydf1
- the first number of degrees of freedomdf2
- the second number of degrees of freedompublic static double getChiSquaredProbability(double x, int df) throws java.lang.Exception
x
- the valuedf
- the number of degrees of freedomjava.lang.Exception
public static double getChiSquaredCriticalValue(double p, int df) throws java.lang.Exception
p
- the probabilitydf
- the number of degrees of freedomjava.lang.Exception
public static double getK(double vStrength) throws java.lang.Exception
vStrength
- the vector strengthjava.lang.Exception
public static double getWatsonU2Probability(double U2, int n1, int n2) throws java.lang.Exception
U2
- the Mann Whitney U statisticn1
- sample size for sample 1n2
- sample size for sample 2java.lang.Exception
public static double getMannWhitneyUProbability(double U, int n1, int n2) throws java.lang.Exception
U
- the Mann Whitney U statisticn1
- sample size for sample 1n2
- sample size for sample 2java.lang.Exception
public static double lnfbeta(double a, double b)
a
- a numberb
- a numberpublic static double betainv(double x, double p, double q)
x
- a numberp
- a numberq
- a numberpublic static double binomialStandardError(double p, int n)
p
- the probability of successn
- the size of the samplepublic static double studentTConfidenceInterval(int df, double p, double se)
df
- the number of degrees of freedomp
- the probabilityse
- the observed valuepublic static double lnFactorial(double x)
x
- the valuepublic static double lnGamma(double x)
x
- the valueRH, 2017