|
UnivariateDiscreteDistributionDistributionFunction Method (Int32, Boolean)
|
Gets P(X ≤ k) or P(X < k), the cumulative distribution function
(cdf) for this distribution evaluated at point k, depending
on the value of the inclusive parameter.
Namespace:
Accord.Statistics.Distributions.Univariate
Assembly:
Accord.Statistics (in Accord.Statistics.dll) Version: 3.8.0
Syntax public virtual double DistributionFunction(
int k,
bool inclusive
)
Public Overridable Function DistributionFunction (
k As Integer,
inclusive As Boolean
) As Double
Request Example
View SourceParameters
- k
- Type: SystemInt32
A single point in the distribution range. - inclusive
- Type: SystemBoolean
True to return P(X ≤ x), false to return P(X < x). Default is true.
Return Value
Type:
DoubleRemarks
The Cumulative Distribution Function (CDF) describes the cumulative
probability that a given value or any value smaller than it will occur.
Examples
double equal = dist.ProbabilityMassFunction(k: 1);
double less = dist.DistributionFunction(k: 1, inclusive: false);
double lessThanOrEqual = dist.DistributionFunction(k: 1, inclusive: true);
double greater = dist.ComplementaryDistributionFunction(k: 1);
double greaterThanOrEqual = dist.ComplementaryDistributionFunction(k: 1, inclusive: true);
See Also