Click or drag to resize
Accord.NET (logo) UnivariateDiscreteDistributionComplementaryDistributionFunction Method (Int32, Boolean)
Gets the complementary cumulative distribution function (ccdf) for this distribution evaluated at point k. This function is also known as the Survival function.

Namespace:  Accord.Statistics.Distributions.Univariate
Assembly:  Accord.Statistics (in Accord.Statistics.dll) Version: 3.4.0
Syntax
public virtual double ComplementaryDistributionFunction(
	int k,
	bool inclusive
)
Request Example View Source

Parameters

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 false.

Return Value

Type: Double
Remarks
The Complementary Cumulative Distribution Function (CCDF) is the complement of the Cumulative Distribution Function, or 1 minus the CDF.
Examples
// Compute P(X = k) 
double equal = dist.ProbabilityMassFunction(k: 1);

// Compute P(X < k) 
double less = dist.DistributionFunction(k: 1, inclusive: false);

// Compute P(X ≤ k) 
double lessThanOrEqual = dist.DistributionFunction(k: 1, inclusive: true);

// Compute P(X > k) 
double greater = dist.ComplementaryDistributionFunction(k: 1);

// Compute P(X ≥ k) 
double greaterThanOrEqual = dist.ComplementaryDistributionFunction(k: 1, inclusive: true);
See Also