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.5.0
public virtual double ComplementaryDistributionFunction(
	int k,
	bool inclusive
Request Example View Source


Type: SystemInt32
A single point in the distribution range.
Type: SystemBoolean
True to return P(X >= x), false to return P(X > x). Default is false.

Return Value

Type: Double
The Complementary Cumulative Distribution Function (CCDF) is the complement of the Cumulative Distribution Function, or 1 minus the CDF.
// 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