public class BinomialDist extends NaryFunction
binomdist(x,n,p)
gives the binomial distribution for x successes in n trial, with the probability
of each trial being p.
A four argument form binomdist(x,n,p,1)
gives the cumulative distribution function.curNumberOfParameters, name, NaN, numberOfParameters
Constructor and Description |
---|
BinomialDist()
Three argument version
|
BinomialDist(boolean fourArgVersion)
Four argument version like Excel's BINOMDIST function.
|
Modifier and Type | Method and Description |
---|---|
static double |
bidist(int x,
int n,
double p) |
static double |
cdf(int x,
int n,
double p) |
java.lang.Object |
eval(java.lang.Object[] args)
Evaluate the function
|
run
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString
public BinomialDist()
public BinomialDist(boolean fourArgVersion)
fourArgVersion
- public java.lang.Object eval(java.lang.Object[] args) throws EvaluationException
NaryFunction
eval
in class NaryFunction
args
- arguments to the functionEvaluationException
- if the calculation cannot be performedpublic static double bidist(int x, int n, double p)
public static double cdf(int x, int n, double p)
Copyright © 2018 Singular Systems http://www.singularsys.com/jep