Package org.snpeff.probablility
Class Binomial
java.lang.Object
org.snpeff.probablility.Binomial
Calculate binomial distribution
References http://en.wikipedia.org/wiki/Binomial_distribution
- Author:
- pcingola
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
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) toR
(double p, int k, int n) Convert values to 'R' command
-
Field Details
-
EPSILON
public static double EPSILONA small number
-
-
Constructor Details
-
Binomial
public Binomial()
-
-
Method Details
-
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
Convert values to 'R' command- Returns:
-