# Class Binomial

java.lang.Object
org.snpeff.probablility.Binomial

public class Binomial extends 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

Modifier and Type
Method
Description
`double`
`cdf(double p, int k, int n)`
Cumulative probability function P( K invalid input: '<'= 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 function
`double`
`pdfLog(double p, int k, int n)`
`String`
`toR(double p, int k, int n)`
Convert values to 'R' command

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### EPSILON

public static double EPSILON
A small number

## Constructor Details

### Binomial

public Binomial()

## Method Details

### get

public static Binomial get()

### cdf

public double cdf(double p, int k, int n)
Cumulative probability function P( K invalid input: '<'= k )

Parameters:
  `p` - : probability of a success in a single Bernoulli trial
  `k` - : Number of successes
  `n` - : 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 trial
  `k` - : Number of successes
  `n` - : 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 trial
  `k` - : Number of successes
  `n` - : 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 trial
  `k` - : Number of successes
  `n` - : Number of trials
Returns:

### pdfLog

public double pdfLog(double p, int k, int n)

### toR

public String toR(double p, int k, int n)
Convert values to 'R' command

Returns: