Package org.snpeff.probablility
Class Binomial
- java.lang.Object
-
- org.snpeff.probablility.Binomial
-
public class Binomial extends java.lang.Object
Calculate binomial distribution References http://en.wikipedia.org/wiki/Binomial_distribution- Author:
- pcingola
-
-
Field Summary
Fields Modifier and Type Field Description static double
EPSILON
A small number
-
Constructor Summary
Constructors Constructor Description Binomial()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description double
cdf(double p, int k, int n)
Cumulative probability function P( K <= k )double
cdfUp(double p, int k, int n)
Cumulative probability function, upper tail P( K > k )double
cdfUpEq(double p, int k, int n)
Cumulative probability function, upper tail P( K >= k )static Binomial
get()
double
pdf(double p, int k, int n)
Probability density functiondouble
pdfLog(double p, int k, int n)
java.lang.String
toR(double p, int k, int n)
Convert values to 'R' command
-
-
-
Method Detail
-
get
public static Binomial get()
-
cdf
public double cdf(double p, int k, int n)
Cumulative probability function P( K <= k )- Parameters:
p
- : probability of a success in a single Bernoulli trialk
- : Number of successesn
- : Number of trials- Returns:
-
cdfUp
public double cdfUp(double p, int k, int n)
Cumulative probability function, upper tail P( K > k )- Parameters:
p
- : probability of a success in a single Bernoulli trialk
- : Number of successesn
- : Number of trials- Returns:
-
cdfUpEq
public double cdfUpEq(double p, int k, int n)
Cumulative probability function, upper tail P( K >= k )- Parameters:
p
- : probability of a success in a single Bernoulli trialk
- : Number of successesn
- : Number of trials- Returns:
-
pdf
public double pdf(double p, int k, int n)
Probability density function- Parameters:
p
- : probability of a success in a single Bernoulli trialk
- : Number of successesn
- : Number of trials- Returns:
-
pdfLog
public double pdfLog(double p, int k, int n)
-
toR
public java.lang.String toR(double p, int k, int n)
Convert values to 'R' command- Returns:
-
-